bun
bun copied to clipboard
`raiseIgnoringPanicHandler` triggers crash reporter
How can we reproduce the crash?
My program connects to WebSocket connections and saving events to a PostgreSQL db with Drizzle ORM. The code is not opensourced at the moment.
Relevant log output
Application exited with code 132
error: script "start" was terminated by signal SIGKILL (Forced quit)
============================================================
Bun v1.1.13 (bd6a6051) Linux x64 (baseline)
Args: "bun" "run" "start"
Features: spawn
Elapsed: 15428549ms | User: 7ms | Sys: 19ms
RSS: 1.07GB | Peak: 12.32MB | Commit: 1.07GB | Faults: 188
panic(main thread): Segmentation fault at address 0x0
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.1.13/Br1bd6a605AggggI+1mOwxji5C6vj35C43q35Ci7+m0Cg9vm0CA2AA
Stack Trace (bun.report)
Bun v1.1.13 (bd6a605) on linux x86_64_baseline [RunCommand]
Segmentation fault at address 0x00000000
??Global.zig:128:src.Global.raiseIgnoringPanicHandler__anon_86500run_command.zig:407:src.cli.run_command.RunCommand.runPackageScriptForegroundrun_command.zig:1461:src.cli.run_command.RunCommand.exec__anon_272747cli.zig:1772:src.cli.Cli.startmain.zig:50:main
Edited: Still got this error with v1.1.17:
Bun v1.1.17 (bb66bba) on linux x86_64_baseline [RunCommand]
Segmentation fault at address 0x00000000
??Global.zig:128:src.Global.raiseIgnoringPanicHandler__anon_68457run_command.zig:407:src.cli.run_command.RunCommand.runPackageScriptForegroundrun_command.zig:1461:src.cli.run_command.RunCommand.exec__anon_71499cli.zig:1801:src.cli.Cli.startmain.zig:50:main
@sparanoid, the latest version of Bun is v1.1.16, but this crash was reported on Bun v1.1.13.
Are you able to reproduce this crash on the latest version of Bun?
bun upgrade
Application exited with code 132 error: script "start" was terminated by signal SIGKILL (Forced quit)
the "start" script was killed. this is a bug in that script (if it is running bug and crashing, it is a bug in bun). SIGKILL can also be an out of memory or timeout
the fact bun crashes in raiseIgnoringPanicHandler, which is supposed to forward the script's crash to the shell, and hitting the panic handler, is a bug in bun.
I'm running it on Koyeb within a container. The memory usage seems to be fine:
The gap in the chart is when the service dies
I'm having this issue as well, even with the last version of bun, any idea how can I workaround it?
I ran into the same error error: script "start" was terminated by signal SIGKILL (Forced quit) and managed to fix it by increasing the available memory of the Docker container running my bun process from 128 to 256 MB.