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
Bug report
Bug description:
While testing with
sys.remote_exectoday I got this error:The root cause is that
sys.remote_execcan return a result with an exception set if it fails to open one or more mapped files while searching for the mapping that containsPyRuntime, but eventually successfully reads the file that does containPyRuntime.We either need to stop setting exceptions inside
search_linux_map_for_sectionentirely, or print and clear them withPyErr_Printbefore 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