Skip to content

Adds support for RDMA_VERBS_IOCTL#11

Draft
sodar wants to merge 110 commits intodpdk-rrfrom
rdma-verbs-ioctl
Draft

Adds support for RDMA_VERBS_IOCTL#11
sodar wants to merge 110 commits intodpdk-rrfrom
rdma-verbs-ioctl

Conversation

@sodar
Copy link
Owner

@sodar sodar commented Apr 11, 2021

No description provided.

@sodar sodar self-assigned this Apr 11, 2021
Keno and others added 29 commits April 13, 2021 13:52
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.
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.
rocallahan and others added 29 commits June 14, 2021 16:35
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.
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.
@sodar sodar force-pushed the rdma-verbs-ioctl branch from 231a3f9 to 7797753 Compare July 2, 2021 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.