Skip to content

Tachyon: Permission error on subprocesses are not propagated back to the user #155031

Description

@flowln

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 stderr is forwarded to /dev/null, and the process exits with error code 0 (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.

This 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.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-profilingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions