Skip to content

K2GO-598 fix(proot-builder): 32-bit Go futex_time64 under the Android 8 to 10 app filter - #831

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-598-proot-futex-time64
Nov 27, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-598-proot-futex-time64

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

  • build_static.sh: one translate_futex_time64() in PRoot for the sysenter path and the SIGSYS of the Android 8 to 10 app filter. futex runs in place of futex_time64, and the timeout of the wait operations is copied in the 32-bit layout.
  • build_static.sh: PRoot swallows the SIGSYS of the call that it runs only to fail when it cannot change the syscall number (arm64 Linux older than 3.19 with a 32-bit program).
  • Kernel matrix: a 3 x 0.9 s futex_time64 wait probe, the futex_time64 filter and timeout tests, and a new arm64-lib32 pass (the arm64 proot with a 32-bit library, seccomp on and off).

Why

32-bit Go programs in the box (Forgejo, maps pmtiles) crashed under the Android 8 to 10 app filter, and a Go wait with a timeout returned at once (busy loop, 113% CPU). Jira: K2GO-598.

Steps to QA

Baseline: binaries-2026-11-26_11-23 on the LG K8 (Android 8.1, 32-bit). Forgejo crashes (SIGSEGV, port 3300 closed); the 3 x 0.9 s wait probe returns after 0 ms.
Change: a bundle with this proot. Forgejo listens on 3300, /api/healthz passes, the PID stays the same; the probe waits 2.9 s. Same with a 32-bit library on a 64-bit phone (Nokia 6, OnePlus 7T).

Verifications

  • Evidence is in the Jira ticket (local build of this code).
  • Kernel matrix: before 13 failed; after 235 passed, 0 failed, 19 skipped (3.16, 4.4, 4.9, 4.15, 6.12).
  • Phones: LG K8, Q8, Nokia 6 (64-bit and 32-bit library), OnePlus 7T (32-bit library).
  • Deferred: the binaries bundle from CI and its pin in the app (P0 stop open). That bundle gets the same check on the LG K8 and the Nokia 6 with a 32-bit library.

Notes

The Nokia 6 case (arm64 3.18, no NT_ARM_SYSTEM_CALL) does not show in QEMU: 3.16 has no seccomp filters and 4.4 can change the syscall number. Check it on a real phone.

… 8 to 10 app filter

One translate_futex_time64() for the sysenter and the SIGSYS paths: futex runs in place of
the trapped futex_time64, with the wait timeout in the 32-bit layout. The SIGSYS of the call
that proot runs only to fail (no NT_ARM_SYSTEM_CALL, arm64 Linux 3.18) is swallowed.
… library tests in the kernel matrix

The probe gets a 3 x 0.9 s futex_time64 wait. The matrix runs futex_time64 under the app
filter, the timeout tests, and the arm64 proot with a 32-bit library (seccomp on and off).
@luisguzman-adfa
luisguzman-adfa merged commit 3648040 into main Nov 27, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-598-proot-futex-time64 branch November 27, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant