You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe a deadlock can occur when one thread is making allocations while another thread is directly performing trace unwinding using backtrace-rs and also needs to allocate.
So, thread 1 acquires a lock with the following path: step 1 step 2 step 3
And thread 2 acquires the lock in the opposite order. step 1 step 2
It's interesting to note that using the backtrace-rs API with its inner lock is a bit weird because std also uses backtrace-rs for thread unwinding (link 1, link 2), but it employs a different lock for this purpose. Consequently, the lock inside backtrace-rs doesn't ensure exclusive access to its internals.
The text was updated successfully, but these errors were encountered:
I believe a deadlock can occur when one thread is making allocations while another thread is directly performing trace unwinding using
backtrace-rs
and also needs to allocate.So, thread 1 acquires a lock with the following path:
step 1
step 2
step 3
And thread 2 acquires the lock in the opposite order.
step 1
step 2
It's interesting to note that using the
backtrace-rs
API with its inner lock is a bit weird becausestd
also usesbacktrace-rs
for thread unwinding (link 1, link 2), but it employs a different lock for this purpose. Consequently, the lock insidebacktrace-rs
doesn't ensure exclusive access to its internals.The text was updated successfully, but these errors were encountered: