Draft
Conversation
This fixes a rare interaction where a time slice signal arrives just as we are stepping out of a vsyscall (this can happen if counter overflows just before the vsyscall, but execution skids into the vsyscall - signal delivery only happens at the return to userspace, so the seccomp signal gets delivered first despite the actual overflow of the timeslice technically happening earlier), which would previously confuse rr into asserting. This failure is very rare. In three weeks of running ~40 simultaneous rr sessions, we've seen this once. Fixes JuliaLang/julia#39206
This adds an rrcall that lets the tracee override the next time slice duration and uses it to test the previously fixed interaction between time slice signals and vsyscall patching.
If the DW_AT_comp_dir is relative, we assume that it is relative to the directory containing the final binary.
…ory we can make relative DW_AT_comp_dirs relative to
On systemd systems, the latter is silently and confusingly ignored (see, approximately, systemd/systemd#12791). The former is compatible with non-systemd systems according to man 5 sysctl.conf, so we should suggest it instead as it works everywhere.
Confirmed to match on a laptop with an AMD Ryzen 7 5800HS, I expect it will also cover other 5000 H-, U- and G-series APUs.
When dispatch_debugger_request() handles the DREQ_GET_MEM request, gdb can ask for a memory range that is invalid or partially valid. That is why a read_bytes_fallible() call is made. Depending on the actually number of bytes read, the `mem` buffer is resized. It could, for instance, be resized to 0 length. Then a maybe_intercept_mem_request() call is made. This function will always assume the memory range it needs to inspect (for writing a 0 word) is req.mem_.len long. However that is wrong -- it should be the the resized length of the buffer into which the read_bytes_fallible() call mentioned above wrote to.
Closes rr-debugger#2856.
This could lead to a spurious Event::patch_syscall() being added to trace. Also: - Don't print any LOG message that you've patched syscall unless you've already exit_syscall_and_prepare_restart()-ed successfully - Tweak LOG message. Use word "Patching" instead of "Patched" to account for situation in which patching may actually fail when attempted.
…r that was changed by 5c6e992)
Before: [roc@localhost code]$ time rr sources ~/pernosco/main/test-tmp/basics-demo >& ~/tmp/output2 real 3m19.648s user 1m9.157s sys 2m9.416s After: [roc@localhost code]$ time rr sources ~/pernosco/main/test-tmp/basics-demo >& ~/tmp/output2 real 0m36.160s user 0m36.009s sys 0m0.053s
By the commit 3857152 two new sections get now added to librrpage.so. Therefore the assumption to relocate sections 12 to 14 did not work anymore. Also, librrpage.so had one section more than librrpage_32.so. This patch assumes now, not much better but a little, that the last three sections are .symtab, .strtab and .shstrtab, and have to be relocated.
…DSO. Related commit: 3857152
… evade tracee seccomp filters
On Ubuntu 20.04, the libc6-lse package provides libc, pthreads, etc with LSE enabled. There's also an LSE-enabled ld.so, but it does not replace the default dynamic linker on the system, so every program on the system will use a non-LSE enabled ld.so. ld.so will use atomics in the presence of threads, so this precludes recording any program that uses threads. By forcing rr's test programs to use the LSE-enabled version of ld.so, our test suite can run successfully.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.