Bus error (core dumped) after restart - corrupted binary #2482

Open
opened 2026-02-16 17:35:51 -05:00 by yindo · 4 comments
Owner

Originally created by @nileshevrywhr on GitHub (Nov 2, 2025).

Description:

The opencode binary was working correctly in a previous session. After quitting and starting a new session, it now immediately crashes with a "Bus error (core dumped)" message. This suggests a potential corruption issue that occurred between sessions.

Analysis of the binary and the resulting core dump indicates that the executable is now corrupted.

Steps to Reproduce:

  1. Use opencode successfully in a terminal session.
  2. Quit the session.
  3. Start a new terminal session.
  4. Run the opencode binary again.

Expected Behavior:

The opencode application should start and run as expected in the new session.

Actual Behavior:

The application crashes instantly with the following error:

Bus error (core dumped)

System Information:

  • OS: Debian GNU/Linux
  • Architecture: x86_64
  • Kernel: Linux inspiron7572 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64 GNU/Linux

Technical Details & Logs:

  1. File Analysis: The file command suggests the binary has missing section headers.

    $ file /home/nileshevrywhr/.opencode/bin/opencode
    /home/nileshevrywhr/.opencode/bin/opencode: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, missing section headers at 104403168
    
  2. GDB Backtrace: A backtrace from the core dump shows the crash occurs inside the dynamic linker (ld-linux-x86-64.so.2) while trying to process the ELF file. gdb also fails to recognize the executable format.

    Core was generated by `opencode'.
    Program terminated with signal SIGBUS, Bus error.
    #0  0x00007f3931a59b81 in ?? ()
    "/home/nileshevrywhr/.opencode/bin/opencode": not in executable format: file format not recognized
    
    Stack trace of thread 17343:
    #0  0x00007f3931a59b81 elf_get_dynamic_info (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1cb81)
    #1  0x00007f3931a572ff _dl_sysdep_start (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1a2ff)
    #2  0x00007f3931a58c7c _dl_start_final (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1bc7c)
    #3  0x00007f3931a57b28 _start (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1ab28)
    

This evidence strongly suggests the binary is malformed, preventing the system's dynamic linker from loading it correctly. The likely solution is to rebuild and redistribute a valid binary.

Originally created by @nileshevrywhr on GitHub (Nov 2, 2025). **Description:** The `opencode` binary was working correctly in a previous session. After quitting and starting a new session, it now immediately crashes with a "Bus error (core dumped)" message. This suggests a potential corruption issue that occurred between sessions. Analysis of the binary and the resulting core dump indicates that the executable is now corrupted. **Steps to Reproduce:** 1. Use `opencode` successfully in a terminal session. 2. Quit the session. 3. Start a new terminal session. 4. Run the `opencode` binary again. **Expected Behavior:** The `opencode` application should start and run as expected in the new session. **Actual Behavior:** The application crashes instantly with the following error: ``` Bus error (core dumped) ``` **System Information:** * **OS:** Debian GNU/Linux * **Architecture:** x86_64 * **Kernel:** `Linux inspiron7572 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64 GNU/Linux` **Technical Details & Logs:** 1. **File Analysis:** The `file` command suggests the binary has missing section headers. ``` $ file /home/nileshevrywhr/.opencode/bin/opencode /home/nileshevrywhr/.opencode/bin/opencode: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, missing section headers at 104403168 ``` 2. **GDB Backtrace:** A backtrace from the core dump shows the crash occurs inside the dynamic linker (`ld-linux-x86-64.so.2`) while trying to process the ELF file. `gdb` also fails to recognize the executable format. ``` Core was generated by `opencode'. Program terminated with signal SIGBUS, Bus error. #0 0x00007f3931a59b81 in ?? () "/home/nileshevrywhr/.opencode/bin/opencode": not in executable format: file format not recognized Stack trace of thread 17343: #0 0x00007f3931a59b81 elf_get_dynamic_info (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1cb81) #1 0x00007f3931a572ff _dl_sysdep_start (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1a2ff) #2 0x00007f3931a58c7c _dl_start_final (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1bc7c) #3 0x00007f3931a57b28 _start (/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 + 0x1ab28) ``` This evidence strongly suggests the binary is malformed, preventing the system's dynamic linker from loading it correctly. The likely solution is to rebuild and redistribute a valid binary.
Author
Owner

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

What version are you on? How did u install?

@rekram1-node commented on GitHub (Nov 2, 2025): What version are you on? How did u install?
Author
Owner

@nileshevrywhr commented on GitHub (Nov 2, 2025):

installed via npm. i was on or before v0.15.29 definitely. you guys have been pushing quite rigourously.

sorry i didn't note it down before reinstalling v1.0.12 via curl today.

@nileshevrywhr commented on GitHub (Nov 2, 2025): installed via npm. i was on or before [v0.15.29](https://github.com/sst/opencode/releases/tag/v0.15.29) definitely. you guys have been pushing quite rigourously. sorry i didn't note it down before reinstalling [v1.0.12](https://github.com/sst/opencode/releases/tag/v1.0.12) via curl today.
Author
Owner

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

Does this still happen to u on latest? note that v1 is still having some kinks ironed out so u may encounter some interesting bugs but we wanna have them all fixed as best we can by EOW

@rekram1-node commented on GitHub (Nov 2, 2025): Does this still happen to u on latest? note that v1 is still having some kinks ironed out so u may encounter some interesting bugs but we wanna have them all fixed as best we can by EOW
Author
Owner

@nileshevrywhr commented on GitHub (Nov 3, 2025):

it hasn't resulted in bus error yet.
i do see minor bugs like renaming sessions not working. will let you know.

@nileshevrywhr commented on GitHub (Nov 3, 2025): it hasn't resulted in bus error yet. i do see minor bugs like renaming sessions not working. will let you know.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2482