oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
71.45k stars 2.52k forks source link

Bun Crash in Windows 10 #10675

Open LeizarM opened 1 month ago

LeizarM commented 1 month ago

How can we reproduce the crash?

When I try call to api locally using bun with ElysiaJS show the next error ... please your help

Relevant log output

============================================================
Bun v1.1.6 (e58d67b4) Windows x64
Args: "C:\Users\MLEIZAR\.bun\bin\bun.exe", "run", "--watch", "src/index.ts"
Features: dotenv http_server transpiler_cache(2) tsconfig(2)
Builtins: "bun:main" "node:async_hooks" "node:child_process" "node:events" "node:fs" "node:fs/promises" "node:os" "node:path" "node:string_decoder" "node:tty" "node:util" "node:util/types"      
Elapsed: 6435ms | User: 281ms | Sys: 265ms
RSS: 0.23GB | Peak: 0.23GB | Commit: 0.28GB | Faults: 56174

panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
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.6/wr1e58d67bAgkwgwCmq0puCk/r+Jm831JomgzOm2g+vC__A2DD

--- Bun is auto-restarting due to crash [time: 1714441656876] ---
Listening on port 3001

Stack Trace (bun.report)

Bun v1.1.6 (e58d67b) on windows x86_64 [RunCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

gvilums commented 1 month ago

Thanks for the bug report. Is there a chance you could publish your js sources and package.json file so that we can reproduce the issue?

LeizarM commented 1 month ago

My project is here: https://github.com/LeizarM/clean-api.git

is very simple implementis, Elysia js, prisma and TS

gvilums commented 1 month ago

I tried cloning the project and running bun dev, but I unfortunately can't reproduce the issue

LeizarM commented 1 month ago

You try this ?

Capture

LeizarM commented 1 month ago

because I tried this before and ... crash

Capture

Jarred-Sumner commented 1 month ago

Line causing the error: https://github.com/oven-sh/bun/blob/bd632464a0fa14a9757ec56f5cfb30831fba99fe/src/bun.js/bindings/ZigGlobalObject.cpp#L1928

Call stack:

WTFCrashWithInfo(int, char const*, char const*, int) (/Users/jarred/Code/bun/src/bun.js/WebKit/WebKitBuild/Debug/WTF/Headers/wtf/Assertions.h:851)
JSC::JSFunction::jsExecutable() const (/Users/jarred/Code/bun/src/bun.js/WebKit/WebKitBuild/Debug/JavaScriptCore/PrivateHeaders/JavaScriptCore/JSFunctionInlines.h:77)
::ReadableStreamTag__tagged(Zig::GlobalObject *, JSC__JSValue *, void **) (/Users/jarred/Code/bun/src/bun.js/bindings/ZigGlobalObject.cpp:1928)
src.bun.js.webcore.streams.ReadableStream.fromJS (/Users/jarred/Code/bun/src/bun.js/webcore/streams.zig:252)
src.bun.js.webcore.body.Body.Value.fromJS (/Users/jarred/Code/bun/src/bun.js/webcore/body.zig:570)
src.bun.js.webcore.body.Body.extract (/Users/jarred/Code/bun/src/bun.js/webcore/body.zig:944)
ResponseClass__construct (/Users/jarred/Code/bun/src/bun.js/webcore/response.zig:491)
WebCore::JSResponseConstructor::construct(JSC::JSGlobalObject*, JSC::CallFrame*) (/Users/jarred/Code/bun/build/codegen/ZigGeneratedClasses.cpp:29983)
1194F4490 (@1194f4490..1194f4510:3)

In a release build:

parseMode (/Users/jarred/Code/bun/build-release/bun-webkit/include/JavaScriptCore/UnlinkedFunctionExecutable.h:89)
parseMode (/Users/jarred/Code/bun/build-release/bun-webkit/include/JavaScriptCore/FunctionExecutable.h:160)
isAsyncGenerator (/Users/jarred/Code/bun/build-release/bun-webkit/include/JavaScriptCore/FunctionExecutable.h:141)
::ReadableStreamTag__tagged() (/Users/jarred/Code/bun/src/bun.js/bindings/ZigGlobalObject.cpp:1928)
src.bun.js.webcore.streams.ReadableStream.fromJS (/Users/jarred/Code/bun/src/bun.js/webcore/streams.zig:252)
src.bun.js.webcore.body.Body.Value.fromJS (/Users/jarred/Code/bun/src/bun.js/webcore/body.zig:570)
src.bun.js.webcore.body.Body.extract (/Users/jarred/Code/bun/src/bun.js/webcore/body.zig:944)
ResponseClass__construct (/Users/jarred/Code/bun/src/bun.js/webcore/response.zig:491)
::construct() (/Users/jarred/Code/bun/build-release/codegen/ZigGeneratedClasses.cpp:29983)
138010490 (@138010490..138010510:3)