We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm having a similar issue to #25 where my program, when running with the dhat allocator hangs.
This seems related to backtrace collection:
(lldb) thread b 2 thread #2, name = 'test_bgp_origin' frame #0: 0x000055555585d6dc dhat_bgp_originate-f82b65681502d053`mintex::Mutex$LT$T$GT$::lock::h72ad4838d4d3a11d(self=0x0000555556bb0330) at lib.rs:65:19 frame #1: 0x000055555583e02b dhat_bgp_originate-f82b65681502d053`_$LT$dhat..Alloc$u20$as$u20$core..alloc..global..GlobalAlloc$GT$::realloc::h09bd1dadf21796a0(self=0x000055555672a2ab, old_ptr="\U00000001", layout=Layout @ 0x00007ffff7cc81e8, new_size=3584) at lib.rs:1251:51 frame #2: 0x0000555555819683 dhat_bgp_originate-f82b65681502d053`__rust_realloc(arg0="\U00000001", arg1=1792, arg2=8, arg3=3584) at dhat_bgp_originate.rs:40:15 frame #3: 0x000055555666a29a dhat_bgp_originate-f82b65681502d053`alloc::alloc::Global::grow_impl::hd18a19f867acb51a [inlined] alloc::alloc::realloc::h964c149612511afa(ptr="\U00000001", layout=Layout @ 0x00007ffff7cc8518, new_size=3584) at alloc.rs:140:14 frame #4: 0x000055555666a24c dhat_bgp_originate-f82b65681502d053`alloc::alloc::Global::grow_impl::hd18a19f867acb51a(self=0x00007ffff7cc9158, ptr=(pointer = "\U00000001"), old_layout=Layout @ 0x00007ffff7cc84e8, new_layout=Layout @ 0x00007ffff7cc84f8, zeroed=false) at alloc.rs:217:31 frame #5: 0x000055555666a6b0 dhat_bgp_originate-f82b65681502d053`_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::grow::h6ca616e266c3d9bf(self=0x00007ffff7cc9158, ptr=(pointer = "\U00000001"), old_layout=Layout @ 0x00007ffff7cc8718, new_layout=Layout @ 0x00007ffff7cc8728) at alloc.rs:270:18 frame #6: 0x0000555556669522 dhat_bgp_originate-f82b65681502d053`alloc::raw_vec::finish_grow::h91c9a9cb3a8d6648(new_layout=Result<core::alloc::layout::Layout, core::alloc::layout::LayoutError> @ 0x00007ffff7cc8858, current_memory=Option<(core::ptr::non_null::NonNull<u8>, core::alloc::layout::Layout)> @ 0x00007ffff7cc8a00, alloc=0x00007ffff7cc9158) at raw_vec.rs:472:13 frame #7: 0x00005555565d2a29 dhat_bgp_originate-f82b65681502d053`alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::ha3a5dbf65c921676(self=0x00007ffff7cc9158, len=32, additional=1) at raw_vec.rs:404:19 frame #8: 0x00005555565d3199 dhat_bgp_originate-f82b65681502d053`alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_for_push::hb8093cccd384d669(self=0x00007ffff7cc9158, len=32) at raw_vec.rs:302:24 frame #9: 0x00005555565d38ee dhat_bgp_originate-f82b65681502d053`alloc::vec::Vec$LT$T$C$A$GT$::push::h4ef4cacd71132877(self=0x00007ffff7cc9158, value=BacktraceFrame @ 0x00007ffff7cc8c60) at mod.rs:1828:13 frame #10: 0x00005555565cc1da dhat_bgp_originate-f82b65681502d053`anyhow::backtrace::capture::Backtrace::create::_$u7b$$u7b$closure$u7d$$u7d$::h1d20a3049ba382a1(frame=0x00007ffff7cc8d40) at backtrace.rs:217:17 frame #11: 0x00005555565f0943 dhat_bgp_originate-f82b65681502d053`core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::hd906021a43fd6b3a(self=0x00007ffff7cc9098, args=(&backtrace::backtrace::Frame) @ 0x00007ffff7cc8d08) at function.rs:294:13 frame #12: 0x000055555660fb70 dhat_bgp_originate-f82b65681502d053`backtrace::backtrace::libunwind::trace::trace_fn::h2d05dcca6e0b2934(ctx=0x00007ffff7cc8dd0, arg=0x00007ffff7cc9098) at libunwind.rs:105:26 frame #13: 0x00007ffff7fa6664 libgcc_s.so.1`_Unwind_Backtrace + 212 frame #14: 0x00005555565ca50a dhat_bgp_originate-f82b65681502d053`backtrace::backtrace::trace_unsynchronized::hc4aaf54ef431d84c [inlined] backtrace::backtrace::libunwind::trace::h4252170f1a5aeec7(cb=&mut dyn core::ops::function::FnMut<(&backtrace::backtrace::Frame), Output=bool> @ 0x00007ffff7cc9098) at libunwind.rs:93:5 frame #15: 0x00005555565ca4f5 dhat_bgp_originate-f82b65681502d053`backtrace::backtrace::trace_unsynchronized::hc4aaf54ef431d84c(cb=<unavailable>) at mod.rs:66:5 frame #16: 0x00005555565ca5b2 dhat_bgp_originate-f82b65681502d053`backtrace::backtrace::trace::h83cd1b0fb300834b(cb={closure_env#0} @ 0x00007ffff7cc9180) at mod.rs:53:14 frame #17: 0x00005555565cbf9e dhat_bgp_originate-f82b65681502d053`anyhow::backtrace::capture::Backtrace::create::h4febc7bf8250ab2a(ip=93825009499872) at backtrace.rs:216:13 frame #18: 0x00005555565cbf24 dhat_bgp_originate-f82b65681502d053`anyhow::backtrace::capture::Backtrace::capture::heffd32e41bc285a0 at backtrace.rs:204:17 frame #19: 0x000055555655e85f dhat_bgp_originate-f82b65681502d053`anyhow::private::new_adhoc::hb6e92295a89bc5aa(message=(data_ptr = "no event in sys channel", length = 23)) at lib.rs:632:36 [snip]
The other thread:
(lldb) thread b 3 thread #3, name = 'flockd mock' frame #0: 0x00007ffff7dd0539 libc.so.6`syscall + 25 frame #1: 0x0000555555706e84 dhat_bgp_originate-f82b65681502d053`std::sys::unix::locks::futex_mutex::Mutex::lock_contended::hbeb97827cd69d2db [inlined] std::sys::unix::futex::futex_wait::h3942933e6d137880 at futex.rs:62:21 frame #2: 0x0000555555706e40 dhat_bgp_originate-f82b65681502d053`std::sys::unix::locks::futex_mutex::Mutex::lock_contended::hbeb97827cd69d2db at futex_mutex.rs:56:13 frame #3: 0x000055555663759b dhat_bgp_originate-f82b65681502d053`std::sys::unix::locks::futex_mutex::Mutex::lock::h017642c2a4c9b3f7(self=0x00007ffff0000d30) at futex_mutex.rs:28:13 frame #4: 0x00005555565e9365 dhat_bgp_originate-f82b65681502d053`std::sync::mutex::Mutex$LT$T$GT$::lock::haed0e33a58df9efe(self=0x00007ffff0000d30) at mutex.rs:273:13 frame #5: 0x000055555663b1b8 dhat_bgp_originate-f82b65681502d053`backtrace::lock::lock::hfe5d8a30ad1f16b6 at lib.rs:185:28 frame #6: 0x00005555558465dc dhat_bgp_originate-f82b65681502d053`backtrace::backtrace::trace::hb176e61194442b59(cb=<unavailable>) at mod.rs:52:18 frame #7: 0x000055555583d776 dhat_bgp_originate-f82b65681502d053`dhat::new_backtrace_inner::h6d115f8baa267306(trim_backtraces=Option<usize> @ 0x00007ffff7ab6d70, frames_to_trim=0x0000555556bb0418) at lib.rs:1192:5 frame #8: 0x000055555583de25 dhat_bgp_originate-f82b65681502d053`_$LT$dhat..Alloc$u20$as$u20$core..alloc..global..GlobalAlloc$GT$::alloc::h02222c84985aaf7e(self=0x000055555672a2ab, layout=Layout @ 0x00007ffff7ab6e98) at lib.rs:1235:26 frame #9: 0x00005555558195b3 dhat_bgp_originate-f82b65681502d053`__rust_alloc(arg0=1120, arg1=8) at dhat_bgp_originate.rs:40:15 frame #10: 0x000055555647c54e dhat_bgp_originate-f82b65681502d053`alloc::alloc::Global::alloc_impl::hc97dea3396771259 [inlined] alloc::alloc::alloc::hbf20be51a0187697(layout=Layout @ 0x00007ffff7ab70d0) at alloc.rs:102:9 frame #11: 0x000055555647c4e1 dhat_bgp_originate-f82b65681502d053`alloc::alloc::Global::alloc_impl::hc97dea3396771259(self=0x00007ffff7ab79d8, layout=Layout @ 0x00007ffff7ab7080, zeroed=false) at alloc.rs:185:73 frame #12: 0x000055555647ce49 dhat_bgp_originate-f82b65681502d053`_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::h1487027bb14d76e9(self=0x00007ffff7ab79d8, layout=Layout @ 0x00007ffff7ab7268) at alloc.rs:245:9 frame #13: 0x0000555556482887 dhat_bgp_originate-f82b65681502d053`alloc::raw_vec::finish_grow::h261ffb947d013934(new_layout=Result<core::alloc::layout::Layout, core::alloc::layout::LayoutError> @ 0x00007ffff7ab7398, current_memory=Option<(core::ptr::non_null::NonNull<u8>, core::alloc::layout::Layout)> @ 0x00007ffff7ab7540, alloc=0x00007ffff7ab79d8) at raw_vec.rs:475:9 frame #14: 0x0000555556012249 dhat_bgp_originate-f82b65681502d053`alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::h1b339c7e73182694(self=0x00007ffff7ab79d8, len=0, additional=1) at raw_vec.rs:404:19 frame #15: 0x0000555556039c69 dhat_bgp_originate-f82b65681502d053`alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_for_push::h884425a82cdf927b(self=0x00007ffff7ab79d8, len=0) at raw_vec.rs:302:24 frame #16: 0x0000555556169f81 dhat_bgp_originate-f82b65681502d053`alloc::collections::vec_deque::VecDeque$LT$T$C$A$GT$::grow::h76670ef032cb9192(self=0x00007ffff7ab79d8) at mod.rs:2061:9 frame #17: 0x000055555616e36a dhat_bgp_originate-f82b65681502d053`alloc::collections::vec_deque::VecDeque$LT$T$C$A$GT$::push_back::h901b552c9d675eeb(self=0x00007ffff7ab79d8, value=BgpConfEvent @ 0x00007ffff7ab7c28) at mod.rs:1659:13 [snip]
Running with RUST_BACKTRACE=0 fixes the problem.
RUST_BACKTRACE=0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I'm having a similar issue to #25 where my program, when running with the dhat allocator hangs.
This seems related to backtrace collection:
The other thread:
Running with
RUST_BACKTRACE=0
fixes the problem.The text was updated successfully, but these errors were encountered: