rr not saving stack trace correctly

46 views
Skip to first unread message

Jim Leek

unread,
Oct 15, 2021, 5:40:56 PM10/15/21
to rr-devel

I have a memory bug in a very complex C++ program.  It's intermittent, so rr seems like it would really help to track it down. 
So I installed rr on my RHEL 8 box.  My program is build with -g -O0, and works with gdb correctly.  At least, if I interrupt the process I can see the stack as expected.  (The memory problem rarely manifests under gdb.)

So I ran:
$ rr record myprog <myargs>
rr: Saving execution to trace directory `/home/leek2/.local/share/rr/myprog-6
...
Assertion `0' failed.
Aborted
----
$ rr replay
Reading symbols from /home/leek2/.local/share/rr/myprog-6/mmap_clone_3_myprog.
..done.
Really redefine built-in command "restart"? (y or n) [answered Y; input not from
 terminal]
Remote debugging using 127.0.0.1:2208
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found).
..done.
0x00007f9424c16fa0 in _start () from /lib64/ld-linux-x86-64.so.2
Missing separate debuginfos, use: yum debuginfo-install glibc-2.28-151.el8.x86_6
4
(rr) where
#0  0x00007f9424c16fa0 in _start () from /lib64/ld-linux-x86-64.so.2
#1  0x0000000000000018 in ?? ()
#2  0x00007ffcec0c15d2 in ?? ()
#3  0x00007ffcec0c15da in ?? ()
#4  0x00007ffcec0c15ea in ?? ()
#5  0x00007ffcec0c161a in ?? ()
#6  0x00007ffcec0c1648 in ?? ()
#7  0x00007ffcec0c164b in ?? ()
-------------------------------------------
As I said, this '??' stuff doesn't happen with gdb.  I ran with rr 5.4.0 installed from the redhat yum repos, and I built my own rr 5.5.0.  Both exhibit this problem.  Does anyone know what might cause it?

Thanks,
Jim

Jim Leek

unread,
Oct 15, 2021, 6:03:20 PM10/15/21
to rr-devel
A friend of mine suggested the solution, to put a breakpoint in main, then hit 'n'.  I assumed that I would either start from the failure point (like a core file) or the beginning and hit 'run' to get to the end.  But neither of those worked.  Is there more documentation than just the README around somewhere?

Thanks,
Jim

Kyle Huey

unread,
Oct 17, 2021, 9:14:04 AM10/17/21
to Jim Leek, rr-devel
--
You received this message because you are subscribed to the Google Groups "rr-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rr-devel+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rr-devel/4ac662df-2659-4d97-8ed2-60c3e7db69dan%40googlegroups.com.

When you run a program under gdb, you get a chance to set breakpoints/etc before you start running the program. rr stops immediately after the first execve in ld's _start for the same purpose. You want to `continue`, not `run`, to proceed from there.

- Kyle
Reply all
Reply to author
Forward
0 new messages