Since "Annotate anonymous mmap usage if "-X dev" is used" change (commit), many tests started to fail on Linux buildbots building Python with --enable-shared. I can reproduce the issue on Ubuntu 24.04.
test_sys_remote_exec (test.test_audit.AuditTest.test_sys_remote_exec) ... FAIL
Stderr:
Fatal Python error: _Py_CheckFunctionResult: a function returned a result with an exception set
Python runtime state: initialized
OSError: Cannot open ELF file '[anon:cpython:pymalloc]' 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
Current thread 0x00007f8388d70b80 [python] (most recent call first):
File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/audit-tests.py", line 672 in test_sys_remote_exec
File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/audit-tests.py", line 761 in <module>
Extension modules: math.integer (total: 1)
Since "Annotate anonymous mmap usage if "-X dev" is used" change (commit)
It's an issue in remote debugging which tries to locate the memory mapping of libpython by searching for the string "python" in /proc/pid/maps. New mappings such as "[anon:cpython:pymalloc]" are now matching, but there are anonymous mappings, not the libpython we are looking for.
Note: I cannot reproduce the issue on Fedora, since Fedora builds the Linux kernel without the CONFIG_ANON_VMA_NAME option.
Activity
pythongh-142627: Ignore anonymous mappings in Linux remote debugging
vstinner commented on Dec 12, 2025
It's an issue in remote debugging which tries to locate the memory mapping of libpython by searching for the string "python" in /proc/pid/maps. New mappings such as "[anon:cpython:pymalloc]" are now matching, but there are anonymous mappings, not the libpython we are looking for.
Note: I cannot reproduce the issue on Fedora, since Fedora builds the Linux kernel without the CONFIG_ANON_VMA_NAME option.
gh-142627: Ignore anonymous mappings in Linux remote debugging (#142628)
pythongh-142627: Ignore anonymous mappings in Linux remote debugging (p…
[3.14] gh-142627: Ignore anonymous mappings in Linux remote debugging (…