bun icon indicating copy to clipboard operation
bun copied to clipboard

bun install crashes with attempt to unwrap error

Open ShadyShenAli opened this issue 1 year ago • 5 comments

What version of Bun is running?

1.1.0+5903a6141

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

in powershell or in cmd, execute

  • bun repl
  • bun run a.js
  • bun install will result in crashes.

What is the expected behavior?

not crash

What do you see instead?

crash like

uh-oh: attempt to unwrap error
bun will crash now 😭😭😭

----- bun meta -----
Bun v1.1.0 (5903a614) Windows x64 (baseline)
BunxCommand:
Elapsed: 7ms | User: 15ms | Sys: 15ms
RSS: 19.47MB | Peak: 19.47MB | Commit: 62.13MB | Faults: 4880
----- bun meta -----

0   00007FF7211A8158
1   ???
2   ???
3   ???
4   ???
5   ???
6   ???
7   ???
8   ???
9   ???
10  ???
11  ???
12  ???
13  ???
14  ???

Search GitHub issues https://bun.sh/issues or join in #windows channel in https://bun.sh/discord

thread 15344 panic: attempt to unwrap error
???:?:?: 0x7ff71fb7922c in ??? (bun.exe)
???:?:?: 0x7ff720069406 in ??? (bun.exe)
???:?:?: 0x7ff71fe6d7f3 in ??? (bun.exe)
???:?:?: 0x7ff71fb8b5ca in ??? (bun.exe)
???:?:?: 0x7ff71fb892cb in ??? (bun.exe)
???:?:?: 0x7ff71fb8479f in ??? (bun.exe)
???:?:?: 0x7ff71fd1242a in ??? (bun.exe)
???:?:?: 0x7ff71fd75ed8 in ??? (bun.exe)
???:?:?: 0x7ff71fe0485f in ??? (bun.exe)
???:?:?: 0x7ff71fb415fe in ??? (bun.exe)
???:?:?: 0x7ff72265f2d3 in ??? (bun.exe)
???:?:?: 0x7fff76f3257c in ??? (KERNEL32.DLL)
???:?:?: 0x7fff7774aa57 in ??? (ntdll.dll)

Additional information

No response

ShadyShenAli avatar Apr 02 '24 07:04 ShadyShenAli

Same on mine too.

virtualabishek avatar Apr 02 '24 07:04 virtualabishek

same

nicosql avatar Apr 04 '24 01:04 nicosql

same +1 running a websocket server and randomly crashing

Moe03 avatar Apr 19 '24 06:04 Moe03

@ShadyShenAli can you try again in bun v1.1.8?

Jarred-Sumner avatar May 12 '24 07:05 Jarred-Sumner

I'm afraid it still crashes with 1.1.18

c:\TEMP\bun\workspace>bun repl
Resolving [1/1] ============================================================
Bun v1.1.8 (89d25807) Windows x64
Args: "C:\TEMP\bun\bin\bun.exe", "add", "bun-repl@latest", "--no-summary", "--no-cache", "--force"
Elapsed: 1045ms | User: 31ms | Sys: 125ms
RSS: 51.48MB | Peak: 51.48MB | Commit: 92.39MB | Faults: 12764

panic(main thread): reached unreachable code
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.8/wI189d2580AA0mviH23+jFqv9jQqxsjQw25jEqvrjE2++nEu+7uFqg4BiiJA1

related crash report

Bun v1.1.8 ([`89d2580`](<https://github.com/oven-sh/bun/tree/89d25807fbf4488d3bfcb116484d0c2cf824f98c>)) on windows x86_64 [AddCommand]

**panic**: reached unreachable code

- [`Progress.zig:251`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/deps/zig/lib/std/Progress.zig#L251>): `clearWithHeldLock`
- [`Mutex.zig:131`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/deps/zig/lib/std/Thread/Mutex.zig#L131>): `unlock`
- [`install.zig:5848`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/install/install.zig#L5848>): `runTasks`
- [`install.zig:10702`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/install/install.zig#L10702>): `isDone`
- [`event_loop.zig:1902`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/bun.js/event_loop.zig#L1902>): `tick`
- [`install.zig:8561`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/install/install.zig#L8561>): `updatePackageJSONAndInstallWithManagerWithUpdates`
- [`install.zig:8332`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/install/install.zig#L8332>): `updatePackageJSONAndInstall`
- [`cli.zig:1447`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/cli.zig#L1447>): `start`
- [`cli.zig:62`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/cli.zig#L62>): `start`
- [`main.zig:51`](<https://github.com/oven-sh/bun/blob/89d25807fbf4488d3bfcb116484d0c2cf824f98c/src/main.zig#L51>): `main`

<!-- from bun.report: 3448M-SBwG2FKltHt7Se -->

ShadyShenAli avatar May 23 '24 02:05 ShadyShenAli

fixed in 1.1.10 :)

ShadyShenAli avatar May 27 '24 01:05 ShadyShenAli