llvm / llvm/llvm-project

LLDB crashes when testing "debug" build with ctest (libjxl)

Open
#167,853 3 comments 0 reactions 0 assignees View on GitHub
crash lldb
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

I was hoping to find out why tests fail under ctest, but work well when executed manually. But got lldb crash.
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
#0 0x0000558824f14e4b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/lldb+0x38e4b)
#1 0x0000558824f126da SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x00007f54e9049df0 (/lib/x86_64-linux-gnu/libc.so.6+0x3fdf0)
#3 0x00007f54e9118779 syscall ./misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S:38:0
#4 0x00007f54ea757a62 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#5 0x00007f54e9049df0 (/lib/x86_64-linux-gnu/libc.so.6+0x3fdf0)
#6 0x00007f54ea1aa414 std::_Sp_counted_ptr::_M_dispose() (/usr/local/bin/../lib/liblldb.so.21.1+0xbaa414)
#7 0x00007f54e9e3f397 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (/usr/local/bin/../lib/liblldb.so.21.1+0x83f397)
#8 0x00007f54ea1e0c7c lldb_private::Thread::GetStopDescriptionRaw[abi:cxx11]() (/usr/local/bin/../lib/liblldb.so.21.1+0xbe0c7c)
#9 0x00007f54ea1e0dab lldb_private::Thread::GetStopDescription[abi:cxx11]() (/usr/local/bin/../lib/liblldb.so.21.1+0xbe0dab)
#10 0x00007f54e9fc7f3c lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) (/usr/local/bin/../lib/liblldb.so.21.1+0x9c7f3c)
#11 0x00007f54e9fc73e0 lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) (/usr/local/bin/../lib/liblldb.so.21.1+0x9c73e0)
#12 0x00007f54e9fc84f8 lldb_private::FormatEntity::Format(lldb_private::FormatEntity::Entry const&, lldb_private::Stream&, lldb_private::SymbolContext const*, lldb_private::ExecutionContext const*, lldb_private::Address const*, lldb_private::ValueObject*, bool, bool) (/usr/local/bin/../lib/liblldb.so.21.1+0x9c84f8)
#13 0x00007f54ea003ce8 lldb_private::Statusline::Redraw(bool) (.part.0) Statusline.cpp:0:0
#14 0x00007f54e9fac4c1 lldb_private::Debugger::DefaultEventHandler() (/usr/local/bin/../lib/liblldb.so.21.1+0x9ac4c1)
#15 0x00007f54e9fac8ec std::_Function_handler::_M_invoke(std::_Any_data const&) Debugger.cpp:0:0
#16 0x00007f54ea080e5c lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) (/usr/local/bin/../lib/liblldb.so.21.1+0xa80e5c)
#17 0x00007f54e909cb7b start_thread ./nptl/pthread_create.c:448:8
#18 0x00007f54e911a7b8 __GI___clone3 ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80:0
Segmentation fault (core dumped)
```

Unfortunately, there is nothing to attach:
```
$ ls -la /tmp/diagnostics-620011
total 0
drwxr-x--- 2 eustas primarygroup 60 Nov 13 09:37 .
drwxrwxrwt 44 root root 1660 Nov 13 09:40 ..
-rw-r----- 1 eustas primarygroup 0 Nov 13 09:37 diagnostics.log
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by running the libjxl debug build through ctest and compare it with manually executed tests. Start with the LLDB crash backtrace, especially the status-line and stop-description frames, and check why no diagnostics are written. Done means the trigger and failure cause are identified with enough reproduction details for an LLDB fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.