-
Notifications
You must be signed in to change notification settings - Fork 431
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
Running inside a docker container with same namespace #199
Comments
|
Thanks for the bug report! I think I've managed to figure out what is going on here and will have a bug fix out soon. The setns call is failing with EINVAL because py-spy has multiple threads now with the subprocess profiling code - and setns doesn't seem to work in a multithreaded program: ("EINVAL: The caller is multithreaded and tried to join a new user namespace"). It looks like rbspy reads files from /proc/{pid}/root instead of calling setns: https://github.com/rbspy/rbspy/blob/8945812a8/src/core/address_finder.rs#L316-L319 - I'm going to try that approach instead. |
@benfred Thanks! I'm actually working on this right now and I'll put some notes here. My guess right now is that the Because I am in this side loaded container it doesn't have that file. The file is definitely available at So right now I'm trying to figure out how to use this |
Also for context the reason I need to load another container is I want to inspect this |
@tachang In the short term you can get around this with |
setns can't handle multithreaded programs, and using it to profile programs running in docker wasn't working with the recent subprocesses changee. Instead read files from /proc/PID/root as suggested here https://jvns.ca/blog/2018/01/26/spy-container/ #199
Fix is in 0.3.1 |
Doing:
However this works:
The text was updated successfully, but these errors were encountered: