Skip to content

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

Closed

Description

@nileshevrywhr

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.

Activity

  1. rekram1-node commented on Nov 2, 2025

    @rekram1-node
    Collaborator

    What version are you on? How did u install?

  2. nileshevrywhr commented on Nov 2, 2025

    @nileshevrywhr
    Author

    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.

  3. rekram1-node commented on Nov 2, 2025

    @rekram1-node
    Collaborator

    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

  4. nileshevrywhr commented on Nov 3, 2025

    @nileshevrywhr
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions