Since opencode 1.0.116 no longer able to run binary as it crashes with bun seg fault #3244

Closed
opened 2026-02-16 17:39:18 -05:00 by yindo · 17 comments
Owner

Originally created by @kalvenschraut on GitHub (Dec 1, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

1.0.115 I can run just fine, it only crashes if starting in a code repo on my machine see
https://github.com/oven-sh/bun/issues/25276
where I reported the bug in bun, not sure what change would have caused this?
https://github.com/sst/opencode/compare/v1.0.115...v1.0.116

Originally created by @kalvenschraut on GitHub (Dec 1, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question 1.0.115 I can run just fine, it only crashes if starting in a code repo on my machine see https://github.com/oven-sh/bun/issues/25276 where I reported the bug in bun, not sure what change would have caused this? https://github.com/sst/opencode/compare/v1.0.115...v1.0.116
yindo added the bug label 2026-02-16 17:39:18 -05:00
yindo closed this issue 2026-02-16 17:39:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 1, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3750: Bus error (core dumped) after restart - corrupted binary (similar crash behavior on Linux)
  • #3876: Segfaults on musl box (segfault issues on different Linux systems)
  • #4458: pnpm install causes crash (binary crash issues on aarch64 Linux)
  • #1657: opencode crashes with Aborted (core dumped) on NVIDIA GH200 (ARM) (crash on startup)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 1, 2025): This issue might be a duplicate of existing issues. Please check: - #3750: Bus error (core dumped) after restart - corrupted binary (similar crash behavior on Linux) - #3876: Segfaults on musl box (segfault issues on different Linux systems) - #4458: pnpm install causes crash (binary crash issues on aarch64 Linux) - #1657: opencode crashes with Aborted (core dumped) on NVIDIA GH200 (ARM) (crash on startup) Feel free to ignore if none of these address your specific case.
Author
Owner

@DGJK2301 commented on GitHub (Dec 2, 2025):

yes,I met the same problem on windows11.
Bun v1.3.3 (274e01c7) Windows x64 (baseline)
Windows v.win11_dt ┃ Build OpenAI GPT 5.1 Codex Max High (OAuth)
CPU: sse42 avx avx2 avx512▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Args: "C:\Users\DGJK\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe" "--user-agent=opencode/1.0.126" "--"
Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) fetch(19) http_server jsc spawn(2) standalone_executable workers_spawned
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node-fetch"
Elapsed: 16794ms | User: 1406ms | Sys: 390ms
RSS: 0.58GB | Peak: 0.63GB | Commit: 0.76GB | Faults: 185807 | Machine: 33.49GB

panic(main thread): Segmentation fault at address 0x3
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

@DGJK2301 commented on GitHub (Dec 2, 2025): yes,I met the same problem on windows11. Bun v1.3.3 (274e01c7) Windows x64 (baseline) Windows v.win11_dt ┃ Build OpenAI GPT 5.1 Codex Max High (OAuth) CPU: sse42 avx avx2 avx512▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Args: "C:\Users\DGJK\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe" "--user-agent=opencode/1.0.126" "--" Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) fetch(19) http_server jsc spawn(2) standalone_executable workers_spawned Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node-fetch" Elapsed: 16794ms | User: 1406ms | Sys: 390ms RSS: 0.58GB | Peak: 0.63GB | Commit: 0.76GB | Faults: 185807 | Machine: 33.49GB panic(main thread): Segmentation fault at address 0x3 oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Author
Owner

@rekram1-node commented on GitHub (Dec 2, 2025):

hm idk what change in 116 wouldve caused it assuming same issue for any release after that for you too?

@rekram1-node commented on GitHub (Dec 2, 2025): hm idk what change in 116 wouldve caused it assuming same issue for any release after that for you too?
Author
Owner

@kalvenschraut commented on GitHub (Dec 2, 2025):

yea I am not sure I guess I can try building specific commits locally to try narrow down the problem. I even got my IT to change from qemu emulated CPU to the host CPU which now shows as supporting avx and still seg faults at same spot

@kalvenschraut commented on GitHub (Dec 2, 2025): yea I am not sure I guess I can try building specific commits locally to try narrow down the problem. I even got my IT to change from qemu emulated CPU to the host CPU which now shows as supporting avx and still seg faults at same spot
Author
Owner

@kalvenschraut commented on GitHub (Dec 3, 2025):

ran a bisect between the two versions since I confirmed I could build locally and get the seg fault on v1.0.116 and build locally and be just fine on v1.0.115 which found the commit https://github.com/sst/opencode/commit/99d7ff47c409a80a9c3b8217e8ca09383f4e70ac caused this issue for me. Which would also explain why I only saw this issue in my project repos, I just see notes on only using it if git is being used

@kalvenschraut commented on GitHub (Dec 3, 2025): ran a bisect between the two versions since I confirmed I could build locally and get the seg fault on v1.0.116 and build locally and be just fine on v1.0.115 which found the commit https://github.com/sst/opencode/commit/99d7ff47c409a80a9c3b8217e8ca09383f4e70ac caused this issue for me. Which would also explain why I only saw this issue in my project repos, I just see notes on only using it if git is being used
Author
Owner

