Closed cstrahan-blueshift closed 2 years ago
I think you are hitting the same issue as #305, for which there is no real good solution. The problem is that parking_lot itself needs to allocate memory, which is a problem if the allocator uses parking_lot.
Ah, I see! I'll explore resolution from dhat
's end then, thanks!
My system:
I originally opened an issue here (but I'll recap below): https://github.com/nnethercote/dhat-rs/issues/25
I noticed that when using
dhat
andmoka
together, the process would hang somewhere inmoka::sync::Cache::new()
(ormoka::future::Cache::new()
).Here's a small reproducer: https://github.com/cstrahan-blueshift/dhat_moka_hang_repro
Run
cargo run --release
and it'll hang about 1 in 10 times.I took a look at the stack with
gdb
, and this is where it would hang:So I tried swapping
parking_lot::Mutex
withstd::sync::Mutex
, and the problem went away. So I suspect there's a very subtle bug inparking_lot
'sMutex
implementation.I'd be more than happy to provide any additional information that could be helpful for diagnosing this.