Open ImBIOS opened 2 weeks ago
Let me know if you need more info. But, I don't currently know how to make reproduce, it because all of repro repos I made can't even reproduce the panic
even once. By god's will, I'll keep it updated if I make a proper repo which constantly makes this panic error.
Does this crash occur with the same code as #14405, #14505, and #14239? Or are those all separate issues?
It'll be pretty hard for us to make progress without a consistent reproduction, sadly. You could try setting the environment variable BUN_GARBAGE_COLLECTOR_LEVEL=1
(or 2 if you're patient) and using the CLI flag --smol
which can make GC-related crashes more consistent.
If my memory serves me right, it occurs in the same codebase, but I can't disclose the whole code. I will try to pinpoint which part of the code makes this happen and make a minimum reproducible repository for you guys to debug and fix easily.
For a temporary solution, I'm gonna limit my crawlee
crawling queue to below 1000 for each run. Because it only happens when I crawl tons of pages.
Thanks for the support team of bun.
@190n Do you know what potentially caused this issue?
Just faced the same panic after implementing the GC suggestions (in production :v).
[04:41:54.592] HEALTHCHECK (index.ts/1682): ok
============================================================
Bun v1.1.30 (7996d06b) Linux x64 (baseline)
Linux Kernel v5.15.0 | glibc v2.31
CPU: sse42 popcnt avx avx2 avx512
Args: "bun" "--smol" "index.ts" "-b" "false" "-l" "trace" "--serial" "--make-it-work"
Features: Bun.stdin(2) WebSocket(10) bunfig dotenv(111) fetch(320) http_server jsc spawn(456) tsconfig(18) tsconfig_paths workers_spawned(110) workers_terminated(104)
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:path/win32" "node:perf_hooks" "node:process" "node:readline" "node:stream" "node:stream/promises" "node:string_decoder" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" "node:worker_threads" "node:punycode" "ws" "node-fetch"
Elapsed: 627074ms | User: 228229ms | Sys: 67448ms
RSS: 0.02ZB | Peak: 17.38GB | Commit: 0.02ZB | Faults: 121
panic(main thread): Illegal instruction at address 0x3DB7314
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:
(redacted)
./main.sh: line 13: 1682 Illegal instruction (core dumped) bun --smol index.ts -b false -l trace --serial --make-it-work
error: script "start" exited with code 132
Does ZB
mean Zetta Byte (1 ZB = 1 billion terabytes (TB)) ???
Does ZB mean Zetta Byte (1 ZB = 1 billion terabytes (TB)) ???
Yes, that number is corrupted and doesn't reflect the actual memory consumption. The uint64_t
with all 1 bits (0xFFFFFFFFFFFFFFFF
) has a decimal value of 18,446,744,073,709,551,615, or approximately 0.2 zetta.
Could you share the output of the command find node_modules -name '*.node'
? This will print a list of native addons used by your dependencies which can help us narrow this crash down. It seems like the issue is related to a native addon because the stack trace you shared ended with NAPIFunction::call
-- what likely happened is that the runtime called a function implemented in native code by one of your dependencies, and due to a bug in Bun we passed it some incorrect data that made it crash.
How can we reproduce the crash?
(edited to content from https://github.com/oven-sh/bun/issues/14405)
I'm running a ai.google.dev gemini code inside a docker container (containerized app), and this happen while I'm doing some "smoke" test before I deploy this container to the "BIG MUSCLE" cloud. I don't the ai gen code is the cause because in this particular script I'm running I have this setup and several custom utils, I'm trying to gather some data for my research:
It can only reproduced once after I tried several times.
Relevant log output
Stack Trace (bun.report)
Bun v1.1.29 (
6d43b36
) on linux x86_64_baseline [AutoCommand]Segmentation fault at address 0x00000000
napi.cpp:447
:NAPIFunction::call
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_call_javascript
Features: workers_spawned, workers_terminated, jsc, Bun.stdin, bunfig, dotenv, fetch, http_server, spawn, tsconfig_paths, tsconfig, WebSocket