-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rr sometimes breaks traces of dynamically loaded .so libraries #3845
Comments
By broken stacks you mean that the trace replays fine just the backtrace in gdb is wrong? The "Not safe to deliver signal" log message just means we were in some part of the syscallbuf code (what the -n argument disables) that expects to run atomically when we tried to deliver that signal (we use SIGSTKFLT internally for context switches) and we had to defer it to a safe place before delivering it. |
Yes, it seems to replay fine. I replay it to the end, then breakpoint and reverse-continue. On the breakpoint I examine threads' stack traces. Everything from the executable is fine, but the frames from .so library are not unwinding. So I tried Now what only difference I can see from grepped by "signal" logs is: signal-bad.log
signal-good.log
It is different terminate procedure. Good is just stopped by Ctrl+C, while bad goes through SIGTERM. How SIGTERM is turned into SIGUSR1 I don't understand. Maybe it is internal rr hack to avoid its own SIGTERM. But I see nowhere SIGUSR1 in our code that might be sent during shutdown process. |
I just noticed that on Bad there is no subject .so in Bad(rr) info shared
From To Syms Read Shared Object Library
0x00007ed5e6804000 0x00007ed5e682d455 Yes /lib64/ld-linux-x86-64.so.2
0x00007ed5e67eb080 0x00007ed5e67f1ca9 Yes /usr/bin/../lib/rr/librrpreload.so
0x00007ed5e67ba040 0x00007ed5e67ba105 Yes /lib/x86_64-linux-gnu/libdl.so.2
0x00007ed5e67242e0 0x00007ed5e678e1cf Yes (*) /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
0x00007ed5e66ea040 0x00007ed5e66fd97b Yes (*) /lib/x86_64-linux-gnu/libcrypt.so.1
0x00007ed5e66c9180 0x00007ed5e66e3e8c Yes (*) /usr/lib/x86_64-linux-gnu/liblz4.so.1
0x00007ed5e6695400 0x00007ed5e66b65ef Yes (*) /usr/lib/x86_64-linux-gnu/liblzma.so.5
0x00007ed5e668e0a0 0x00007ed5e668e5eb Yes (*) /usr/lib/x86_64-linux-gnu/libaio.so.1
0x00007ed5e6683800 0x00007ed5e6688822 Yes (*) /usr/lib/x86_64-linux-gnu/libnuma.so.1
0x00007ed5e6664280 0x00007ed5e6676103 Yes (*) /usr/lib/x86_64-linux-gnu/libz.so.1
0x00007ed5e65863c0 0x00007ed5e6605878 Yes /lib/x86_64-linux-gnu/libm.so.6
0x00007ed5e62a55c0 0x00007ed5e63e4ce2 Yes (*) /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0x00007ed5e654a780 0x00007ed5e656d745 Yes (*) /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
0x00007ed5e5e267c0 0x00007ed5e5fa45ad Yes /lib/x86_64-linux-gnu/libc.so.6 Good(rr) info shared
From To Syms Read Shared Object Library
0x00000636f94d8000 0x00000636f9501455 Yes /lib64/ld-linux-x86-64.so.2
0x00000636f94bf080 0x00000636f94c5ca9 Yes /usr/bin/../lib/rr/librrpreload.so
0x00000636f948e040 0x00000636f948e105 Yes /lib/x86_64-linux-gnu/libdl.so.2
0x00000636f93f82e0 0x00000636f94621cf Yes (*) /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
0x00000636f93be040 0x00000636f93d197b Yes (*) /lib/x86_64-linux-gnu/libcrypt.so.1
0x00000636f939d180 0x00000636f93b7e8c Yes (*) /usr/lib/x86_64-linux-gnu/liblz4.so.1
0x00000636f9369400 0x00000636f938a5ef Yes (*) /usr/lib/x86_64-linux-gnu/liblzma.so.5
0x00000636f93620a0 0x00000636f93625eb Yes (*) /usr/lib/x86_64-linux-gnu/libaio.so.1
0x00000636f9357800 0x00000636f935c822 Yes (*) /usr/lib/x86_64-linux-gnu/libnuma.so.1
0x00000636f9338280 0x00000636f934a103 Yes (*) /usr/lib/x86_64-linux-gnu/libz.so.1
0x00000636f925a3c0 0x00000636f92d9878 Yes /lib/x86_64-linux-gnu/libm.so.6
0x00000636f8ea55c0 0x00000636f8fe4ce2 Yes (*) /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0x00000636f921e780 0x00000636f9241745 Yes (*) /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
0x00000636f8a267c0 0x00000636f8ba45ad Yes /lib/x86_64-linux-gnu/libc.so.6
0x00000636f05dcc00 0x00000636f070cefc Yes /home/midenok/src/mariadb/10.5b/build/mysql-test/var/plugins/ha_spider.so An attempt to load it fails:
But that is expected, I guess, as this is read-only session, though RR might print a better message. The problem is after |
I'm closing this bug as the original description is wrong and reopening a new one. |
While supplying full repro environment is hard I will try to explain what do we have. There are 2 methods of running rr in our testing environment: good and bad. The bad environment is the complex one: we run rr under several perl scripts forked each other. The good environment is the simple one: only rr and debugged program. But rr arguments are similar in both runs.
The bad envirnment produces broken stacks like this:
Broken stacktrace
Logging with:
produces following differences:
bad.log
good.log
Full logs attached.
full-logs.zip
signal-bad.log
signal-good.log
Can you please give an insight of what may cause
Not safe to deliver signal
and why this results into broken trace.The text was updated successfully, but these errors were encountered: