Open pedrofracassi opened 5 months ago
This issue is stale and may be closed due to inactivity. If you're still running into this, please leave a comment.
@Electroid here is another small reproduction on Bun v1.1.25
- if this can help debug this issue:
// https://bun.sh/docs/api/workers
declare const self: Worker
function main() {
new Worker(import.meta.url).postMessage({})
}
self.addEventListener('message', () => {
throw new Error('test')
})
main() // runtime crash
Confirming it reproduces.
How can we reproduce the crash?
I'm not sure. It seems to happen sometimes when a Worker exists.
I'm using Elysia on the main thread, and
ioredis
+axios
within the worker. Unfortunately I can't share much due to it being a work project.JavaScript/TypeScript code that reproduces the crash?
This seems to be the last thing than runs fine before the segfault
(on the main thread)
Within the worker, the function I'm using to exit:
Calling it like this inside another function that's called every second with
setInterval
:Relevant log output
Stack Trace (bun.report)
Bun v1.1.8 (
89d2580
) on macos aarch64 [AutoCommand]Segmentation fault at address 0x00000011
JSC::CodeCacheMap::pruneSlowCase
JSC__JSValue__fromEntries
src.comptime_string_map.ComptimeStringMapWithKeyType
src.comptime_string_map.ComptimeStringMapWithKeyType
src.bun.js.bindings.bindings.JSGlobalObject.throwInvalidArguments__anon_384460
TCPSocketPrototype__upgradeTLS
WebCore::JSTimeout::destroy
JSC::VM::~VM