Bug 260910 - lldb crash on amd64 with "bt all" in threaded program that generates SIGBUS.
Summary: lldb crash on amd64 with "bt all" in threaded program that generates SIGBUS.
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-03 16:39 UTC by Shawn Michael
Modified: 2022-01-03 16:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Michael 2022-01-03 16:39:20 UTC
lldb asked me to submit this bug report so I am.   I am debugging some modifications I'm making to fluent-bit.  fluent-bit is a threaded C program.

The FreeBSD box is running under KVM (up to date Ubuntu 20.04 host) on workstation hardware with ECC RAM.

I've had lldb crash on me a few times now.  Below is the latest output from the full run minus the program output.


#  lldb --arch x86_64 -- /usr/local/bin/fluent-bit -c /usr/local/etc/fluent-bit/fluent-bit.conf -s 4096
(lldb) target create --arch=x86_64 "/usr/local/bin/fluent-bit"
Current executable set to '/usr/local/bin/fluent-bit' (x86_64).
(lldb) settings set -- target.run-args  "-c" "/usr/local/etc/fluent-bit/fluent-bit.conf" "-s" "4096"
(lldb) run
Process 16204 launching
Process 16204 launched: '/usr/local/bin/fluent-bit' (x86_64)

.... fluent-bit output .....

Process 16204 stopped
* thread #2, name = 'fluent-bit', stop reason = signal SIGBUS: hardware error
    frame #0: 0x0000000800c28945 libc.so.7`files_servent(retval=0x0000000801a6e400, mdata=0x0000000800f92210, ap=0x0000000801a6e400) at getservent.c:281:26
(lldb) bt all
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace.
Stack dump:
0.	Program arguments: lldb --arch x86_64 -- /usr/local/bin/fluent-bit -c /usr/local/etc/fluent-bit/fluent-bit.conf -s 4096 
1.	HandleCommand(command = "bt all")
2.	HandleCommand(command = "thread backtrace all")
#0 0x0000000003ae7aee PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13
#1 0x0000000003ae5fa5 RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:69:18
#2 0x0000000003ae8060 SignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
#3 0x0000000804c35e00 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3
Abort trap