-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
"disallowed arm64 system call" crashes on Android API levels 26-30 #123014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
On API level 30, test_asyncio is fine, but test_signal crashes with a different system call number. API level 31 is fine.
|
System call 434 on ARM64 is pidof_open(). This syscall is exposed as os.pidfd_open() on Python, and it's used by asyncio in _PidfdChildWatcher. asyncio has a functional test to skip the function if it fails because of SECCOMP: def can_use_pidfd():
if not hasattr(os, 'pidfd_open'):
return False
try:
pid = os.getpid()
os.close(os.pidfd_open(pid, 0))
except OSError:
# blocked by security policy like SECCOMP
return False
return True Sadly, it seems like Android policy is to kill the process, rather than failing with ENOSYS errno (or another error such as EPERM). Can you tune the Android policy to fail with an error raher than killing the process? Or maybe |
Yes, unfortunately they do that a lot, and we don't have any control over the policy. So the simplest solution would be to just disable the pidfd functions at build time on Android, as we've done with other blocked functions like For future reference, system call number 424 in the second crash is |
Uh oh!
There was an error while loading. Please reload this page.
Crash report
What happened?
I've seen two versions of this crash. The first one mostly affects the asyncio tests, but also some others, e.g.
test_type_params
.It happens both on an emulator (API levels 26-29) and a physical device (Nexus 5X, API level 27). It does not happen on API levels 25 or 30 (but see the other crash below), nor on 34, which is the version that will be used by the buildbot.
Here's a log from API level 29. All the other versions are similar, except that API level 26 and 27 say "disallowed arm64 system call 0" instead of 434.
Backtrace
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Output from running 'python -VV' on the command line:
CPython 3.14.0a0 (heads/android-test-script-dirty:ae3a460a043, Aug 12 2024, 22:45:13) [Clang 17.0.2 (https://android.googlesource.com/toolchain/llvm-project d9f89f4d1
Linked PRs
The text was updated successfully, but these errors were encountered: