Skip to content

SystemError: <built-in function remote_exec> returned a result with an exception set #137293

Closed

Description

@godlygeek

Bug report

Bug description:

While testing with sys.remote_exec today I got this error:

OSError: Cannot open ELF file '/home/godlygeek/repos/memray/src/memray/_memray.cpython-314-x86_64-linux-gnu.so (deleted)' for section 'PyRuntime' search: No such file or directory

The above exception was the direct cause of the following exception:
...
SystemError: <built-in function remote_exec> returned a result with an exception set

The root cause is that sys.remote_exec can return a result with an exception set if it fails to open one or more mapped files while searching for the mapping that contains PyRuntime, but eventually successfully reads the file that does contain PyRuntime.

We either need to stop setting exceptions inside search_linux_map_for_section entirely, or print and clear them with PyErr_Print before continuing on with the search.

I'll contribute a fix tomorrow unless someone beats me to it.

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bug
    on Aug 1, 2025
  2. added
    interpreter-core
    3.14
    3.15
    on Aug 1, 2025
  3. added 5 commits that reference this issue on Aug 1, 2025
  4. added a commit that references this issue on May 5, 2026
  5. added a commit that references this issue on May 5, 2026
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

    3.143.15interpreter-coretype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions