Open nolange opened 5 months ago
probably more related to libunwind
or libc++-abi
. dont think I can add labels?
replicated with a base debian bookworm container using clang/libc++/libunwind version 14. This also means a more complete stacktrace:
#0 0x0000000000000000 in ?? ()
#1 0x00007f70fc3b1baa in unw_get_proc_info () at build-llvm/tools/clang/stage2-bins/runtimes/runtimes-bins/libunwind/src/libunwind.cpp:188
#2 0x00007f70fc3b588c in _Unwind_GetLanguageSpecificData () at build-llvm/tools/clang/stage2-bins/runtimes/runtimes-bins/libunwind/src/UnwindLevel1.c:478
#3 0x00007f70fc3a001d in scan_eh_tab () at build-llvm/tools/clang/stage2-bins/runtimes/runtimes-bins/libcxxabi/src/cxa_personality.cpp:617
#4 __gxx_personality_v0 () at build-llvm/tools/clang/stage2-bins/runtimes/runtimes-bins/libcxxabi/src/cxa_personality.cpp:947
#5 0x00007f70fc28fab6 in _Unwind_ForcedUnwind_Phase2 (exc=exc@entry=0x7f70fc092d30, context=context@entry=0x7f70fc091650,
frames_p=frames_p@entry=0x7f70fc091558) at ../../../src/libgcc/unwind.inc:183
#6 0x00007f70fc2901b0 in _Unwind_ForcedUnwind (exc=0x7f70fc092d30, stop=0x7f70fc1272c0 <unwind_stop>, stop_argument=<optimized out>)
at ../../../src/libgcc/unwind.inc:218
#7 0x00007f70fc127440 in __GI___pthread_unwind (buf=<optimized out>) at ./nptl/unwind.c:130
#8 0x00007f70fc11d73b in __do_cancel () at ../sysdeps/nptl/pthreadP.h:282
#9 sigcancel_handler (sig=32, si=0x7f70fc0918f0, ctx=<optimized out>) at ./nptl/pthread_cancel.c:65
#10 sigcancel_handler (sig=<optimized out>, si=0x7f70fc0918f0, ctx=<optimized out>) at ./nptl/pthread_cancel.c:32
#11 <signal handler called>
#12 0x00007f70fc165485 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x7f70fc091db8, rem=0x7f70fc091db8)
at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
#13 0x00007f70fc169d93 in __GI___nanosleep (req=<optimized out>, rem=<optimized out>) at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#14 0x00007f70fc41df9b in __libcpp_thread_sleep_for () at build-llvm/tools/clang/stage2-bins/include/c++/v1/__threading_support:411
#15 sleep_for () at build-llvm/tools/clang/stage2-bins/runtimes/runtimes-bins/libcxx/src/thread.cpp:108
#16 0x000055bf7ab29a5e in void std::__1::this_thread::sleep_for<long long, std::__1::ratio<1l, 1l> >(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1l> > const&) ()
#17 0x000055bf7ab297fd in main::$_0::operator()() const ()
#18 0x000055bf7ab29795 in decltype ((static_cast<main::$_0>({parm#1}))()) std::__1::__invoke<main::$_0>(main::$_0&&) ()
#19 0x000055bf7ab29775 in void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, main::$_0>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, main::$_0>&, std::__1::__tuple_indices<>) ()
#20 0x000055bf7ab29532 in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, main::$_0> >(void*) ()
#21 0x00007f70fc11f134 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#22 0x00007f70fc19f7dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
libunwind / libc++ / clang : 18.1.2-1 from debian libgcc : 12.2.0-14 from debian
The following program will reproduce the SEGFAULT:
adding
-rtlib=compiler-rt
and/or-unwindlib=libgcc
did not affect the issue, removingstdlib=libc++
fixes the problem.I tried replicating the issue with a C program and
LD_PRELOAD="libc++.so.1:libc++abi.so.1:libunwind.so.1:libgcc_s.so.1"
but did not manage to reproduceRuntime dependencies are:
Stacktrace: