(In reply to Alexis Beingessner [:Gankra] from comment #0) > Created attachment 9197385 [details] > tsan-backtrace-jan-2021.txt > > Ran into this while testing wpt under tsan. mCommittedAutoIncrementId is being accessed on the transaction thread *as well as* the thread that spawns the transaction (contrary to its documentation that states it's only accessed on the transaction thread). That inconsistency should probably be fixed, and either actually ensure that accesses happen only on the > But, it's weird because it seems like spawning the thread should be an adequate synchronization? Yes, spawning should be an adequate synchronization. But it's a pool and spawning a new thread doesn't happen on each call. So I guess the thread was created when processing some earlier transaction, and it now got reused.
Bug 1687001 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Alexis Beingessner [:Gankra] from comment #0) > Created attachment 9197385 [details] > tsan-backtrace-jan-2021.txt > > Ran into this while testing wpt under tsan. mCommittedAutoIncrementId is being accessed on the transaction thread *as well as* the thread that spawns the transaction (contrary to its documentation that states it's only accessed on the transaction thread). That inconsistency should probably be fixed, and either actually ensure that accesses happen only on the transaction thread, or proper synchronization is in place (which would probably mean using an `Atomic<int64_t>` here) > But, it's weird because it seems like spawning the thread should be an adequate synchronization? Yes, spawning should be an adequate synchronization. But it's a pool and spawning a new thread doesn't happen on each call. So I guess the thread was created when processing some earlier transaction, and it now got reused.
(In reply to Alexis Beingessner [:Gankra] from comment #0) > Created attachment 9197385 [details] > tsan-backtrace-jan-2021.txt > > Ran into this while testing wpt under tsan. mCommittedAutoIncrementId is being accessed on the transaction thread *as well as* the thread that spawns the transaction (contrary to its documentation that states it's only accessed on the transaction thread). That inconsistency should probably be fixed, and either actually ensure that accesses happen only on the transaction thread, or proper synchronization is in place. > But, it's weird because it seems like spawning the thread should be an adequate synchronization? Yes, spawning should be an adequate synchronization. But it's a pool and spawning a new thread doesn't happen on each call. So I guess the thread was created when processing some earlier transaction, and it now got reused.