When using RR with gdb 7.12.1 to debug the 'opt' binary in LLVM I get weird errors:
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp, linux
- Domain
- devtools, operating-systems
Research direction
Reproduce the recorded crash with the shown rr record command, then run rr replay using gdb 7.12.1 and collect the GdbConnection log referenced in the issue. Compare the replay state and backtrace with the original assertion; done means identifying the cause of the unusable replay or documenting a confirmed compatibility fix.
Written by the indexing model from the issue text.
Description
I have a buggy binary, it assert fails:
% rr record ./dbg/bin/opt -S -passes=inline,argpromotion -o - /home/chandlerc/src/llvm.git/test/Transforms/ArgumentPromotion/crash.ll
rr: Saving execution to trace directory `/home/chandlerc/.local/share/rr/opt-1'.
opt: ../../lib/Analysis/LazyCallGraph.cpp:1692: void llvm::LazyCallGraph::removeDeadFunction(llvm::Function &): Assertion `RC.Parents.empty() && "Cannot have parents of a dead RefSCC!"' failed.
#0 0x00000000043275bc llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/chandlerc/src/llvm.git/build/dbg/../../lib/Support/Unix/Signals.inc:402:11
#1 0x0000000004327ba9 PrintStackTraceSignalHandler(void*) /home/chandlerc/src/llvm.git/build/dbg/../../lib/Support/Unix/Signals.inc:466:1
#2 0x00000000043246e7 llvm::sys::RunSignalHandlers() /home/chandlerc/src/llvm.git/build/dbg/../../lib/Support/Signals.cpp:0:5
#3 0x0000000004327f30 SignalHandler(int) /home/chandlerc/src/llvm.git/build/dbg/../../lib/Support/Unix/Signals.inc:256:1
#4 0x00007f586a086030 __restore_rt (/lib64/libpthread.so.0+0x11030)
#5 0x0000000070000002
Stack dump:
0. Program arguments: ./dbg/bin/opt -S -passes=inline,argpromotion -o - /home/chandlerc/src/llvm.git/test/Transforms/ArgumentPromotion/crash.ll
zsh: abort rr record ./dbg/bin/opt -S -passes=inline,argpromotion -o -
When I go to replay:
% rr replay
GNU gdb (Gentoo 7.12.1 vanilla) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/chandlerc/.local/share/rr/latest-trace/mmap_clone_4_opt...done.
Really redefine built-in command "restart"? (y or n) [answered Y; input not from terminal]
>>> >>> >>> >>> ... ... >>> ... ... >>> ... ... ...
>>>
Remote debugging using :33958
warning: unable to open /proc file '/proc/33946/task/33946/maps'
warning: remote target does not support file transfer, attempting to access files from local filesystem.
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
0x00007f586a292bc0 in ?? () from /lib64/ld-linux-x86-64.so.2
(rr) bt
#0 0x00007f586a292bc0 in ?? () from /lib64/ld-linux-x86-64.so.2
#1 0x0000000000000006 in ?? ()
#2 0x00007ffcf349d7b9 in ?? ()
#3 0x00007ffcf349d7c7 in ?? ()
#4 0x00007ffcf349d7ca in ?? ()
#5 0x00007ffcf349d7e6 in ?? ()
#6 0x00007ffcf349d7e9 in ?? ()
#7 0x00007ffcf349d7eb in ?? ()
#8 0x0000000000000000 in ?? ()
(rr) r
0x00007f586a292bc3 in ?? () from /lib64/ld-linux-x86-64.so.2
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/chandlerc/.local/share/rr/opt-1/mmap_clone_4_opt
warning: unable to open /proc file '/proc/33946/task/33946/maps'
Program stopped.
0x00007f586a292bc0 in ?? () from /lib64/ld-linux-x86-64.so.2
(rr) bt
#0 0x00007f586a292bc0 in ?? () from /lib64/ld-linux-x86-64.so.2
#1 0x0000000000000006 in ?? ()
#2 0x00007ffcf349d7b9 in ?? ()
#3 0x00007ffcf349d7c7 in ?? ()
#4 0x00007ffcf349d7ca in ?? ()
#5 0x00007ffcf349d7e6 in ?? ()
#6 0x00007ffcf349d7e9 in ?? ()
#7 0x00007ffcf349d7eb in ?? ()
#8 0x0000000000000000 in ?? ()
(rr) q
RR version is master 9961466.
Adding RR_LOG=GdbConnection based on what was suggested in another issue shows (in a gist due to size): https://gist.github.com/8d4ab83290063fc74b08f68c3181d8a7
Let me know if I can provide more details!
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rr-debugger/rr
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rr-debugger/rr#4096 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rr-debugger/rr#4093 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rr-debugger/rr#4090 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rr-debugger/rr#4060 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rr-debugger/rr#4059 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·