================================================================
ISSUE REPORT - OpenCode Termux release Push260828 (native/bionic)
TITLE SUGGESTION:
"opencode_1.18.21_aarch64.deb (native bionic) crashes with 'Bad
system call' (SIGSYS / exit 159) on kernel 4.19.152 (Android 11,
API 30)"
- SUMMARY
The native (bionic) OpenCode build, version 1.18.21, from the
Push260828 release
(asset: opencode_1.18.21_aarch64.deb), fails to start on this
device with a runtime crash:
Bad system call ./opencode --version
exit code: 159 (= 128 + 31 -> SIGSYS)
The binary cannot even print its version. In contrast, the glibc
wrapper line build (opencode-glibc 1.18.15) from the same release
works correctly and is fully functional.
- DEVICE / ENVIRONMENT
Note: the release notes for the native line state
"Requires Android API >= 28". This device has API level 30, which
satisfies that requirement, yet the binary still crashes.
- REPRODUCTION STEPS
-
Download the native build:
opencode_1.18.21_aarch64.deb
from the Push260828 release.
-
Install (or extract) the package:
dpkg -i opencode_1.18.21_aarch64.deb
-
Run OpenCode:
opencode --version
Result:
Bad system call ./opencode --version
exit code: 159
Also reproduced by extracting the .deb with dpkg-deb -x and
running the unpacked binary directly (same SIGSYS crash).
- EXPECTED BEHAVIOR
opencode --version should print "1.18.21" and exit 0.
- The full CLI (TUI, models list, agent list) should start normally.
- ACTUAL BEHAVIOR / OBSERVED SYMPTOMS
- Every startup attempt ends with SIGSYS "Bad system call"
(exit 159), before any output is produced.
- Symptom is consistent (not intermittent) - 3/3 runs crashed.
- DIAGNOSIS / ROOT-CAUSE HYPOTHESIS
SIGSYS / "Bad system call" occurs when a process invokes a syscall
that the kernel does not implement or the seccomp policy blocks.
Since API level (30) satisfies the documented ">= 28" requirement,
the most probable cause is that the native binary invokes a newer
syscall (e.g. faccessat2, openat2, clone3, or similar) that
the older 4.19.152 kernel on this device does not provide.
The corresponding glibc build (opencode-glibc 1.18.15) runs fine on
the exact same device, which strongly suggests the difference is in
how the native binary interacts with the kernel/syscalls rather than
a generic incompatibility with the device.
- IMPACT
- The "native bionic mainline" build (which the release notes mark as
the recommended mainline going forward) cannot be used on this
device.
- Users on older Android 11 / kernel 4.19 devices are forced back to
the now-legacy glibc wrapper line (1.18.15), which caps their
OpenCode version at 1.18.15.
- REQUESTED ACTION / QUESTION
- Is there a known kernel/API requirement (beyond "API >= 28") for the
native build, e.g. a specific minimum kernel version, or a specific
set of syscalls that must be available?
- Would it be possible to either:
a) fall back to older syscalls (or use syscall(SYS_* ) shims)
for kernels < 5.x, or
b) publish the glibc line at the same version (1.18.21) so users
on older kernels are not stuck at 1.18.15?
- ADDITIONAL INFO
- Checksum (sha256) of the tested asset, verified against
SHA256SUMS.txt:
opencode_1.18.21_aarch64.deb
= 3bc040e95b49da085fe280e08b46558df5839d1d06ab5304c45ac98cf2508e76
- The native binary is an aarch64 bionic ELF; the static string
"/lib64/ld-linux-x86-64.so.2" present in the file belongs to the
bundled OpenSSL and is NOT the binary interpreter (the binary is
genuinely aarch64).
- strace is not available on this Termux environment and the kernel
logs (dmesg) are not readable without root, so the exact offending
syscall number could not be captured on-device.
================================================================
END OF REPORT
================================================================
ISSUE REPORT - OpenCode Termux release Push260828 (native/bionic)
TITLE SUGGESTION:
"opencode_1.18.21_aarch64.deb (native bionic) crashes with 'Bad
system call' (SIGSYS / exit 159) on kernel 4.19.152 (Android 11,
API 30)"
The native (bionic) OpenCode build, version 1.18.21, from the
Push260828 release
(asset: opencode_1.18.21_aarch64.deb), fails to start on this
device with a runtime crash:
The binary cannot even print its version. In contrast, the glibc
wrapper line build (opencode-glibc 1.18.15) from the same release
works correctly and is fully functional.
Note: the release notes for the native line state
"Requires Android API >= 28". This device has API level 30, which
satisfies that requirement, yet the binary still crashes.
Download the native build:
opencode_1.18.21_aarch64.deb
from the Push260828 release.
Install (or extract) the package:
dpkg -i opencode_1.18.21_aarch64.deb
Run OpenCode:
opencode --version
Result:
Bad system call ./opencode --version
exit code: 159
Also reproduced by extracting the .deb with dpkg-deb -x and
running the unpacked binary directly (same SIGSYS crash).
opencode --versionshould print "1.18.21" and exit 0.(exit 159), before any output is produced.
SIGSYS / "Bad system call" occurs when a process invokes a syscall
that the kernel does not implement or the seccomp policy blocks.
Since API level (30) satisfies the documented ">= 28" requirement,
the most probable cause is that the native binary invokes a newer
syscall (e.g.
faccessat2,openat2,clone3, or similar) thatthe older 4.19.152 kernel on this device does not provide.
The corresponding glibc build (opencode-glibc 1.18.15) runs fine on
the exact same device, which strongly suggests the difference is in
how the native binary interacts with the kernel/syscalls rather than
a generic incompatibility with the device.
the recommended mainline going forward) cannot be used on this
device.
the now-legacy glibc wrapper line (1.18.15), which caps their
OpenCode version at 1.18.15.
native build, e.g. a specific minimum kernel version, or a specific
set of syscalls that must be available?
a) fall back to older syscalls (or use
syscall(SYS_* )shims)for kernels < 5.x, or
b) publish the glibc line at the same version (1.18.21) so users
on older kernels are not stuck at 1.18.15?
SHA256SUMS.txt:
opencode_1.18.21_aarch64.deb
= 3bc040e95b49da085fe280e08b46558df5839d1d06ab5304c45ac98cf2508e76
"/lib64/ld-linux-x86-64.so.2" present in the file belongs to the
bundled OpenSSL and is NOT the binary interpreter (the binary is
genuinely aarch64).
logs (dmesg) are not readable without root, so the exact offending
syscall number could not be captured on-device.
================================================================
END OF REPORT