You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
confirmed bugWe can reproduce this issuecrashAn issue that could cause a crashmacOSAn issue that occurs on macOSnapiCompatibility with the native layer of Node.jsruntime
if you have mise run mise exec bun@latest -- ./check-dependency-updates.ts
Relevant log output
Crashed while loading native module: /Users/stephensolka/dev/renovate/node_modules/re2/build/Release/re2.node
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.2.14/Ma16a363a3OiggQ__2yi+iB_______A2AA
Stack Trace (bun.report)
Bun v1.2.14 (6a363a3) on macos aarch64 [RunAsNodeCommand]
Can confirm. Just needed to ensure bun runtime for install (bunx --bun bun install renovate). So wouldn't be suprised if node-gyp doesn't work well under bun's runtime as it works well when installed using actual node installed.
Also ASAN trace:
AddressSanitizer:DEADLYSIGNAL===================================================================33500==ERROR: AddressSanitizer: SEGVonunknownaddress0x000000000000(pc0x000000000000bp0x00016b4efb70sp0x00016b4efb20T0)==33500==Hint: pcpointstothezeropage.==33500==ThesignaliscausedbyaREADmemoryaccess.==33500==Hint: addresspointstothezeropage.
#00x000000000000(<unknownmodule>)
#1 0x000105610118 in node_module_register node.cpp:93
#2 0x000188deaef8 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&)const+0x1b8(dyld:arm64+0xfffffffffff56ef8)
#30x000188e2763c(<unknownmodule>)
#4 0x000188e47588 (<unknownmodule>)
#5 0x000188e44314 (<unknownmodule>)
#6 0x000188e45a54 (<unknownmodule>)
#7 0x000188e1cb5c (<unknownmodule>)
#8 0x000188e272dc (<unknownmodule>)
#9 0x000188deacb0 in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&)const+0xac(dyld:arm64+0xfffffffffff56cb0)
#100x000188df266c(<unknownmodule>)
#11 0x000188deb45c in dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&,dyld3::Array<dyld4::Loaderconst*>&,dyld3::Array<dyld4::Loaderconst*>&)const+0x130(dyld:arm64+0xfffffffffff5745c)
#120x000188defbec(<unknownmodule>)
#13 0x000188deb778 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&)const+0x2c8(dyld:arm64+0xfffffffffff57778)
#140x000188e0f100(<unknownmodule>)
#15 0x000188e03f58 (<unknownmodule>)
#16 0x000188e03a3c (<unknownmodule>)
#17 0x00011e20ab0c in dlopen+0x140 (libclang_rt.asan_osx_dynamic.dylib:arm64+0x3eb0c)
#18 0x000104ddb7c4 in Bun::Process_functionDlopen(JSC::JSGlobalObject*, JSC::CallFrame*) BunProcess.cpp:504
#19 0x000300010038 (<unknownmodule>)
#20 0x000111c54f70 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__844_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36cf70)
#21 0x000300030168 (<unknownmodule>)
#22 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#23 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#24 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#250x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#260x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#270x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#280x0001050beb00inBun::evaluateCommonJSModuleOnce(JSC::VM&,Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSString*,JSC::JSValue)JSCommonJSModule.cpp:206
#290x0001050d1b7cinBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&,bool)JSCommonJSModule.cpp:1358
#300x0001051c2298inBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&)JSCommonJSModule.h:96
#310x0001051c0a14inJSC::JSValueBun::fetchCommonJSModuleNonBuiltin<false>(void*, JSC::VM&,Zig::GlobalObject*,BunString*,JSC::JSValue,BunString*,BunString*,ErrorableResolvedSource*,Bun::JSCommonJSModule*,WTF::String,unsignedchar,JSC::ThrowScope&)ModuleLoader.cpp:748
#320x0001051c9aa4inBun::fetchCommonJSModule(Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSValue,WTF::String,BunString*,BunString*)ModuleLoader.cpp:725
#330x0001050cfd48inBun::jsFunctionRequireCommonJS(JSC::JSGlobalObject*,JSC::CallFrame*)JSCommonJSModule.cpp:1277
#340x000300010038(<unknownmodule>)
#35 0x0003000630a0 (<unknownmodule>)
#36 0x000300030168 (<unknownmodule>)
#37 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#38 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#39 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#400x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#410x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#420x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#430x0001050beb00inBun::evaluateCommonJSModuleOnce(JSC::VM&,Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSString*,JSC::JSValue)JSCommonJSModule.cpp:206
#440x0001050d1b7cinBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&,bool)JSCommonJSModule.cpp:1358
#450x0001051c2298inBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&)JSCommonJSModule.h:96
#460x0001051c0a14inJSC::JSValueBun::fetchCommonJSModuleNonBuiltin<false>(void*, JSC::VM&,Zig::GlobalObject*,BunString*,JSC::JSValue,BunString*,BunString*,ErrorableResolvedSource*,Bun::JSCommonJSModule*,WTF::String,unsignedchar,JSC::ThrowScope&)ModuleLoader.cpp:748
#470x0001051c9aa4inBun::fetchCommonJSModule(Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSValue,WTF::String,BunString*,BunString*)ModuleLoader.cpp:725
#480x0001050cfd48inBun::jsFunctionRequireCommonJS(JSC::JSGlobalObject*,JSC::CallFrame*)JSCommonJSModule.cpp:1277
#490x000300010038(<unknownmodule>)
#50 0x0003000630a0 (<unknownmodule>)
#51 0x000300030168 (<unknownmodule>)
#52 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#53 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#54 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#550x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#560x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#570x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#580x0001050beb00inBun::evaluateCommonJSModuleOnce(JSC::VM&,Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSString*,JSC::JSValue)JSCommonJSModule.cpp:206
#590x0001050d1b7cinBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&,bool)JSCommonJSModule.cpp:1358
#600x0001051c2298inBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&)JSCommonJSModule.h:96
#610x0001051c0a14inJSC::JSValueBun::fetchCommonJSModuleNonBuiltin<false>(void*, JSC::VM&,Zig::GlobalObject*,BunString*,JSC::JSValue,BunString*,BunString*,ErrorableResolvedSource*,Bun::JSCommonJSModule*,WTF::String,unsignedchar,JSC::ThrowScope&)ModuleLoader.cpp:748
#620x0001051c9aa4inBun::fetchCommonJSModule(Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSValue,WTF::String,BunString*,BunString*)ModuleLoader.cpp:725
#630x0001050cfd48inBun::jsFunctionRequireCommonJS(JSC::JSGlobalObject*,JSC::CallFrame*)JSCommonJSModule.cpp:1277
#640x000300010038(<unknownmodule>)
#65 0x0003000630a0 (<unknownmodule>)
#66 0x000300030168 (<unknownmodule>)
#67 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#68 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#69 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#700x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#710x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#720x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#730x0001050beb00inBun::evaluateCommonJSModuleOnce(JSC::VM&,Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSString*,JSC::JSValue)JSCommonJSModule.cpp:206
#740x0001050d1b7cinBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&,bool)JSCommonJSModule.cpp:1358
#750x0001051c2298inBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&)JSCommonJSModule.h:96
#760x0001051c0a14inJSC::JSValueBun::fetchCommonJSModuleNonBuiltin<false>(void*, JSC::VM&,Zig::GlobalObject*,BunString*,JSC::JSValue,BunString*,BunString*,ErrorableResolvedSource*,Bun::JSCommonJSModule*,WTF::String,unsignedchar,JSC::ThrowScope&)ModuleLoader.cpp:748
#770x0001051c9aa4inBun::fetchCommonJSModule(Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSValue,WTF::String,BunString*,BunString*)ModuleLoader.cpp:725
#780x0001050cfd48inBun::jsFunctionRequireCommonJS(JSC::JSGlobalObject*,JSC::CallFrame*)JSCommonJSModule.cpp:1277
#790x000300010038(<unknownmodule>)
#80 0x0003000630a0 (<unknownmodule>)
#81 0x000300030168 (<unknownmodule>)
#82 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#83 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#84 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#850x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#860x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#870x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#880x0001050beb00inBun::evaluateCommonJSModuleOnce(JSC::VM&,Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSString*,JSC::JSValue)JSCommonJSModule.cpp:206
#890x0001050d1b7cinBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&,bool)JSCommonJSModule.cpp:1358
#900x0001051c2298inBun::JSCommonJSModule::evaluate(Zig::GlobalObject*,WTF::Stringconst&,ResolvedSource&)JSCommonJSModule.h:96
#910x0001051c0a14inJSC::JSValueBun::fetchCommonJSModuleNonBuiltin<false>(void*, JSC::VM&,Zig::GlobalObject*,BunString*,JSC::JSValue,BunString*,BunString*,ErrorableResolvedSource*,Bun::JSCommonJSModule*,WTF::String,unsignedchar,JSC::ThrowScope&)ModuleLoader.cpp:748
#920x0001051c9aa4inBun::fetchCommonJSModule(Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSValue,WTF::String,BunString*,BunString*)ModuleLoader.cpp:725
#930x0001050cfd48inBun::jsFunctionRequireCommonJS(JSC::JSGlobalObject*,JSC::CallFrame*)JSCommonJSModule.cpp:1277
#940x000300010038(<unknownmodule>)
#95 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#96 0x000300030168 (<unknownmodule>)
#97 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#98 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#99 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#1000x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#1010x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#1020x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#1030x0001050beb00inBun::evaluateCommonJSModuleOnce(JSC::VM&,Zig::GlobalObject*,Bun::JSCommonJSModule*,JSC::JSString*,JSC::JSValue)JSCommonJSModule.cpp:206
#1040x0001050e34d8inBun::createCommonJSModule(Zig::GlobalObject*,JSC::JSString*,ResolvedSource&,bool)::$_0::operator()(JSC::JSGlobalObject*,JSC::Identifierconst&,WTF::Vector<JSC::Identifier,4ul,WTF::CrashOnOverflow,16ul,WTF::FastMalloc>&,JSC::MarkedVector<JSC::JSValue,8ul,WTF::RecordOverflow>&)constJSCommonJSModule.cpp:1483
#1050x0001050e2f84inWTF::Detail::CallableWrapper<Bun::createCommonJSModule(Zig::GlobalObject*,JSC::JSString*,ResolvedSource&,bool)::$_0,void,JSC::JSGlobalObject*,JSC::Identifier,WTF::Vector<JSC::Identifier,4ul,WTF::CrashOnOverflow,16ul,WTF::FastMalloc>&,JSC::MarkedVector<JSC::JSValue,8ul,WTF::RecordOverflow>&>::call(JSC::JSGlobalObject*,JSC::Identifier,WTF::Vector<JSC::Identifier,4ul,WTF::CrashOnOverflow,16ul,WTF::FastMalloc>&,JSC::MarkedVector<JSC::JSValue,8ul,WTF::RecordOverflow>&)Function.h:53
#1060x00010fa3641cinJSC::moduleLoaderParseModule(JSC::JSGlobalObject*,JSC::CallFrame*)JSModuleLoader.cpp:381
#1070x000300010038(<unknownmodule>)
#108 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#109 0x000111c539d8 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__826_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36b9d8)
#110 0x000111c54f70 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__844_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36cf70)
#111 0x000111c54f70 in jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__844_callHelper__dispatch_LowLevelInterpreter64_asm_2535+0x0 (bun-debug:arm64+0x10d36cf70)
#112 0x000111c2a454 in llint_call_javascript+0x4 (bun-debug:arm64+0x10d342454)
#113 0x00010ef836a4 in JSC::Interpreter::executeCallImpl(JSC::VM&,JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1322
#1140x00010ef84038inJSC::Interpreter::executeCall(JSC::JSObject*,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)Interpreter.cpp:1337
#1150x00010f6052dcinJSC::call(JSC::JSGlobalObject*,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:57
#1160x00010f605a30inJSC::profiledCall(JSC::JSGlobalObject*,JSC::ProfilingReason,JSC::JSValue,JSC::CallDataconst&,JSC::JSValue,JSC::ArgListconst&)CallData.cpp:78
#1170x00010fa311e8inJSC::runJSMicrotask(JSC::JSGlobalObject*,WTF::ObjectIdentifierGeneric<JSC::MicrotaskIdentifierType,WTF::ObjectIdentifierThreadSafeAccessTraits<unsignedlonglong>, unsigned long long>,JSC::JSValue,std::__1::span<JSC::JSValueconst,18446744073709551615ul>) JSMicrotask.cpp:67
#118 0x000110167970 in JSC::VM::drainMicrotasks() VM.cpp:1354
#119 0x000105fb1bb8 in Zig::GlobalObject::drainMicrotasks() ZigGlobalObject.cpp:3764
#120 0x000105fb1cdc in JSC__JSGlobalObject__drainMicrotasks ZigGlobalObject.cpp:3769
#121 0x00010777ab50 in bun.js.event_loop.drainMicrotasksWithGlobal event_loop.zig:114
#122 0x000107d07540 in bun.js.event_loop.Task.tickQueueWithCount Task.zig:493
#123 0x00010777aa84 in bun.js.event_loop.tickWithCount event_loop.zig:190
#124 0x000107296164 in bun.js.event_loop.tick event_loop.zig:462
#125 0x000107476fdc in bun.js.event_loop.waitForPromise event_loop.zig:484
#126 0x000106e08dd0 in bun.js.VirtualMachine.waitForPromise VirtualMachine.zig:766
#127 0x0001079a57b4 in bun.js.VirtualMachine.loadEntryPoint VirtualMachine.zig:2123
#128 0x000107451e00 in bun_js.Run.start bun_js.zig:323
#129 0x000106dd5b10 in bun.js.jsc.OpaqueWrap__anon_31358__struct_240880.callback jsc.zig:240
#130 0x000104a34dd8 in JSC__VM__holdAPILock bindings.cpp:5235
#131 0x0001067bfe9c in bun.js.bindings.VM.VM.holdAPILock VM.zig:41
#132 0x000106d0f1b0 in bun_js.Run.boot bun_js.zig:274
#133 0x000106d1600c in cli.run_command.RunCommand._bootAndHandleError run_command.zig:1248
#134 0x000106d15388 in cli.run_command.RunCommand.maybeOpenWithBunJS run_command.zig:1332
#135 0x000106d10030 in cli.run_command.RunCommand.exec run_command.zig:1377
#136 0x000106d34874 in cli.Command.start cli.zig:2300
#137 0x0001066d57a8 in cli.Cli.start cli.zig:59
#138 0x0001066d1a88 in main.main main.zig:66
#139 0x0001066d1854 in main start.zig:635
#140 0x000188dceb94 in start+0x17b8 (dyld:arm64+0xfffffffffff3ab94)
==33500==Register values:
x[0] = 0x00006130001c1018 x[1] = 0x00006130001c1030 x[2] = 0x00000004000c4410 x[3] = 0x000061000004bacc
x[4] = 0x0000000000000000 x[5] = 0x0000000000000018 x[6] = 0x0000000000000000 x[7] = 0x0000000000000001
x[8] = 0x000000016b4efb20 x[9] = 0x0000619000230608 x[10] = 0x000000016b4efb20 x[11] = 0x0000000000000004
x[12] = 0x00000c2000009759 x[13] = 0x0000000000000000 x[14] = 0xfa00000000000000 x[15] = 0x000010700001ffff
x[16] = 0x0000000000000000 x[17] = 0x00000000000008fd x[18] = 0x0000000000000000 x[19] = 0x00006130001c1030
x[20] = 0x00006130001c1018 x[21] = 0x00000001f7006f20 x[22] = 0x0000000121ed8368 x[23] = 0x0000000121e30290
x[24] = 0x0000000121e30330 x[25] = 0x0000000121e30290 x[26] = 0x0000000000000010 x[27] = 0x00000001f7006f20
x[28] = 0xfffe000000000002 fp = 0x000000016b4efb70 lr = 0x0000000121e3157c sp = 0x000000016b4efb20
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknownmodule>)
==33500==ABORTING
zsh: abort bun-debug ./check-dependency-updates.ts
risky@Mac 20454 %
Reproduced on 1.2.14, can't reproduce on bun 1.3.10
$ bun index.ts 133 ↵
Usage: bun run check-dependency-updates.ts [options]
Required options:
-d, --datasource <datasource> Datasource to use (e.g., docker, npm, pypi)
-p, --package <package> Package name to check
-v, --current-value <version> Current version/value
Optional:
--registry-url <url> Registry URL
--show-all-versions Include all available versions in output
--pretty Pretty print JSON output
-h, --help Show help
Examples:
bun run check-dependency-updates.ts -d docker -p redis -v 7.2.1
bun run check-dependency-updates.ts -d npm -p express -v "4.18.0" --pretty
bun run check-dependency-updates.ts -d pypi -p django -v "4.2.0" --show-all-versions
Posted by Claude (an LLM), on behalf of @nojaf, from a coredump analysis run on their machine. The commands, stack traces and disassembly quoted below are real output from that machine; the two clearly-marked speculative sections are the model's inference, not verified.
Still reproduces on Linux x64 with Bun 1.4.0, and I was able to symbolize it. Root cause looks like an ordering bug in Bun's node_module_register, not anything specific to re2.
Environment: Bun 1.4.0 (34cbb9a), Linux x64, glibc 2.44, libstdc++ 16, re2 1.26.1 (NODE_MODULE_VERSION 147)
Repro:
bun -e 'require("re2")'
panic(main thread): Floating point error at address 0x7F7CFBEADD91
Crashed while loading native module: .../re2/build/Release/re2.node
Root cause
Bun invokes the addon's registration callback synchronously from inside node_module_register, while ld.so is still walking the addon's .init_array. The stack shows this directly:
Entry [1] is the NODE_C_CTOR from NODE_MODULE_INIT(). Entry [2] constructs the file-scope static std::unordered_map<v8::Isolate*, AddonData*> addonDataMap (addon.cc:9). Because Bun runs the init function from entry [1], addonDataMap is still zeroed .bss when setAddonData() touches it.
The faulting instruction is the bucket-index computation on that not-yet-constructed map:
re2.node+0x4cd91: div %rdi # rdi <- <addonDataMap+0x8>, the bucket count
_M_bucket_count == 0 (a default-constructed unordered_map has 1), so hash % bucket_count is an integer divide by zero -> SIGFPE.
Note the recorded signal is misleading in the coredump: si_code is SI_TKILL and frame 0 is tgkill inside glibc raise() — that is Bun's own crash handler re-raising. The real fault is below the signal trampoline.
Why Node doesn't hit this
Node's node_module_register only appends the module to its pending list and returns; nm_register_func / nm_context_register_func is invoked later from DLOpen, after dlopen() has returned and every .init_array entry has run. Verified on the same machine — real Node 26.7.0 loads the exact same re2.node fine:
$ node -e 'require("re2")' # OK
$ bun -e 'require("re2")' # panic, 100% of the time
Note on the macOS report above
I suspect the original SIGSEGV at 0x0 on macOS is the same bug: libc++'s unordered_map dereferences the null bucket array pointer instead of dividing by a zero bucket count, so the same uninitialized-map access surfaces as a null deref rather than SIGFPE.
That would also explain the cluster of similar "Crashed while loading native module" reports against other addons that keep file-scope C++ globals — #23757 (better-sqlite3), #22474 (@pyroscope/nodejs), #20149 (node-pcsclite), #22630 (newrelic). I haven't verified those, so that part is a guess.
Suggested fix
Defer the register callback until after dlopen() returns, matching Node's modpending behaviour, rather than calling it from within node_module_register. Any addon whose registration constructor is ordered before its other file-scope constructors is currently exposed.
@nojaf Your analysis is correct. #42960 makes node_module_register only queue the module. process.dlopen then runs the init function after dlopen() returns, as Node does.
With that change, require("re2") no longer crashes in setAddonData. re2 1.26.1 does not load yet. The next stop is undefined symbol: _ZN2v86Object21SetNativeDataProperty..., a V8 function that Bun does not export. That gap is separate from the crash in this issue.
confirmed bugWe can reproduce this issuecrashAn issue that could cause a crashmacOSAn issue that occurs on macOSnapiCompatibility with the native layer of Node.jsruntime
Activity
github-actions commentedon Jun 17, 2025
@trashhalo, the latest version of Bun is v1.2.16, but this crash was reported on Bun v1.2.14.
Are you able to reproduce this crash on the latest version of Bun?
RiskyMH commentedon Jun 18, 2025
Can confirm. Just needed to ensure bun runtime for install (
bunx --bun bun install renovate). So wouldn't be suprised ifnode-gypdoesn't work well under bun's runtime as it works well when installed using actual node installed.Also ASAN trace:
github-actions commentedon Nov 25, 2025
Found 3 possible duplicate issues:
@confluentinc/kafka-javascript@1.6.0native modules #23756This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
github-actions commentedon Nov 28, 2025
Duplicate of #22031.
This issue has been automatically closed as a duplicate.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
kirillmarkelov commentedon Mar 2, 2026
Reproduced on 1.2.14, can't reproduce on bun 1.3.10
nojaf commentedon Aug 27, 2026
Posted by Claude (an LLM), on behalf of @nojaf, from a coredump analysis run on their machine. The commands, stack traces and disassembly quoted below are real output from that machine; the two clearly-marked speculative sections are the model's inference, not verified.
Still reproduces on Linux x64 with Bun 1.4.0, and I was able to symbolize it. Root cause looks like an ordering bug in Bun's
node_module_register, not anything specific to re2.Environment: Bun 1.4.0 (34cbb9a), Linux x64, glibc 2.44, libstdc++ 16, re2 1.26.1 (NODE_MODULE_VERSION 147)
Repro:
Root cause
Bun invokes the addon's registration callback synchronously from inside
node_module_register, whileld.sois still walking the addon's.init_array. The stack shows this directly:re2's
.init_arrayis ordered like this:Entry [1] is the
NODE_C_CTORfromNODE_MODULE_INIT(). Entry [2] constructs the file-scopestatic std::unordered_map<v8::Isolate*, AddonData*> addonDataMap(addon.cc:9). Because Bun runs the init function from entry [1],addonDataMapis still zeroed.bsswhensetAddonData()touches it.The faulting instruction is the bucket-index computation on that not-yet-constructed map:
_M_bucket_count == 0(a default-constructedunordered_maphas 1), sohash % bucket_countis an integer divide by zero -> SIGFPE.Note the recorded signal is misleading in the coredump:
si_codeisSI_TKILLand frame 0 istgkillinside glibcraise()— that is Bun's own crash handler re-raising. The real fault is below the signal trampoline.Why Node doesn't hit this
Node's
node_module_registeronly appends the module to its pending list and returns;nm_register_func/nm_context_register_funcis invoked later fromDLOpen, afterdlopen()has returned and every.init_arrayentry has run. Verified on the same machine — real Node 26.7.0 loads the exact samere2.nodefine:Note on the macOS report above
I suspect the original SIGSEGV at
0x0on macOS is the same bug: libc++'sunordered_mapdereferences the null bucket array pointer instead of dividing by a zero bucket count, so the same uninitialized-map access surfaces as a null deref rather than SIGFPE.That would also explain the cluster of similar "Crashed while loading native module" reports against other addons that keep file-scope C++ globals — #23757 (better-sqlite3), #22474 (@pyroscope/nodejs), #20149 (node-pcsclite), #22630 (newrelic). I haven't verified those, so that part is a guess.
Suggested fix
Defer the register callback until after
dlopen()returns, matching Node'smodpendingbehaviour, rather than calling it from withinnode_module_register. Any addon whose registration constructor is ordered before its other file-scope constructors is currently exposed.nojaf commentedon Sep 3, 2026
@robobun would a fix be accepted for this?
robobun commentedon Sep 16, 2026
@nojaf Your analysis is correct. #42960 makes
node_module_registeronly queue the module.process.dlopenthen runs the init function afterdlopen()returns, as Node does.With that change,
require("re2")no longer crashes insetAddonData. re2 1.26.1 does not load yet. The next stop isundefined symbol: _ZN2v86Object21SetNativeDataProperty..., a V8 function that Bun does not export. That gap is separate from the crash in this issue.Hardening: fix crashes across the runtime, bundler, dev server, shell…