Repository navigation
Commit 04d46c5
committed
fix(collections): make shared cursor dispatch one locked transaction (#643)
The unlocked collectionIteratorState probe in the shared next() dispatch raced peer threads' property-lock-guarded cursor-field stores on Linux CI once inlining materialized rare-state contents into the probe. Dispatch now runs a content-free atomic tag pre-check (immutable once published, so hot non-collection iterators never take a lock) and probes plus advances the cursor inside the same property-lock critical section that guards every field store. The ruling is documented on the advance helper: per-iterator property_lock for mutators, backing lock for concurrent trace reads, world-stopped relocation.
Adds a no-GIL witness draining Map keys/values/entries and Set values/entries cursors from three threads across mutation rounds and forced GC. TSan: witness 9/9 runs and 19/19 iterator tests with zero race diagnostics.1 parent 4740df5 commit 04d46c5
3 files changed
Lines changed: 86 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27219 | 27219 | | |
27220 | 27220 | | |
27221 | 27221 | | |
| 27222 | + | |
| 27223 | + | |
| 27224 | + | |
| 27225 | + | |
| 27226 | + | |
| 27227 | + | |
| 27228 | + | |
| 27229 | + | |
| 27230 | + | |
| 27231 | + | |
| 27232 | + | |
| 27233 | + | |
| 27234 | + | |
| 27235 | + | |
| 27236 | + | |
| 27237 | + | |
| 27238 | + | |
| 27239 | + | |
| 27240 | + | |
| 27241 | + | |
| 27242 | + | |
| 27243 | + | |
| 27244 | + | |
| 27245 | + | |
| 27246 | + | |
| 27247 | + | |
| 27248 | + | |
| 27249 | + | |
| 27250 | + | |
| 27251 | + | |
| 27252 | + | |
| 27253 | + | |
| 27254 | + | |
| 27255 | + | |
| 27256 | + | |
| 27257 | + | |
| 27258 | + | |
| 27259 | + | |
| 27260 | + | |
| 27261 | + | |
| 27262 | + | |
| 27263 | + | |
| 27264 | + | |
| 27265 | + | |
| 27266 | + | |
| 27267 | + | |
| 27268 | + | |
| 27269 | + | |
| 27270 | + | |
| 27271 | + | |
| 27272 | + | |
| 27273 | + | |
| 27274 | + | |
27222 | 27275 | | |
27223 | 27276 | | |
27224 | 27277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34846 | 34846 | | |
34847 | 34847 | | |
34848 | 34848 | | |
34849 | | - | |
34850 | | - | |
34851 | | - | |
34852 | | - | |
| 34849 | + | |
| 34850 | + | |
| 34851 | + | |
| 34852 | + | |
| 34853 | + | |
| 34854 | + | |
| 34855 | + | |
| 34856 | + | |
| 34857 | + | |
| 34858 | + | |
| 34859 | + | |
| 34860 | + | |
34853 | 34861 | | |
34854 | 34862 | | |
34855 | 34863 | | |
34856 | 34864 | | |
34857 | 34865 | | |
34858 | 34866 | | |
34859 | 34867 | | |
34860 | | - | |
34861 | 34868 | | |
34862 | 34869 | | |
34863 | 34870 | | |
| |||
34936 | 34943 | | |
34937 | 34944 | | |
34938 | 34945 | | |
34939 | | - | |
| 34946 | + | |
| 34947 | + | |
| 34948 | + | |
| 34949 | + | |
| 34950 | + | |
| 34951 | + | |
| 34952 | + | |
| 34953 | + | |
| 34954 | + | |
| 34955 | + | |
| 34956 | + | |
34940 | 34957 | | |
34941 | 34958 | | |
34942 | 34959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3090 | 3090 | | |
3091 | 3091 | | |
3092 | 3092 | | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
3093 | 3103 | | |
3094 | 3104 | | |
3095 | 3105 | | |
| |||
0 commit comments