Skip to content
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

Early Draft: Add parameter to check if files are mapped in processes not part of the recording. #3419

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bernhardu
Copy link
Contributor

In its current state it just calls lsof with the pids inside the the recording excluded.

It would show the mapping that caused the issue in #3417,
but the others are probably just read-only mappings due to /proc/pid/maps.

$ rr record --lsof -n atril sshfs/home/benutzer/test2.pdfrr: Saving execution to trace directory `/home/bernhard/data/entwicklung/2022/rr/rr-recordings/atril-14'.
Warning: /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /home/bernhard/.cache/fontconfig/a6050266-6adb-4e1c-8a1d-f55d18a3f9c3-le64.cache-7 seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /run/user/1000/dconf/user seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /home/bernhard/.local/share/mime/mime.cache seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /usr/local/share/mime/mime.cache seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /usr/share/mime/mime.cache seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /home/bernhard/.local/share/gvfs-metadata/root seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
Warning: /home/bernhard/.local/share/gvfs-metadata/root-5c301c7a.log seems to be mapped by a process outside of the recording. Diversions might happen when replaying this trace.
...

@bernhardu
Copy link
Contributor Author

bernhardu commented Feb 15, 2023

The call to system() might be ugly to dangerous. lsof seems to want in the long term to make it available as library.
Would the license allow it?

@rocallahan
Copy link
Collaborator

This would be a cool feature to have but rather than calling lsof I think we would want to reimplement the functionality by scanning /proc/.../maps.

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.

None yet

2 participants