Title: Tachyon: Permission error on subprocesses are not propagated back to the user · Issue #155031 · python/cpython · GitHub
Open Graph Title: Tachyon: Permission error on subprocesses are not propagated back to the user · Issue #155031 · python/cpython
X Title: Tachyon: Permission error on subprocesses are not propagated back to the user · Issue #155031 · python/cpython
Description: Bug report Bug description: Running python -m profiling.sampling run --subprocesses <...> on some code that spawns subprocesses will ignore any PermissionError thrown in the child processes when doing a attach to the process, since stder...
Open Graph Description: Bug report Bug description: Running python -m profiling.sampling run --subprocesses <...> on some code that spawns subprocesses will ignore any PermissionError thrown in the child processes when do...
X Description: Bug report Bug description: Running python -m profiling.sampling run --subprocesses <...> on some code that spawns subprocesses will ignore any PermissionError thrown in the child processes w...
Opengraph URL: https://github.com/python/cpython/issues/155031
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tachyon: Permission error on subprocesses are not propagated back to the user","articleBody":"# Bug report\n\n### Bug description:\n\nRunning `python -m profiling.sampling run --subprocesses \u003c...>` on some code that spawns subprocesses will ignore any `PermissionError` thrown in the child processes when doing a `attach` to the process, since [`stderr` is forwarded to `/dev/null`](https://github.com/python/cpython/blob/afd10f0e28476f5ca0eaeac34ebf85dda2cdc6e5/Lib/profiling/sampling/_child_monitor.py#L240), and ~[the process exits with error code `0`](https://github.com/python/cpython/blob/afd10f0e28476f5ca0eaeac34ebf85dda2cdc6e5/Lib/profiling/sampling/__main__.py#L67)~ (my mistake, it does exit with exit code 1, just the call is in the helper function). This causes confusion as the only user-visible effect is that the subprocesses sampling data files are not created.\n\nThis can happen when the user / python executable / kernel doesn't have the `CAP_SYS_PTRACE` capability, so the `run` subcommand works fine, but any `attach` will fail, which is what happens with the child processes.\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-155032\n* gh-162383\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/flowln","@type":"Person","name":"flowln"},"datePublished":"2026-08-01T13:54:15Z","url":"https://github.com/python/cpython/issues/155031"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d6c4c3b6-a95e-9ce5-00f4-79dc593b1f2f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B060:361639:3441844:45B5E55:6B0203A8 |
| html-safe-nonce | 53fcb9f6b7f0cd21b4c2f83a98b0b32d782ca9dd0286afc5ddf43d1dfb8fa8cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDYwOjM2MTYzOTozNDQxODQ0OjQ1QjVFNTU6NkIwMjAzQTgiLCJ2aXNpdG9yX2lkIjoiMTA0Nzg2NjA2NTE3NjEwMTgwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c94d89760e792e0406231a87264b4e9e6bc891296399758562bab5ae72f68dc9 |
| hovercard-subject-tag | issue:5037307826 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/155031/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6b0b48e9bba7b7869cc9553444f21f0e6591f1a46b68a67648d31184863dd2cc/python/cpython/issues/155031 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6b0b48e9bba7b7869cc9553444f21f0e6591f1a46b68a67648d31184863dd2cc/python/cpython/issues/155031 |
| og:image:alt | Bug report Bug description: Running python -m profiling.sampling run --subprocesses <...> on some code that spawns subprocesses will ignore any PermissionError thrown in the child processes when do... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | flowln |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width