anomalyco / anomalyco/opencode
opencode(>=1.18.12) run as server crashed again and again
Open
@kitlangton is already working on this.
Since Aug 6, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
I wrote a run_opencode.sh script to start the opencode serve command and automatically restart it on abnormal exit. Over the past few days, opencode has crashed multiple times.
#!/bin/bash
while true; do
/root/.nvm/versions/node/v22.22.1/bin/opencode serve --hostname 0.0.0.0 --port 4096
echo "$(date): opencode exited, restart..." >> /var/log/opencode.log
done
(base) root@develop:/opt# cat /var/log/opencode.log
Fri Jul 31 11:41:03 AM CST 2026: opencode exited, restart...
Mon Aug 3 10:31:09 AM CST 2026: opencode exited, restart...
Tue Aug 4 08:46:07 PM CST 2026: opencode exited, restart...
Wed Aug 5 12:05:55 PM CST 2026: opencode exited, restart...
Thu Aug 6 10:10:43 AM CST 2026: opencode exited, restart...
crash log:
(base) root@develop:/opt# cat nohup.out
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://0.0.0.0:4096
============================================================
Bun v1.3.14 (0d9b296a) Linux x64 (baseline)
Linux Kernel v5.15.0 | glibc v2.35
CPU: sse42 popcnt avx avx2 avx512
Args: "/root/.nvm/versions/node/v22.22.1/bin/opencode" "--user-agent=opencode/1.18.10" "--use-system-ca" "--" "serve" "--hostname" "0.0.0.0" "--port" "4096"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(378) http_server jsc spawn(3818) standalone_executable transpiler_cache napi_module_register process_dlopen
Builtins: "bun:ffi" "bun:main" "bun:sqlite" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:dns" "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:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tty" "node:url" "node:util" "node:zlib" "ws" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
Elapsed: 2615291ms | User: 210628ms | Sys: 38305ms
RSS: 0.14GB | Peak: 2.31GB | Commit: 0.14GB | Faults: 1009 | Machine: 0.13TB
panic(main thread): Bus error at address 0x7F3BA426CF0C
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.14/Ba10d9b296mhGugooC4664tE+xyQg97xkE0+6xkE2jv5lE2ts5lE4kz5lEqk16lE8i8tkEsxgjkE____msvprCio5tpFm3qtpFov3spF8s1muF4r338DA42z/Bpv4k77C
/opt/run_opencode.sh: line 5: 1617107 Illegal instruction (core dumped) /root/.nvm/versions/node/v22.22.1/bin/opencode serve --hostname 0.0.0.0 --port 4096
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://0.0.0.0:4096
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [yZ]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: yZ {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
},
type: "event",
count: 11,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (/$bunfs/root/chunk-datjqaqc.js:25:4492)
at runLoop (/$bunfs/root/chunk-datjqaqc.js:25:2045)
at evaluate (/$bunfs/root/chunk-datjqaqc.js:25:1435)
at runTasks (/$bunfs/root/chunk-datjqaqc.js:11:12750)
at afterScheduled (/$bunfs/root/chunk-datjqaqc.js:11:12637)
============================================================
Bun v1.3.14 (0d9b296a) Linux x64 (baseline)
Linux Kernel v5.15.0 | glibc v2.35
CPU: sse42 popcnt avx avx2 avx512
Args: "/root/.nvm/versions/node/v22.22.1/bin/opencode" "--user-agent=opencode/1.18.10" "--use-system-ca" "--" "serve" "--hostname" "0.0.0.0" "--port" "4096"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(535) http_server jsc spawn(6435) standalone_executable transpiler_cache napi_module_register process_dlopen
Builtins: "bun:ffi" "bun:main" "bun:sqlite" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:dns" "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:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tty" "node:url" "node:util" "node:zlib" "ws" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
Elapsed: 254998014ms | User: 4310741ms | Sys: 777603ms
RSS: 0.18GB | Peak: 3.61GB | Commit: 0.18GB | Faults: 1059 | Machine: 0.13TB
panic(main thread): Bus error at address 0x7FB99896C20A
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.14/Ba10d9b296mhGugooC4664tE+xyQg97xkE0+6xkE2jv5lE2ts5lEi299lEomg8lE8i8tkEqw4ikE____msvprCio5tpFm3qtpFov3spF8s1muF4r338DA4y7/Bt/+ktnD
/opt/run_opencode.sh: line 5: 1647178 Illegal instruction (core dumped) /root/.nvm/versions/node/v22.22.1/bin/opencode serve --hostname 0.0.0.0 --port 4096
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://0.0.0.0:4096
============================================================
Bun v1.3.14 (0d9b296a) Linux x64 (baseline)
Linux Kernel v5.15.0 | glibc v2.35
CPU: sse42 popcnt avx avx2 avx512
Args: "/root/.nvm/versions/node/v22.22.1/bin/opencode" "--user-agent=opencode/1.18.10" "--use-system-ca" "--" "serve" "--hostname" "0.0.0.0" "--port" "4096"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(3058) http_server jsc spawn(17495) standalone_executable napi_module_register process_dlopen
Builtins: "bun:ffi" "bun:main" "bun:sqlite" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:dns" "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:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tty" "node:url" "node:util" "node:zlib" "ws" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
Elapsed: 123288493ms | User: 3168704ms | Sys: 552320ms
RSS: 0.29GB | Peak: 2.98GB | Commit: 0.29GB | Faults: 5530 | Machine: 0.13TB
panic(main thread): Bus error at address 0x7F854C13A754
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.14/Ba10d9b296mgGugooC4664tE+xyQg97xkE0+6xkE+4h0kEglxzkEq3i+lEypy7lE8i8tkEqw4ikE____msvprCio5tpFm3qtpFov3spF8s1muF4r338DA4q4/Bo1zuisC
/opt/run_opencode.sh: line 5: 2677337 Illegal instruction (core dumped) /root/.nvm/versions/node/v22.22.1/bin/opencode serve --hostname 0.0.0.0 --port 4096
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://0.0.0.0:4096
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [yZ]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: yZ {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
},
type: "event",
count: 11,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (/$bunfs/root/chunk-datjqaqc.js:25:4492)
at runLoop (/$bunfs/root/chunk-datjqaqc.js:25:2045)
at evaluate (/$bunfs/root/chunk-datjqaqc.js:25:1435)
at runTasks (/$bunfs/root/chunk-datjqaqc.js:11:12750)
at afterScheduled (/$bunfs/root/chunk-datjqaqc.js:11:12637)
============================================================
Bun v1.3.14 (0d9b296a) Linux x64 (baseline)
Linux Kernel v5.15.0 | glibc v2.35
CPU: sse42 popcnt avx avx2 avx512
Args: "/root/.nvm/versions/node/v22.22.1/bin/opencode" "--user-agent=opencode/1.18.13" "--use-system-ca" "--" "serve" "--hostname" "0.0.0.0" "--port" "4096"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(3789) http_server jsc spawn(7197) standalone_executable transpiler_cache(2) napi_module_register process_dlopen
Builtins: "bun:ffi" "bun:main" "bun:sqlite" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:dns" "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:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "ws" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
Elapsed: 55177236ms | User: 1946000ms | Sys: 374335ms
RSS: 0.31GB | Peak: 3.93GB | Commit: 0.31GB | Faults: 3735 | Machine: 0.13TB
panic(main thread): Bus error at address 0x7F801D5C07F0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.14/Ba10d9b296mhGugooC4664tE+xyQg97xkE0+6xkE2jv5lE2ts5lEi299lEomg8lE8i8tkEqw4ikE____msvprCio5tpFm3qtpFov3spF8s1muF4r338DA4g4/Bg/jwrd
/opt/run_opencode.sh: line 5: 3295155 Illegal instruction (core dumped) /root/.nvm/versions/node/v22.22.1/bin/opencode serve --hostname 0.0.0.0 --port 4096
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://0.0.0.0:4096
MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [yZ]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
emitter: yZ {
_events: [Object ...],
_eventsCount: 1,
_maxListeners: undefined,
[Symbol(kCapture)]: false,
emit: [Function: emit],
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
},
type: "event",
count: 11,
at overflowWarning (node:events:185:19)
at addListener (node:events:158:22)
at ~effect/Effect/evaluate (/$bunfs/root/chunk-datjqaqc.js:25:4492)
at runLoop (/$bunfs/root/chunk-datjqaqc.js:25:2045)
at evaluate (/$bunfs/root/chunk-datjqaqc.js:25:1435)
at runTasks (/$bunfs/root/chunk-datjqaqc.js:11:12750)
at afterScheduled (/$bunfs/root/chunk-datjqaqc.js:11:12637)
============================================================
Bun v1.3.14 (0d9b296a) Linux x64 (baseline)
Linux Kernel v5.15.0 | glibc v2.35
CPU: sse42 popcnt avx avx2 avx512
Args: "/root/.nvm/versions/node/v22.22.1/bin/opencode" "--user-agent=opencode/1.18.13" "--use-system-ca" "--" "serve" "--hostname" "0.0.0.0" "--port" "4096"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) fetch(2291) http_server jsc spawn(7550) standalone_executable transpiler_cache(4) napi_module_register process_dlopen
Builtins: "bun:ffi" "bun:main" "bun:sqlite" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:dns" "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:stream/consumers" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "ws" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
Elapsed: 79477404ms | User: 1288173ms | Sys: 218858ms
RSS: 0.23GB | Peak: 3.42GB | Commit: 0.23GB | Faults: 2700 | Machine: 0.13TB
panic(main thread): Bus error at address 0x7F445D590508
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.14/Ba10d9b296mhGugooC4664tE+xyQg97xkE0+6xkE2jv5lE2ts5lE4kz5lEqk16lE8i8tkEsxgjkE____msvprCio5tpFm3qtpFov3spF8s1muF4r338DA4o0/Bwwikr9C
/opt/run_opencode.sh: line 5: 3565174 Illegal instruction (core dumped) /root/.nvm/versions/node/v22.22.1/bin/opencode serve --hostname 0.0.0.0 --port 4096
Warning: OPENCODE_SERVER_PASSWORD is not set; server is unsecured.
opencode server listening on http://0.0.0.0:4096
Plugins
No response
OpenCode version
1.18.13
Steps to reproduce
see run_opencode.sh
Screenshot and/or share link
No response
Operating System
Ubuntu 22.04 LTS
Terminal
remote ssh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.