Repository navigation
Description
================================================================
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
- Platform : Termux (Android), arch = aarch64 (arm64-v8a)
- Android : 11 (SDK / API level 30)
- Kernel : 4.19.152-perf+ (安装后尝试运行显示Segmentation fault #1 SMP PREEMPT, Sep 14 2022)
- OpenCode : 1.18.21 (native bionic), 1.18.15 (glibc, works)
- Repo : https://github.com/Hope2333/opencode-termux
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 --versionshould 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 usesyscall(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.
Activity
Hope2333 commentedon Sep 3, 2026
Thanks for the thorough report — your diagnosis is correct.
Root cause: Android's zygote seccomp filter (API ≤ 14 / kernel 4.19) does not include
close_range(syscall nr 436) in its allow-list. When Bun callsclose_range(4, ~0U, CLOSE_RANGE_CLOEXEC)during startup fd hygiene, the kernel deliversSECCOMP_RET_TRAP→ SIGSYS (exit 159). This is the same root cause as upstream oven-sh/bun#30766, first reported on Android 12 / SDK 31.What RC1 fixes: The
Push260903rc1native package shipslibopencode-crhandler.so— a self-activating seccomp rescue layer with two complementary mechanisms:SIGSYS handler (SA_SIGINFO): intercepts the signal at delivery time, advances the program counter past the trapping
svcinstruction (pc += 4), and returns-ENOSYSinx0. This covers inline-svc sites that no PLT interposition can reach (same semantics as upstream #39775 / #39060).PLT interposers for
syscall()andclose_range(): short-circuit nr 436 at call sites before the kernel ever sees it. This is the only layer that rescues bun's forked child processes, which inherit no usable SIGSYS disposition.The shim is wired as the first
DT_NEEDEDentry in the binary's dynamic section viatools/transplant/crhandler_patch.py— bionic's symbol lookup order means the PLT interposition wins over libc. NoLD_PRELOAD, no environment variables, no user action required.Immediate fallback (if you want to test before RC1): The earlier
native-beta-260826release provides a standalone LD_PRELOAD shim (libopencode-crshim.so, PLT-only, no handler layer):Note: this older shim only covers PLT call sites — bun's spawn-child path (inline
svc) may still SIGSYS. The RC1 crhandler covers both layers.Please test RC1:
To help us close this issue, please report:
If it still fails, please share the output and we'll investigate further.
mozzaru commentedon Sep 4, 2026
========================================
OPENCODE NATIVE RC2 - TEST REPORT
Date: 2026-09-04
Tester: User (Termux)
Package: opencode_1.18.27_aarch64.deb (native, RC2)
DEVICE INFORMATION
Platform: aarch64
Android Version: 11
API Level: 30
Kernel: (Termux environment)
TEST RESULT: SUCCESS
Command: opencode --version
Output: 1.18.27
Status: No SIGSYS crash, no SECCOMP_TRAP, no exit 159
ANALYSIS
Root Cause (before fix):
Android's zygote seccomp filter (API <= 14 / kernel 4.19)
does not include close_range (syscall nr 436) in its allow-list.
When Bun calls close_range(4, ~0U, CLOSE_RANGE_CLOEXEC) during
startup fd hygiene, the kernel delivers SECCOMP_RET_TRAP -> SIGSYS
(exit 159).
What RC2 Fixes:
The native package ships libopencode-crhandler.so — a self-activating
seccomp rescue layer with two complementary mechanisms:
SIGSYS handler (SA_SIGINFO): intercepts the signal at delivery
time, advances the program counter past the trapping svc
instruction (pc += 4), and returns -ENOSYS in x0.
PLT interposers for syscall() and close_range(): short-circuits
nr 436 at call sites before the kernel ever sees it.
The shim is wired as the first DT_NEEDED entry in the binary's
dynamic section. No LD_PRELOAD, no environment variables,
no user action required.
VERDICT
[PASS] opencode native RC2 works on Android 11 / API 30
[PASS] SIGSYS crash resolved
[PASS] No manual configuration needed
========================================
END OF REPORT
mozzaru commentedon Sep 4, 2026
and how to install this in termux?
You can't use buns
plugin https://github.com/code-yeongyu/oh-my-openagent
mozzaru commentedon Sep 4, 2026
Crash ?
???:?:?: 0x5de3484893 in ??? (/data/data/com.termux/files/usr/bin/opencode) ???:?:?: 0x5de300a12f in ??? (/data/data/com.termux/files/usr/bin/opencode)
???:?:?: 0x5de3008c63 in ??? (/data/data/com.termux/files/usr/bin/opencode)
???:?:?: 0x5de28925e3 in ??? (/data/data/com.termux/files/usr/bin/opencode) ???:?:?: 0x5de2897b4b in ??? (/data/data/com.termux/files/usr/bin/opencode) ???:?:?: 0x5de2f79fdb in ??? (/data/data/com.termux/files/usr/bin/opencode)
???:?:?: 0x5de2ef51c7 in ??? (/data/data/com.termux/files/usr/bin/opencode)
???:?:?: 0x5de2ef2fc7 in ??? (/data/data/com.termux/files/usr/bin/opencode)
???:?:?: 0x5de21a9e8b in ??? (/data/data/com.termux/files/usr/bin/opencode) ???:?:?: 0x71a0ef3a5f in ??? (/apex/com.android.runtime/lib64/bionic/libc.so) ???:?:?: 0x5de21a986b in ??? (/data/data/com.termux/files/usr/bin/opencode)
Aborted
Deterministic SIGABRT crash on
pure-androidbranch — likely TLS/Scudo heap corruption, not pointer-taggingEnvironment
pure-android/system/bin/linker64interpreter)opencode(glibc ELF wrapped viabun-termux-loader, userland-exec)glibc,openssl-glibc(per README instructions)Symptom
opencodecrashes withAbortedafter a short period of use (not immediately onstartup). The crash is fully deterministic — repeated runs abort at the exact
same relative code offset every time, only shifted by ASLR.
Investigation performed
Captured native stack traces across multiple crash occurrences. Verified via
offset diffing (subtracting the lowest frame address from each frame) that all
frames match exactly across separate runs — confirming a deterministic bug,
not memory corruption from an unrelated random source.
Attached
gdb(gdb -q --args opencode,run,thread apply all bt) at themoment of SIGABRT. Findings:
parked in
epoll_pwait— normal, not the crash site.$pcfor the crashing frame does not land in the opencode binary's.textsegment (r-xpmapping of/data/data/com.termux/files/usr/bin/opencode).It lands inside anonymous heap memory (in the
mimalloc/heap allocatoraddress range per
/proc/<pid>/maps).0xfffe000000000002— not a valid pointer. This bitpattern is consistent with a truncated/corrupted tagged pointer, i.e.
the classic Bionic "software heap tagging" tag-mismatch symptom (see
https://source.android.com/devices/tech/debug/tagged-pointers), ORScudo allocator metadata corruption from a TLS layout mismatch.
Tested
JSC_useJIT=0— no change, crash identical (ruled out JIT-codegenas the direct cause, though JS engine's use of JIT/heap layout may still be
an indirect factor).
Tested
LD_PRELOAD=libtagfix.so(binary pulled fromguysoft/opencode-termuxv0.2.1 release asset) — loaded successfully, nolinker errors, but crash is byte-for-byte identical (verified via offset
diff against the pre-preload crash). This strongly suggests the root cause
is not simply Bionic's pointer-tagging tag-mismatch (which
libtagfix.sois designed to suppress by disabling heap tagging via
mallopt(M_BIONIC_SET_HEAP_TAGGING_LEVEL, ...)before JSC init) — becausethat specific mitigation had zero effect on this binary.
Hypothesis
guysoft/opencode-termux's README documents a TLS alignment fix requiredfor any Bun binary running under Bionic:
This branch (
pure-android) does not cross-compile Bun for Android — it wrapsthe unmodified upstream glibc-linked Bun binary via
bun-termux-loader'suserland-exec. If the TLS section layout emitted for the glibc target doesn't
align correctly once the binary is running under Bionic's threading/TCB
implementation (via the userland-exec trick), this could produce exactly the
kind of Scudo/heap corruption I'm observing — independent of Bionic's
pointer-tagging feature, which is why
libtagfix.sohad no effect.Ask
bun-termux-loader's userland-execaccounts for when jumping into glibc's
ld.so? If not, this may be theactual root cause rather than pointer-tagging.
libtagfix.sodoesn't help here, is there a known workaround, or isthis fundamentally a limitation of the "wrap unmodified upstream binary"
approach vs.
guysoft's "cross-compile Bun natively for Android" approach(which patches this at the Zig/CMake build level)?
Reproduction data available on request
/proc/<pid>/mapsdump at crash timegdb thread apply all btoutput (all 25 threads)libc.so(confirmed as an__epoll_pwait-adjacent idle thread, unrelated to the actual crash — thereal crash site is in Thread 1 as noted above)
Hope2333 commentedon Sep 5, 2026
Thank you — this report is exceptionally high quality. The gdb attach, the multi-run offset diffing, the
libtagfix.socontrol experiment, the JIT exclusion… that is textbook-grade on-device forensics, and we genuinely appreciate the time you put into it.A quick status sync — your reports all landed on issues we independently found and fixed during our own RC stage:
SIGSYS (
close_range/ seccomp): your diagnosis matches ours exactly. During RC we reproduced it ourselves and shipped a dual-layer fix (the self-activatinglibopencode-crhandler.soshim +DT_NEEDED[0]hardening). It is now included in the formal release Push260906 (v1.18.15-26 v1.18.27, current Latest) across all 13 versions. Your RC2 retest (1.18.27 passing, no SIGSYS) matches our own on-device verification — thanks again for that.Deterministic SIGABRT / TLS alignment on the wrapped (pure-android) line: your TLS-alignment hypothesis was directionally spot-on — and it is exactly the architectural question that drove our RC-stage decision: the
bun-termux-loaderwrap path (unmodified upstream glibc binary via userland-exec) is now demoted to appendix maintenance and is no longer the mainline. The mainline is the native bionic revived line (direct ELF surgery, no userland-exec wrapper at all), and the glibc appendix was recast as a self-contained composite that no longer requires the systemglibc/openssl-glibcpackages (the two deps you installed per the old README can be uninstalled). On the Push260906 mainline packages, this crash path should be gone entirely.oh-my-openagent: yes, it works — we use it in our current workflow. Recommended install: the
opencode plugincommand (verified working on both runtime lines — the native mainline and the glibc appendix); after install, let the agent configure it according to the docs (docs/plugin-management.md). Localfile://registration still works as a fallback, but the plugin command is the better-managed path. Install/migration guide for the release itself:docs/dual-track-install.md.If you feel like doing one more round on the formal release: your repro data (the maps dump, the full
gdb bt, the offset-diff script) is exactly the kind of real-device evidence we lack — if anything still reproduces on Push260906, please keep posting in this format and we will follow up. Thanks again for reports of this caliber — they are very welcome here.mozzaru commentedon Sep 6, 2026
besides oh-my-openagent
What plugin or harness is good for review, refactor, debug??
The problem is using oh-my-openagent, if you use a custom provider like glm-5.3-flash, the Oracle review error
Hope2333 commentedon Sep 7, 2026
Plugins/harness for review / refactor / debug:
oh-my-openagent (OMO) is the harness we use for exactly those workflows — no extra plugin needed:
oracleagent (read-only, high-quality reasoning consultant) plus thesisyphusorchestrator cover architecture review and post-change review.oraclefor root-cause analysis and design tradeoffs, parallelexploreagents for codebase reconnaissance, execution agents (hephaestus/atlas) for carrying out the change.On the Oracle error with a custom provider (glm-5.3-flash):
That's a model-tier mismatch, not an OMO bug. Oracle's prompts are long (full-file context + review rubric) and reasoning-heavy; flash-tier models like glm-5.3-flash often fail or degrade on them. OMO supports per-agent model assignment in
~/.config/opencode/oh-my-openagent.json:{ "agents": { "oracle": { "model": "<strong-reasoning-model-id>", "fallback_models": ["<second-strong-model-id>"] }, "explore": { "model": "<flash-model-id>" } } }That's the split we run ourselves: strong models on
oracle/sisyphus(quality tier), flash models onexplore/librarian/execution agents (throughput tier). Keep glm-5.3-flash for retrieval/execution work and giveoraclethe strongest model your provider offers. If it still errors with a strong model, check the provider's context-limit settings inopencode.json— Oracle's context is large and some custom providers reject it.mozzaru commentedon Sep 7, 2026
I did a review just asking for Oracle, and the results seemed like the reviewer was not late, there were assumptions, so I was confused about using the free model and the results were like that
Do you always review full reviews??
Kan oracle for review, then sisyphus For others so
For example, asking for a review or consultation from Oracle, that's what I do,
Btw is there a good free model??
hehe🗿
Hope2333 commentedon Sep 26, 2026
Status: the SIGSYS crash you diagnosed is fixed and shipped — please verify.
The fix is exactly the mechanism you reverse-engineered:
close_range(and friends) hitting seccomp SIGSYS on older Android kernels. We now ship a self-activating shim:tools/shim/sigsys_handler.c→libopencode-crhandler.so, linked into the binary asDT_NEEDEDby theseccomp-hardenstep of the build chain (pre-patch copy kept as*.pre-crhandlerfor rollback).usr/lib/opencode/libopencode-crhandler.so(matching the binary'sDT_RUNPATH $ORIGIN/../lib/opencode) inopencode11.18.32 on the current release (Push260922) — today's rebuild also carries the Bun 1.4.0 fix from [1.18.32] Bun 1.4.2 segfault at 0x40 on Android/bionic #23.To verify on your kernel:
pacman -S opencode1(ordpkg -i opencode1_1.18.32_aarch64.deb), then confirm the shim is present and the binary references it:then run your previously-crashing workflow. If the SIGSYS crash still reproduces with the shim loaded, please reopen with the new log — that would mean the syscall being trapped isn't one the handler covers.
(On the side thread: for review/refactor/debug workflows OMO's
oracleagent is the reviewer; quality varies with the backing model — see https://opencode.ai/docs if you want to swap providers.)Hope2333 commentedon Sep 26, 2026
Fixed in opencode1 1.18.32 — the seccomp shim (libopencode-crhandler.so) now ships with the package. Please verify with the steps in the comment above and reopen if the SIGSYS crash persists.
mozzaru commentedon Sep 27, 2026
oot: you use opencode v1 or v2
Recommended combo ?
Let's review code, refactor, debug, fix code, no hallucinations, guesses, or assumptions.
??
Hope2333 commentedon Sep 28, 2026
RC3 (Push260922, 2026-09-28) supersedes the Push260828-era build — the whole two-generation family was rebuilt with bun 1.4.0 embedded (the 1.4.2 runtime was the crash source, see #23) and re-uploaded with PKGREL=3:
opencode1*1.18.30–1.18.32 (native / wrapper / compressed)opencode/opencode-wrapper2.0.0–2.0.12Please upgrade to the latest:
or direct assets: https://github.com/Hope2333/opencode-termux/releases/tag/Push260922
⚠ One note: your report is on kernel 4.19 (Android 11) — same environment as #24. If
Bad system call(SIGSYS) still occurs on an RC3 build (pacman pkgrel-3), please shareuname -aand we'll investigate the seccomp-shim angle on older kernels specifically.mozzaru commentedon Sep 28, 2026
@Hope2333
Update on kernel 4.19.152 (Android 11, Termux, aarch64):
LD_PRELOAD=$PREFIX/lib/opencode/libopencode-crhandler.so opencode --version
-> opencode v2.0.12, exit=0
So the v2 native build seems to only need the same seccomp shim. Could you ship libopencode-crhandler.so (and the DT_NEEDED link via the seccomp-harden step) in the v2
opencodepackages as well?Also a packaging note:
pacman -Uon these packages tries to write to /usr instead of the Termux prefix, so I extract manually with tar -xJf -C $PREFIX --strip-components=1 usr.Happy to test any v2 build.
Hope2333 commentedon Sep 28, 2026
Excellent debugging — the
LD_PRELOADtest is the smoking gun. Thanks for the verified matrix. 🙏Root cause confirmed
You're right. The v2 native chain (
family-v2-native→build-native→deb-native/pacman-native) never runs theharden-nativestep (only the compressed chain does), and the native packagers don't shiplibopencode-crhandler.so. So v2 native packages contain onlyusr/bin/opencode:Bad system call, and the v1 shim fixes it because it ships exactly that handlerFix plan
harden-nativeintofamily-v2-native(same zero-displacement crhandler chain the v1/compressed line uses)libopencode-crhandler.soindeb-native/pacman-native(v1-style layout:lib/opencode/+DT_RUNPATH), so--versionworks with no preloadI'll ping this issue when the rebuilt
-4assets are on the shelf — your kernel-4.19 device is the perfect canary. 🙂On the pacman
/usrnoteInteresting — on our reference device
pacman -Uof the same package installs into the Termux prefix correctly andopencodelands on PATH (2.0.18-1 verified today). Could you share the output of:So we can pin down whether your pacman root differs (we may also switch the payload to prefix-direct paths if that's the more compatible layout across pacman variants).
Meanwhile the
LD_PRELOADworkaround is fully functional. Thanks again — this report materially improved the packaging line.mozzaru commentedon Sep 28, 2026
@Hope2333
Thanks for the quick fix plan, glad the LD_PRELOAD test helped. Happy to canary the -4 assets on kernel 4.19.
Here is my pacman info:
$ pacman --version
Pacman v7.1.0 - libalpm v16.0.0
$ pacman-conf | grep -E 'RootDir|DBPath|CacheDir'
RootDir = /
DBPath = /data/data/com.termux/files/usr/var/lib/pacman/
CacheDir = /data/data/com.termux/files/usr/var/cache/pacman/pkg/
$PREFIX/etc/pacman.conf has these lines commented out, so these are the defaults.
So on my device RootDir is /, which explains the earlier behaviour: the payload's usr/bin/opencode is extracted to /usr/bin/opencode (read-only on Android), and pacman printed "Can't create '/usr'" while still reporting the package as installed. For RootDir = /, a prefix-direct payload (data/data/com.termux/files/usr/...) would be the compatible layout, as far as I can tell. If your reference device uses a different RootDir, that would explain why it works there.
fix(make): family-v2-native ships seccomp shim — wire harden-native i…
Hope2333 commentedon Sep 28, 2026
Update on the pacman
/usrnote — root cause confirmed via a reproduction on our experiment device (kernel 3.18.140, MoKee):Root cause:
RootDirin pacman.confOur packages carry payload paths relative to the Termux root (
usr/bin/opencode→ lands in$PREFIX/bin). On a working setup:On devices where install works "into /usr", pacman.conf has RootDir commented out (
#RootDir = /) or absent — alpm then falls back to its compiled default/, and the transaction tries to write the read-only Android rootfs (Partition / is mounted read only+not enough free disk space).Two more traps on the same machines (both hit during reproduction):
RootDiris set butDBPathis absent, that pacman build joins its compiled default dbpath onto RootDir → doubled path →failed to initialize alpm library.pacman.d/hooks/andpacman.d/gnupg/directories must exist, or pacman.conf parsing fails outright.One-line client fix
sed -i 's|^#\?RootDir.*|RootDir = /data/data/com.termux/files|' /data/data/com.termux/files/usr/etc/pacman.conf mkdir -p /data/data/com.termux/files/usr/etc/pacman.d/{hooks,gnupg}(If your DBPath line is also missing, add
DBPath = /data/data/com.termux/files/usr/var/lib/pacman/.)Shipped fix
Our source-setup script now self-heals all three cases automatically (uncomment/insert RootDir, add the DBPath block, create the dirs) — so
install.shusers won't hit this.Side evidence
After the fix,
pacman -Uofopencode-2.0.12-3succeeded on that device andopencode --versionreportsv2.0.12fine on kernel 3.18 — so the SIGSYS class you hit on 4.19 is specific to certain kernel/seccomp combinations, not universal. The PKGREL=4 rebuild with the seccomp shim shipped (in progress, see my earlier comment) is targeted exactly at that class — I'll ping when it's on the shelf so you can retest on your 4.19 device.Hope2333 commentedon Sep 29, 2026
@mozzaru RC4 (Push260928) 已全量上架:v2 native 全线 PKGREL=4(seccomp shim 随包,修 #17/#24 老内核 SIGSYS)+ PTY musl 静态助手(修 #27),19 版 2.0.0-2.0.18 + v1 1.18.30-33,96 件逐件 digest 对账。请在你 4.19 设备上复测
pacman -S opencode(或直链opencode-2.0.18-4-aarch64.pkg.tar.xz),若仍见 Bad system call 请贴uname -a。另外 pacman RootDir 修复已进 install.sh 自愈(见上条评论)。mozzaru commentedon Sep 29, 2026
@Hope2333
Ran a clean install test on my kernel 4.19.152 device (Android 11, Termux, aarch64) to fully verify RC4 end to end.
Steps
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencode
Result A — source script
Result B — manual package install (fallback)
/data/data/com.termux/files/usr/bin/bash: line 1: /usr/tmp/alpm_qs2HTL/.INSTALL: No such file or directory
/data/data/com.termux/files/usr/bin/bash: line 1: post_install: command not found
error: command failed to execute correctly
opencode --version -> opencode v2.0.18, exit=0
Summary
Happy to test fixes for either. Will follow up with a TUI soak test result separately.
mozzaru commentedon Sep 29, 2026
@Hope2333
Ran a second clean-install cycle on kernel 4.19.152 (Android 11, Termux, aarch64) — this time via the official pacman path instead of manual -U, to cross-check the earlier report.
Uninstalled cleanly first (pacman -R opencode). Note: pacman -R reported success and removed the DB entry, but left the binary on disk at $PREFIX/bin/opencode — had to rm it manually before retesting. Might want to check whether a pre_remove/post_remove hook is silently failing the same way .INSTALL does on install.
Ran the official one-liner:
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencode
Ran pacman -S opencode directly (repo db was already synced from step 2):
/data/data/com.termux/files/usr/bin/bash: line 1: /usr/tmp/alpm_2UPkCt/.INSTALL: No such file or directory
/data/data/com.termux/files/usr/bin/bash: line 1: post_install: command not found
error: command failed to execute correctly
pacman -Qi opencode -> Version: 2.0.18-4
opencode --version -> opencode v2.0.18, exit=0
libopencode-crhandler.so present at $PREFIX/lib/opencode/
Summary
Neither bug blocks basic usage, but the .INSTALL failure means whatever post_install is supposed to do (config migration? symlinks?) silently never happens, and the removal issue could leave stale binaries after upgrades. Happy to test fixes.
Hope2333 commentedon Sep 29, 2026
Both packaging bugs confirmed and triaged — thanks for the 2/2 reproductions, exactly what we needed.
Core fix: confirmed ✅
Two independent clean installs on kernel 4.19 with zero SIGSYS — the seccomp shim ships and works. (And your RootDir self-heal log confirms the install.sh fix is doing its job.)
Bug A — hope2333-mirrorlist checksum mismatch: root cause found
Our pacman
ServerURLs resolve viareleases/latest/download/— and "latest" moved to RC4 (Push260928) mid-window. Thehope2333-mirrorlist-1.0.20260928-1package and thehope2333.dbyou downloaded came from different site-rebuild self-heal runs (non-atomic pair upload during the latest-pointer transition). Verified just now on the current shelf: db-recorded%SHA256SUM%=7ec10039…== served package sha256 — the pair has since converged, which is why it's intermittent.Fix in progress: site-rebuild will upload the db+pkg pair atomically on every change. Interim workaround: retry the source setup after a few minutes, or pin the direct asset URL.
Bug B —
.INSTALLhook/usr/tmp: known termux-pacman limitation, mitigation plannedlibalpmextracts install/remove hook scripts into its transaction temp dir, which on your build resolves to/usr/tmp— non-existent/read-only on Android, sopost_install/pre_remove/post_removenever run. That also explains yourpacman -Rleftover (the removal hook that would clean$PREFIX/bin/opencodesilently failed).Mitigation plan (RC5 packaging round):
.INSTALLto pacman hook files shipped under the package's hook dir — those run fromHookDir(a real path), not alpm's tmp.INSTALLas best-effort on termux-pacman buildspacman -Rusers:rm -f $PREFIX/bin/opencodeafter removal until the hook landsHappy to have you retest RC5 when it ships — your 4.19 device is our canary for exactly this class.
docs(rc6-b2): TUI 判定表终版追补 + 族名治理节 + pacman hook 实测注记
docs: P0 断言纠错——statx/canonical/发布标签/RC5 撤销/封版句/glibc 教程/symlink(11 项)