| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
When running profiling on Linux without sudo, attempts to read process memory would fail with the misleading error 'Failed to find the PyRuntime section in process <pid> on Linux platform'. The actual issue is a permissions error because profiling was not run with sudo. We were clearing the exception on Linux when trying to read memory, instead, we should bubble up the permissions error and show it properly.
There was a problem hiding this comment.
I cannot click "Approve" but it's great. 🎉 The issue is gone. 🌬️
Two side comments!
My hunch is that there's still something subtle around error propagation (likely: EACCES propagation) but I cannot catch any!
I spent some time thinking on how to test it. What do you think about:
@unittest.skipUnless(
sys.platform == "linux"
and Path("/proc/sys/kernel/yama/ptrace_scope").exists()
and int(Path("/proc/sys/kernel/yama/ptrace_scope").read_text()) >= 1,
"needs Linux with ptrace_scope >= 1"
)This feels so fragile!
Sorry, something went wrong.
Yeah, I think this will haunt us in the future. For now I tested manually. We can make a future PR if we find more problems in the future in this area but it wold be great to do some big audit of this. |
Sorry, something went wrong.
|
Thanks @ivonastojanovic for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
Sorry, something went wrong.
|
GH-150339 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
…H-150012) (#150339) gh-149619: Fix `_remote_debugging` permissions error on Linux (GH-150012) When running profiling on Linux without sudo, attempts to read process memory would fail with the misleading error 'Failed to find the PyRuntime section in process <pid> on Linux platform'. The actual issue is a permissions error because profiling was not run with sudo. We were clearing the exception on Linux when trying to read memory, instead, we should bubble up the permissions error and show it properly. (cherry picked from commit 0563890) Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
|
Spent some time auditing all error paths of the remote debugging module and found a bunch of stuff. See #150349 |
Sorry, something went wrong.
|
GH-154825 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
…H-150012) (#154825) When running profiling on Linux without sudo, attempts to read process memory would fail with the misleading error 'Failed to find the PyRuntime section in process <pid> on Linux platform'. The actual issue is a permissions error because profiling was not run with sudo. We were clearing the exception on Linux when trying to read memory, instead, we should bubble up the permissions error and show it properly. (cherry picked from commit 0563890) Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
When running profiling on Linux without sudo, attempts to read process memory would fail with the misleading error 'Failed to find the PyRuntime section in process on Linux platform'.
The actual issue is a permissions error because profiling was not run with sudo. We were clearing the exception on Linux when trying to read memory, instead, we should bubble up the permissions error and show it properly.