oven-sh / bun

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

bun test Segfault at 0x29725E800D0 #13276

Open subtleGradient opened 1 month ago

subtleGradient commented 1 month ago

How can we reproduce the crash?

working on figuring out a mini repro…

Relevant log output

2024-08-13T21:12:45.3740621Z ##[group]Run cd frontend; bun test
2024-08-13T21:12:45.3741127Z cd frontend; bun test
2024-08-13T21:12:45.3807114Z shell: /usr/bin/bash -e {0}
2024-08-13T21:12:45.3807522Z ##[endgroup]
2024-08-13T21:12:45.3915184Z bun test v1.1.22-canary.96 (df33f2b2)
2024-08-13T21:12:45.4006525Z 
2024-08-13T21:12:45.4008078Z ##[group]src/data-stores/RemoteStore.test.ts:
2024-08-13T21:12:45.4556683Z 
2024-08-13T21:12:45.4557922Z ##[endgroup]
2024-08-13T21:12:45.4558561Z 
2024-08-13T21:12:45.4559829Z ##[group]src/data-stores/AsyncStore.test.ts:
2024-08-13T21:12:45.4745313Z (todo) AsyncStore > isEqual returns true for equal AsyncState objects
2024-08-13T21:12:45.4749452Z (todo) AsyncStore > isEqual returns false for different AsyncState objects
2024-08-13T21:12:45.4816597Z (todo) AsyncStore > constructor initializes with an empty AsyncState
2024-08-13T21:12:45.4818483Z 
2024-08-13T21:12:45.4823502Z ##[endgroup]
2024-08-13T21:12:45.4823855Z 
2024-08-13T21:12:45.4824792Z ##[group]src/map/measureGlobularDistance.test.ts:
2024-08-13T21:12:45.4837159Z 
2024-08-13T21:12:45.4838070Z ##[endgroup]
2024-08-13T21:12:45.4838767Z 
2024-08-13T21:12:45.4840075Z ##[group]src/map/map-math.test.ts:
2024-08-13T21:12:45.4910024Z (skip) applyRotationToLongitude > returns a number
2024-08-13T21:12:45.4911830Z (skip) applyRotationToLongitude > normalizes a full rotation to 0
2024-08-13T21:12:45.4914731Z (skip) applyRotationToLongitude > normalizes a full rotation to 0
2024-08-13T21:12:45.4916445Z (skip) applyRotationToLongitude > returns NaN when rotation is not a number
2024-08-13T21:12:45.4917428Z 
2024-08-13T21:12:45.4918074Z ##[endgroup]
2024-08-13T21:12:45.4918398Z 
2024-08-13T21:12:45.4919193Z ##[group]src/lib/Store.test.ts:
2024-08-13T21:12:45.4935390Z (pass) Store > construction > can be created [0.25ms]
2024-08-13T21:12:45.4937447Z (pass) Store > construction > can be created with a default value [0.21ms]
2024-08-13T21:12:45.4941028Z (pass) Store > construction > can be created with a custom equality function [0.37ms]
2024-08-13T21:12:45.4942975Z (pass) Store > get > exists [0.06ms]
2024-08-13T21:12:45.4945135Z (pass) Store > get > returns the current value [0.06ms]
2024-08-13T21:12:45.5051744Z (pass) Store > set > with setter function > async > sets the value [10.52ms]
2024-08-13T21:12:45.5163670Z (pass) Store > set > with setter function > async > sets the latest value [11.29ms]
2024-08-13T21:12:45.5166473Z (pass) Store > set > with setter function > sets the value [0.20ms]
2024-08-13T21:12:45.5191733Z (pass) Store > set > with setter function > calls subscribers [0.14ms]
2024-08-13T21:12:45.5192819Z (pass) Store > set > exists [0.05ms]
2024-08-13T21:12:45.5193826Z (pass) Store > set > sets the value [0.05ms]
2024-08-13T21:12:45.5194791Z (pass) Store > set > calls subscribers [0.07ms]
2024-08-13T21:12:45.5195825Z (pass) Store > subscribe > can be subscribed to [0.15ms]
2024-08-13T21:12:45.5197078Z (pass) Store > subscribe > can be unsubscribed from [0.11ms]
2024-08-13T21:12:45.5198368Z (pass) Store > subscribe > can be unsubscribed from multiple times [0.09ms]
2024-08-13T21:12:45.5200052Z (pass) Store > subscribe > can be unsubscribed from inside a subscription [0.09ms]
2024-08-13T21:12:45.5201515Z (pass) Store > get > returns the current value [0.06ms]
2024-08-13T21:12:45.5202787Z (pass) Store > get > returns the current value after a set [0.06ms]
2024-08-13T21:12:45.5219148Z (pass) Store > get > returns the current value after a set with the same value [0.18ms]
2024-08-13T21:12:45.5220258Z (pass) Store > set > compare > calls the compare function with the previous and next values [0.07ms]
2024-08-13T21:12:45.5221067Z (pass) Store > set > sets the value [0.05ms]
2024-08-13T21:12:45.5221780Z (pass) Store > set > sets the value with the same value [0.04ms]
2024-08-13T21:12:45.5222427Z (pass) Store > set > calls subscribers [0.07ms]
2024-08-13T21:12:45.5223141Z (pass) Store > set > does not call subscribers if the value is the same [0.11ms]
2024-08-13T21:12:45.5224218Z (pass) Store > useSyncExternalStore > can be used [0.07ms]
2024-08-13T21:12:45.5224862Z (pass) Store > exists [0.02ms]
2024-08-13T21:12:45.5225154Z 
2024-08-13T21:12:45.5225636Z ##[endgroup]
2024-08-13T21:12:45.5225840Z 
2024-08-13T21:12:45.5226230Z ##[group]src/lib/usable.test.ts:
2024-08-13T21:12:45.5227116Z (pass) use > promise-like objects > throws if the usable is promise-like [0.19ms]
2024-08-13T21:12:45.5228209Z (pass) use > promise-like objects > throws if the usable is promise-like and pending [0.09ms]
2024-08-13T21:12:45.5229237Z (pass) use > promise-like objects > throws if the usable is promise-like and rejected [0.09ms]
2024-08-13T21:12:45.5229995Z (pass) use > exists [0.05ms]
2024-08-13T21:12:45.5230476Z (pass) use > throws when given a regular value [0.05ms]
2024-08-13T21:12:45.5231153Z (pass) use > throws the promise if the usable is pending [0.09ms]
2024-08-13T21:12:45.5231914Z (pass) use > throws if the usable is rejected [0.28ms]
2024-08-13T21:12:45.5232587Z (pass) use > returns the value if the usable is fulfilled [0.16ms]
2024-08-13T21:12:45.5233014Z 
2024-08-13T21:12:45.5233436Z ##[endgroup]
2024-08-13T21:12:45.5233646Z 
2024-08-13T21:12:45.5234038Z ##[group]src/lib/Subscribable.test.ts:
2024-08-13T21:12:45.5247789Z (pass) Subscribable > initializes onSubscriberCountChange as null [0.04ms]
2024-08-13T21:12:45.5254037Z (pass) Subscribable > sets onSubscriberCountChange correctly [0.06ms]
2024-08-13T21:12:45.5260610Z (pass) Subscribable > subscribes to a callback [0.11ms]
2024-08-13T21:12:45.5265267Z 
2024-08-13T21:12:45.5266124Z ##[endgroup]
2024-08-13T21:12:45.5271313Z 
2024-08-13T21:12:45.5272336Z ##[group]src/utils/debounce.test.ts:
2024-08-13T21:12:45.5440537Z (pass) debounceAsync > cancel > cancels the debounced function [10.85ms]
2024-08-13T21:12:45.5451301Z (pass) debounceAsync > flush > immediately executes the debounced function [1.00ms]
2024-08-13T21:12:45.5581963Z (pass) debounceAsync > maxWait option > executes the debounced function after the maxWait time [12.95ms]
2024-08-13T21:12:45.5689494Z (pass) debounceAsync > debounces an expensive async function [10.79ms]
2024-08-13T21:12:45.6797151Z (pass) debounceAsync > executes the debounced function after the "waitFor" time [110.90ms]
2024-08-13T21:12:45.6798359Z 
2024-08-13T21:12:45.6799415Z ##[endgroup]
2024-08-13T21:12:45.6808602Z 
2024-08-13T21:12:45.6809487Z ##[group]src/onboarding/UserSessionStore.test.ts:
2024-08-13T21:12:45.6818670Z 
2024-08-13T21:12:45.6819362Z ##[endgroup]
2024-08-13T21:12:45.6820182Z 
2024-08-13T21:12:45.6821316Z ##[group]src/v0-ASAP/v0-ASAP.test.ts:
2024-08-13T21:12:45.6958057Z 
2024-08-13T21:12:45.6959035Z ##[endgroup]
2024-08-13T21:12:45.6959443Z 
2024-08-13T21:12:45.6960211Z ##[group]src/forms/swap/SwapStore.test.ts:
2024-08-13T21:12:46.3468951Z ============================================================
2024-08-13T21:12:46.3470664Z Bun Canary v1.1.22-canary.96 (df33f2b2) Linux x64 (baseline)
2024-08-13T21:12:46.3471647Z Linux Kernel v6.5.0 | glibc v2.35
2024-08-13T21:12:46.3472371Z CPU: sse42 popcnt avx avx2
2024-08-13T21:12:46.3473113Z Args: "bun" "test"
2024-08-13T21:12:46.3473982Z Features: jsc bunfig tsconfig_paths(7) tsconfig(13) 
2024-08-13T21:12:46.3476263Z Builtins: "node:buffer" "node:crypto" "node:fs" "node:http" "node:https" "node:net" "node:path" "node:string_decoder" "node:url" "node:util" "node:util/types" "node:zlib" "ws" "node-fetch" 
2024-08-13T21:12:46.3478148Z Elapsed: 955ms | User: 674ms | Sys: 105ms
2024-08-13T21:12:46.3479119Z RSS: 1.00GB | Peak: 0.20GB | Commit: 1.00GB | Faults: 0
2024-08-13T21:12:46.3479720Z 
2024-08-13T21:12:46.3480216Z panic(main thread): Segmentation fault at address 0x29725E800D0
2024-08-13T21:12:46.3481594Z oh no: Bun has crashed. This indicates a bug in Bun, not your code.
2024-08-13T21:12:46.3482288Z 
2024-08-13T21:12:46.3482781Z To send a redacted crash report to Bun's team,
2024-08-13T21:12:46.3483866Z please file a GitHub issue using the link below:
2024-08-13T21:12:46.3484399Z 
2024-08-13T21:12:46.3486868Z  https://bun.report/1.1.22/Bt2df33f2bAiigggDu+6/iE+xyQ6jgw2Ewxsi0Em3/h0E4ipo0E6j3t2Eykoo0E25so0E2y//zEA2upBgtgg9lB
2024-08-13T21:12:46.3488064Z 
2024-08-13T21:12:46.5439359Z /home/runner/work/_temp/52619031-918f-42c0-9da8-8eca61c1f11f.sh: line 1:  2126 Illegal instruction     (core dumped) bun test
2024-08-13T21:12:46.9803070Z ##[error]Process completed with exit code 132.
2024-08-13T21:12:46.9904302Z Post job cleanup.
2024-08-13T21:12:46.9977977Z Post job cleanup.
2024-08-13T21:12:47.0923375Z [command]/usr/bin/git version
2024-08-13T21:12:47.0964421Z git version 2.46.0
2024-08-13T21:12:47.1013107Z Temporarily overriding HOME='/home/runner/work/_temp/45f6d548-b34b-4f0d-ac31-6a021c98b1fc' before making global git config changes
2024-08-13T21:12:47.1015562Z Adding repository directory to the temporary git global config as a safe directory
2024-08-13T21:12:47.1019557Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/v4/v4
2024-08-13T21:12:47.1063217Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2024-08-13T21:12:47.1099327Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2024-08-13T21:12:47.1351927Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2024-08-13T21:12:47.1376324Z http.https://github.com/.extraheader
2024-08-13T21:12:47.1392695Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2024-08-13T21:12:47.1442134Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2024-08-13T21:12:47.1915542Z Cleaning up orphan processes

Stack Trace (bun.report)

Bun v1.1.22 (df33f2b) on linux x86_64_baseline [TestCommand]

Segmentation fault at address 0x29725E800D0

Jarred-Sumner commented 1 month ago

@subtleGradient can you verify that running bun upgrade doesn't fix it?