Open renat2985 opened 1 month ago
The site is often visited by bots, and I often see such errors. Perhaps this is somehow related to the crash.
const server = Bun.serve({ fetch(req, server) { let url; try { url = new URL(req.url); } catch (error) { console.error('Error parsing URL:', error); return new Response('Bad Request', { status: 400 }); }
Error parsing URL: 27 | }); 28 | } 29 | 30 | let url; 31 | try { 32 | url = new URL(req.url); ^ TypeError: "1.1.1.1:443" cannot be parsed as a URL.
Bun v1.1.21 (70ca2b76) Linux x64 Linux Kernel v5.4.0 | glibc v2.31 CPU: sse42 popcnt avx avx2 Args: "***" Features: jsc fetch(19) http_server Builtins: "bun:main" "bun:sqlite" Elapsed: 685798740ms | User: 843834ms | Sys: 2204722ms RSS: 1.07GB | Peak: 0.23GB | Commit: 1.07GB | Faults: 0 panic(main thread): Segmentation fault at address 0x2 oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Bun v1.1.21 (70ca2b7) on linux x86_64 [AutoCommand]
70ca2b7
Segmentation fault at address 0x00000002
ld-temp.o:0
WTF::jscSignalHandler
??
llint_call_javascript
JSC::Interpreter::executeCall
JSC::profiledCall
bindings.cpp:2411
JSObjectCallAsFunctionReturnValue
bindings.zig:3856
src.deps.uws.AnyWebSocket.cork__anon_112238.Wrapper.wrap
MoveOnlyFunction.h:247
uws_ws_cork
uws.zig:0
src.deps.uws.WebSocketBehavior.Wrap
uWS::WebSocketContext<false, true, void*>::handleFragment
Friday we added some fixes on server.zig, can you try bun upgrade --canary and check if is still happening?
bun upgrade --canary
How can we reproduce the crash?
The site is often visited by bots, and I often see such errors. Perhaps this is somehow related to the crash.
Relevant log output
Stack Trace (bun.report)
Bun v1.1.21 (
70ca2b7
) on linux x86_64 [AutoCommand]Segmentation fault at address 0x00000002
ld-temp.o:0
:WTF::jscSignalHandler
??
ld-temp.o:0
:llint_call_javascript
ld-temp.o:0
:JSC::Interpreter::executeCall
ld-temp.o:0
:JSC::profiledCall
bindings.cpp:2411
:JSObjectCallAsFunctionReturnValue
bindings.zig:3856
:src.deps.uws.AnyWebSocket.cork__anon_112238.Wrapper.wrap
MoveOnlyFunction.h:247
:uws_ws_cork
uws.zig:0
:src.deps.uws.WebSocketBehavior.Wrap
MoveOnlyFunction.h:247
:uWS::WebSocketContext<false, true, void*>::handleFragment