Bug 446401 - unhandled series of rr-specific syscalls
Summary: unhandled series of rr-specific syscalls
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.18.1
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-03 02:59 UTC by Jim Garrison
Modified: 2022-01-07 10:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Garrison 2021-12-03 02:59:05 UTC
SUMMARY

Valgrind complains about unimplemented syscalls when it encounters system calls specific to rr (the record and replay framework)

STEPS TO REPRODUCE
1. I'm running portions of the Julia test suite under valgrind, following the instructions at https://docs.julialang.org/en/v1/devdocs/valgrind/#Running-the-Julia-test-suite-under-Valgrind (for the purposes here, `all` can be replaced by a much simpler set of tests, such as `tuple`).

OBSERVED RESULT

valgrind succeeds, but emits the following warning:

--114742-- WARNING: unhandled amd64-linux syscall: 1008
--114742-- You may be able to write your own handler.
--114742-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--114742-- Nevertheless we consider this a bug.  Please report
--114742-- it at http://valgrind.org/support/bug_reports.html.

The README_MISSING_SYSCALL_OR_IOCTL document instructs me to run `grep 1008 /usr/include/asm/unistd*.h`, but this turns up nothing.

Turns out, julia is making this syscall to determine whether it is running under rr: https://github.com/JuliaLang/julia/blob/ed9ad60f0ce7cad38870b2bf9eede5dd7a4b706f/test/runtests.jl#L17-L20

There are a number of rr-specific syscalls that valgrind might want to either handle, ignore, or display a *different*, more informative warning about: https://github.com/rr-debugger/rr/blob/b8566d29a78d798d547e520fcaaa217a241430e0/src/syscalls.py#L1736-L1747

EXPECTED RESULT

No warning emitted would be ideal.
Comment 1 Jim Garrison 2021-12-05 04:08:51 UTC
I found a more descriptive list of the rr-specific syscalls.  It seems it should be safe to ignore 1008, specifically, under Valgrind.

https://github.com/rr-debugger/rr/blob/878f756966c660a6e838cbf3516f953e586b9edc/src/preload/rrcalls.h#L68-L75