Bug 254080 - 12.2-RELEASE lldb crashes with print command
Summary: 12.2-RELEASE lldb crashes with print command
Status: Closed DUPLICATE of bug 248745
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Dimitry Andric
Depends on:
Reported: 2021-03-07 02:16 UTC by ota
Modified: 2021-03-15 02:31 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description ota 2021-03-07 02:16:57 UTC
lldb crashes with print command on 12.2-RELEASE on booth i386 and amd64.
13-BETA prints 1 fine.

% cat main.c 
int main()
% cc -g main.c 
% lldb ./a.out 
(lldb) target create "./a.out"
Current executable set to '/export/home/hiro/devel/mdb/hisqry/a.out' (i386).
(lldb) b main
Breakpoint 1: where = a.out`main + 5 at main.c:3:1, address = 0x00401765
(lldb) run
Process 23215 launching
Process 23215 launched: '/export/home/hiro/devel/mdb/hisqry/a.out' (i386)
Process 23215 stopped
* thread #1, name = 'a.out', stop reason = breakpoint 1.1
    frame #0: 0x00401765 a.out`main at main.c:3:1
   1    int main()
   2    {
-> 3    }
(lldb) p 1
Program aborted due to an unhandled Error:
Program aborted due to an unhandled Error:
Error value was Success. (Note: Success values must still be checked prior to being destroyed).
Stack dump:
0.      Program arguments: lldb ./a.out 
1.      HandleCommand(command = "p 1")
#0 0x03aa6a24 PrintStackTrace /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13
#1 0x03aa6e2e /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:624:3
#2 0x03aa4aee RunSignalHandlers /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:67:5
#3 0x03aa72f8 SignalHandler /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
#4 0x24667c49 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:248:3
Comment 1 Dimitry Andric freebsd_committer 2021-03-11 10:25:58 UTC
I can reproduce this, on 12.2-p4. Indeed later versions work fine, but it'll take some time to track down.
Comment 2 Dimitry Andric freebsd_committer 2021-03-11 10:46:09 UTC
Ah, so this is actually a duplicate of bug 248745, which I fixed in base r364480. However, I forgot to MFC it in time for 12.2-RELEASE, so it was fixed after that for stable/12 in base r367228.

Ed, do you think this would warrant an EN? I don't think lldb is completely unusable in 12.2-R, as other debugging commands appear to work OK, but this is still an annoying bug.
Comment 3 ota 2021-03-15 00:34:12 UTC

I locally applied the patch and confirmed working okay on 12.2.
Comment 4 Ed Maste freebsd_committer 2021-03-15 01:00:15 UTC
> Ed, do you think this would warrant an EN?

This seems reasonable, we can include it when we have other EN/SAs to release.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-03-15 02:31:34 UTC

 - Close DUPLICATE, re-opening duplicated issue for subsequent EN
 - Assign to committer that resolved (identified dupe)

*** This bug has been marked as a duplicate of bug 248745 ***