oven-sh / bun

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

Bun Crash on Windows: panic(main thread): Internal assertion failure #10920

Open vgseven opened 6 months ago

vgseven commented 6 months ago

How can we reproduce the crash?

I don't know exactly how Crash happened but, While running Next.js 14 application created using bun and running using bun --bun run dev server crashed when I forget to enter argument to Link tag of Next.js and saved it.

JavaScript/TypeScript code that reproduces the crash?

Missing tag in Link.

<Link>signin</Link>

Relevant log output

⨯ Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead.
    at createPropError (C:\Users\-\.next\server\chunks\ssr\node_modules_5ba090._.js:13160:268)
    at <anonymous> (C:\Users\-\.next\server\chunks\ssr\node_modules_5ba090._.js:13171:24)
    at forEach (:1:11)
    at LinkComponent (C:\Users\-\.next\server\chunks\ssr\node_modules_5ba090._.js:13168:16)
digest: "796709166"
 GET /signup 500 in 3304ms
============================================================
Bun v1.1.7 (b0b7db5c) Windows x64
Args: "C:\Users\admin\AppData\Local\Temp\bun-node-b0b7db5c0\node.exe", "C:\Users\-\node_modules\next\dist\server\lib\start-server.js"
Features: jsc Bun.stderr Bun.stdin Bun.stdout abort_signal dotenv fetch(8) http_server spawn(4) transpiler_cache(35) tsconfig_paths(2) tsconfig(2) 
Builtins: "bun:jsc" "bun:main" "detect-libc" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:querystring" "node:stream" "node:stream/web" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" "node:worker_threads" "ws" "node:v8" "node:diagnostics_channel" 
Elapsed: 2252514ms | User: 51156ms | Sys: 33937ms
RSS: 0.96GB | Peak: 1.98GB | Commit: 5.95GB | Faults: 1560794

panic(main thread): Internal assertion failure
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.7 (b0b7db5) on windows x86_64 [RunAsNodeCommand]

panic: Internal assertion failure

vgseven commented 6 months ago

Bun Crashed again when I visit route that doesn't exist.

GET /signin 404 in 673ms

Bun v1.1.7 (b0b7db5c) Windows x64 Args: "C:\Users\admin\AppData\Local\Temp\bun-node-b0b7db5c0\node.exe", "C:\Users\node_modules\next\dist\server\lib\start-server.js" Features: jsc Bun.stderr Bun.stdin Bun.stdout dotenv fetch(2) http_server spawn(4) transpiler_cache(25) tsconfig_paths(2) tsconfig(2) Builtins: "bun:jsc" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:dns/promises" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:querystring" "node:stream" "node:stream/web" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" "node:worker_threads" "ws" "node:v8" "node:diagnostics_channel" Elapsed: 91617ms | User: 19875ms | Sys: 3750ms RSS: 0.95GB | Peak: 1.30GB | Commit: 5.47GB | Faults: 420402

panic(main thread): Internal assertion failure oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Bun is crashing when bun --bun run dev is used, means bun crashes in bun environment only not in node.

vgseven commented 6 months ago

⨯ error: Attempt to export a nullable value for "TextDecoderStream"

Compiling /_error ... 1 | (()=>{var __webpack_modules__={45:e=>{e.exports='"use strict";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, "name", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === "object" || typeof from === "function") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);\n\n// src/primitives/abort-controller.js\nvar abort_controller_expor | ... truncated

while running bun --bun run next dev