Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seg fault when using SSH2 and exception thrown #12345

Closed
PhilBladen opened this issue Jul 4, 2024 · 2 comments
Closed

Seg fault when using SSH2 and exception thrown #12345

PhilBladen opened this issue Jul 4, 2024 · 2 comments
Labels
crash An issue that could cause a crash runtime windows An issue that is known to occur on Windows

Comments

@PhilBladen
Copy link

PhilBladen commented Jul 4, 2024

How can we reproduce the crash?

Run bun i ssh2 first. Then run:

import "ssh2";
throw new Error("This is a test error");

Relevant log output

1 | import "ssh2";
2 | throw new Error("This is a test error");
          ^
error: This is a test error
      at D:\segfault.mjs:2:7

Bun v1.1.17 (Windows x64)
============================================================
Bun v1.1.17 (bb66bba1) Windows x64
Args: "C:\Users\Phil\.bun\bin\bun.exe" ".\segfault.mjs"
Features: jsc transpiler_cache(5) 
Builtins: "bun:main" "node:assert" "node:buffer" "node:child_process" "node:crypto" "node:dns" "node:events" "node:fs" "node:http" "node:https" "node:net" "node:path" "node:stream" "node:string_decoder" "node:tls" "node:util" "node:util/types" "node:zlib" 
Elapsed: 321ms | User: 15ms | Sys: 15ms
RSS: 0.29GB | Peak: 0.29GB | Commit: 0.36GB | Faults: 71044

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

Stack Trace (bun.report)

Bun v1.1.17 (bb66bba) on windows x86_64 [AutoCommand]

Segmentation fault at address 0x7FF8001C3B38

  • 1 unknown/js code
  • ??? at 0x5177c in ntdll.dll
  • ??? at 0x514d7 in ntdll.dll
  • ??? at 0x5117d in ntdll.dll
  • ??? at 0x17fab in KERNEL32.DLL
  • ??? at 0x1bed8 in ucrtbase.dll
  • ??? at 0x1c099 in ucrtbase.dll
  • Global.zig:123: exitWide
  • Global.zig:106: exit
  • bun_js.zig:313: start
@PhilBladen PhilBladen added the crash An issue that could cause a crash label Jul 4, 2024
@github-actions github-actions bot added runtime windows An issue that is known to occur on Windows labels Jul 4, 2024
@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Jul 6, 2024

wow thank you for this reproduction

we've seen at least 180 crash reports with a similar stacktrace, and had no way to reproduce this

@Jarred-Sumner
Copy link
Collaborator

Turns out it's caused by cpu-features which relies on V8 C++ APIs

Please follow along in #4290. @190n is actively working on fixing it.

@Jarred-Sumner Jarred-Sumner closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash runtime windows An issue that is known to occur on Windows
Projects
None yet
Development

No branches or pull requests

2 participants