@kalvenschraut commented on GitHub (Dec 3, 2025):

Looking at https://github.com/sst/opencode/commit/99d7ff47c409a80a9c3b8217e8ca09383f4e70ac#diff-8e39fca798444d6dce95885b0653dd035daeff39b28b7703b933ec5d734a4616R27 , I wonder if this is a musl issue. Trying to use glibc binary instead

oh arch is coming back as arm64 which isnt good for my system its musl/x86. Manually adding https://www.npmjs.com/package/@parcel/watcher-linux-x64-musl as a dependency and requiring that instead statically works.

so @rekram1-node think since early 1.0.0 musl builds are supported need to have better detection for this parcel binary? A little concerning that process.arch was off on my machine for some reason I was mistaken on the arm thing it was just the build erroring due to me trying test things and not related

@kalvenschraut commented on GitHub (Dec 3, 2025): Looking at https://github.com/sst/opencode/commit/99d7ff47c409a80a9c3b8217e8ca09383f4e70ac#diff-8e39fca798444d6dce95885b0653dd035daeff39b28b7703b933ec5d734a4616R27 , I wonder if this is a musl issue. Trying to use glibc binary instead oh arch is coming back as arm64 which isnt good for my system its musl/x86. Manually adding https://www.npmjs.com/package/@parcel/watcher-linux-x64-musl as a dependency and requiring that instead statically works. so @rekram1-node think since early 1.0.0 musl builds are supported need to have better detection for this parcel binary? ~~A little concerning that process.arch was off on my machine for some reason~~ I was mistaken on the arm thing it was just the build erroring due to me trying test things and not related
Author
Owner

@kalvenschraut commented on GitHub (Dec 3, 2025):

https://github.com/oven-sh/bun/pull/18138 so based on that people are using https://www.npmjs.com/package/detect-libc and then need to add all the parcel binary variants that opencode supports as dependencies

@kalvenschraut commented on GitHub (Dec 3, 2025): https://github.com/oven-sh/bun/pull/18138 so based on that people are using https://www.npmjs.com/package/detect-libc and then need to add all the parcel binary variants that opencode supports as dependencies
Author
Owner

@rekram1-node commented on GitHub (Dec 3, 2025):

Wow nice find

@rekram1-node commented on GitHub (Dec 3, 2025): Wow nice find
Author
Owner

@LiefLife commented on GitHub (Dec 6, 2025):

I also encountered this problem when trying to use opencode, but I could only use opencode normally after rolling back to version v1.0.105...

@LiefLife commented on GitHub (Dec 6, 2025): I also encountered this problem when trying to use opencode, but I could only use opencode normally after rolling back to version v1.0.105...
Author
Owner

@kalvenschraut commented on GitHub (Dec 8, 2025):

any idea when this will be looked at? I can maybe take a stab at it with opencode itself 😄 . I am currently making it so it works on my system by just manually changing the file to always use musl parcel binary and running build locally.

@kalvenschraut commented on GitHub (Dec 8, 2025): any idea when this will be looked at? I can maybe take a stab at it with opencode itself 😄 . I am currently making it so it works on my system by just manually changing the file to always use musl parcel binary and running build locally.
Author
Owner

@rekram1-node commented on GitHub (Dec 8, 2025):

I'm working on it rn, I think Tailwind had to solve this same issue so I don't think this should be too hard

@rekram1-node commented on GitHub (Dec 8, 2025): I'm working on it rn, I think Tailwind had to solve this same issue so I don't think this should be too hard
Author
Owner

@rekram1-node commented on GitHub (Dec 8, 2025):

I think this should fix it:
https://github.com/sst/opencode/commit/4dcda3d53d0810daf81e37eb1bca1b8f42a367aa

@rekram1-node commented on GitHub (Dec 8, 2025): I think this should fix it: https://github.com/sst/opencode/commit/4dcda3d53d0810daf81e37eb1bca1b8f42a367aa
Author
Owner

@kalvenschraut commented on GitHub (Dec 8, 2025):

Seems to, I pulled dev and ran build for opencode and the musl binary works with no other changes from me. Thanks!

@kalvenschraut commented on GitHub (Dec 8, 2025): Seems to, I pulled dev and ran build for opencode and the musl binary works with no other changes from me. Thanks!
Author
Owner

@rekram1-node commented on GitHub (Dec 8, 2025):

sweet

@rekram1-node commented on GitHub (Dec 8, 2025): sweet
Author
Owner

@rekram1-node commented on GitHub (Dec 8, 2025):

Should release tonight

@rekram1-node commented on GitHub (Dec 8, 2025): Should release tonight
Author
Owner

@rekram1-node commented on GitHub (Dec 9, 2025):

released in 1.0.137

@rekram1-node commented on GitHub (Dec 9, 2025): released in 1.0.137
Author
Owner

@kalvenschraut commented on GitHub (Dec 9, 2025):

Thanks, confirmed that version is working for me!

@kalvenschraut commented on GitHub (Dec 9, 2025): Thanks, confirmed that version is working for me!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3244