oven-sh / bun

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

crash during test discord.js #10539

Closed jumoog closed 2 weeks ago

jumoog commented 4 months ago

How can we reproduce the crash?

run test file

Relevant log output

PS C:\Repos\DiscordBot> bun test
bun test v1.1.5 (b257a309)

permission.test.ts:
============================================================
Bun v1.1.5 (b257a309) Windows x64
Args: "C:\Users\user\.bun\bin\bun.exe", "test"
Features: Bun.stdin(2) dotenv fetch transpiler_cache(3) tsconfig(4) WebSocket
Builtins: "node:buffer" "node:events" "node:fs" "node:fs/promises" "node:http" "node:path" "node:string_decoder" "node:timers" "node:timers/promises" "node:url" "node:util" "node:util/types" "node:zlib" "node:worker_threads" "undici" "ws"
Elapsed: 864ms | User: 15ms | Sys: 0ms
RSS: 0.15GB | Peak: 0.15GB | Commit: 0.19GB | Faults: 37723

panic(main thread): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.5 ([#10527](https://github.com/oven-sh/bun/pull/10527)) on windows x86_64 [TestCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

- `us_socket_raw_write`
- `??`
- `??`
- `quote_cmd_arg`
- `fs__open`
- `??`
- [`thread_pool.zig:455`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/thread_pool.zig#L455): `notifySlow`
- [`options.zig:2071`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/options.zig#L2071): `toJS`
- [`streams.zig:4310`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/bun.js/webcore/streams.zig#L4310): `append`
- [`fmt.zig:1020`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/deps/zig/lib/std/fmt.zig#L1020): `formatBuf`

<!-- from bun.report: S-T5ZKYbA6ty_zWc06Qc -->
jumoog commented 4 months ago

testing my bot using discord.js

Johannes7k75 commented 4 months ago

I have the same issue

LuticaCANARD commented 4 months ago

I have the same issue

Bun v1.1.5 (b257a309) Windows x64
Args: "C:\Users\...\.bun\bin\bun.exe", "--hot", "index.ts"
Features: Bun.stdin(2) dotenv fetch(2) transpiler_cache(4) tsconfig(4) WebSocket 
Builtins: "bun:main" "node:buffer" "node:events" "node:fs" "node:fs/promises" "node:http" "node:os" "node:path" "node:string_decoder" "node:timers" "node:timers/promises" "node:url" "node:util" "node:util/types" "node:zlib" "node:worker_threads" "undici" "ws" 
Elapsed: 1198ms | User: 46ms | Sys: 31ms
RSS: 0.17GB | Peak: 0.17GB | Commit: 0.23GB | Faults: 42859

Bun v1.1.5 ([#10527](https://github.com/oven-sh/bun/pull/10527)) on windows x86_64 [AutoCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

- `??`
- `??`
- `quote_cmd_arg`
- `fs__open`
- `??`
- [`javascript.zig:829`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/bun.js/javascript.zig#L829): `onUnhandledError`
- `JSC__JSValue__callCustomInspectFunction`
- [`shimmer.zig:186`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/bun.js/bindings/shimmer.zig#L186): `cppFn`
- [`resolve_path.zig:1635`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/resolver/resolve_path.zig#L1635): `normalizeStringWindowsT`
- [`cli.zig:1845`](https://github.com/oven-sh/bun/blob/b257a309772db2e9dfb745f97068aea6a32ca151/src/cli.zig#L1845): `start`

<!-- from bun.report: aT3Hnd29BTvNhSgOoRvM -->
jumoog commented 3 months ago

still happens in v1.1.6

Bun v1.1.6 ([#10596](https://github.com/oven-sh/bun/pull/10596)) on windows x86_64 [TestCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

- `??`
- `??`
- `quote_cmd_arg`
- `fs__open`
- `??`
- [`thread_pool.zig:455`](https://github.com/oven-sh/bun/blob/e58d67b46875280bc9002add4c3fae45472cb346/src/thread_pool.zig#L455): `notifySlow`
- [`options.zig:2071`](https://github.com/oven-sh/bun/blob/e58d67b46875280bc9002add4c3fae45472cb346/src/options.zig#L2071): `toJS`
- [`streams.zig:4310`](https://github.com/oven-sh/bun/blob/e58d67b46875280bc9002add4c3fae45472cb346/src/bun.js/webcore/streams.zig#L4310): `append`
- [`fmt.zig:1020`](https://github.com/oven-sh/bun/blob/e58d67b46875280bc9002add4c3fae45472cb346/src/deps/zig/lib/std/fmt.zig#L1020): `formatBuf`
- [`event_loop.zig:788`](https://github.com/oven-sh/bun/blob/e58d67b46875280bc9002add4c3fae45472cb346/src/bun.js/event_loop.zig#L788): `exit`

<!-- from bun.report: hBmg3qIvFXdffGkPduW8 -->

#10596

cirospaciari commented 2 weeks ago

Fixed in canary v1.1.22 if is happening after bun upgrade --canary feel free to reopen