Commit 261964b
relay: hop cross-exec handle teardown to the owning exec
The reciprocal peer SubscribeNamespaceHandle was acquired via a direct
session->subscribeNamespace() and stored raw, so peerSubNsHandles_.erase()
destroyed it on relayExec_ — running its teardown (isClosed() read + control
RST) on the wrong thread while the peer session closed on its own io exec
(TSAN-confirmed data race on MoQSession).
Acquire it through maybeWrapPublisher so the handle is a
CrossExecSubscribeNamespaceHandle bound to the session's exec, and give every
cross-exec wrapper in PublisherCrossExecFilter a destructor that hops the inner
handle's destruction to that exec — so destructor-driven teardown is
exec-correct, not just the explicit unsubscribe/cancel calls.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 975d24a commit 261964b
3 files changed
Lines changed: 47 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1372 | 1371 | | |
1373 | 1372 | | |
1374 | 1373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
| |||
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
80 | 101 | | |
81 | 102 | | |
82 | 103 | | |
| |||
98 | 119 | | |
99 | 120 | | |
100 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
101 | 129 | | |
102 | 130 | | |
103 | 131 | | |
| |||
128 | 156 | | |
129 | 157 | | |
130 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
131 | 166 | | |
132 | 167 | | |
133 | 168 | | |
| |||
150 | 185 | | |
151 | 186 | | |
152 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
153 | 195 | | |
154 | 196 | | |
155 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
0 commit comments