Skip to content

Bun crashes in Claude Code cause Windows BSOD (KERNEL_SECURITY_CHECK_FAILURE) — full system reboots on Windows 11 x64 #27692

@joe-hireable

Description

@joe-hireable

What version of Bun is running?

1.3.10+30e609e08

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What steps can reproduce the bug?

Steps to Reproduce

  • Windows 11 x64, Intel i9-14900HX, 32GB RAM
  • Install Claude Code (native or npm — both affected)
  • Run extended Claude Code sessions (30+ minutes) with moderate tool usage
  • System BSODs — no user-mode crash dialog, straight to kernel panic

What is the expected behavior?

  1. Investigate how Bun's user-mode memory corruption propagates to kernel crashes — the N-API race conditions and GC corruption documented in [Windows] N-API vtable corruption causes segfault, TUI escape, and orphaned processes in Bun v1.3.10 #27471 and Repeated Bun v1.3.5 segfaults -- 78 crashes, root cause identified (Windows + WSL) anthropics/claude-code#21875 appear to be severe enough to corrupt kernel-visible structures
  2. Fix the underlying N-API async cleanup race condition — this has been identified since March 2025 (Worker Thread causes SEGFAULT after worker exit #18198) and confirmed across Bun 1.3.5 through 1.3.10
  3. Implement proper process cleanup on crash — orphaned Bun processes accumulating 1GB+ each contribute to system-wide instability

What do you see instead?

Bun crashes (via Claude Code) are escalating beyond application-level segfaults into full Windows kernel crashes (BSODs), forcing hard reboots. This goes beyond the documented Bun crash behaviour — the crashes are corrupting kernel-mode data structures and taking the entire OS down.

5 BSODs documented across 2 days (1-2 March 2026), all during or immediately after Claude Code sessions. WhoCrashed analysis attached below.

Environment

Component Value
OS Windows 11, Build 26200 (x64)
CPU Intel Core i9-14900HX (32 logical processors)
RAM 32GB
Hardware PCSpecialist Recoil VIII 17 (TongFang GM7IX8N)
Claude Code Latest version at time of crashes
Bun v1.3.10 (embedded in Claude Code)
Installation methods tested Windows native install, npm install — both crash

BSOD Crash Details

Crash 1 — Mon 02/03/2026 14:24:04

  • Bugcheck: 0x139KERNEL_SECURITY_CHECK_FAILURE
  • Parameters: (0xA, 0x0, 0x0, 0xFFFFEF82EFE267F0)
  • Description: Kernel detected corruption of a critical data structure
  • Dump: C:\Windows\Minidump\030226-24468-01.dmp

Crash 2 — Sun 01/03/2026 17:52:09

  • Bugcheck: 0x139KERNEL_SECURITY_CHECK_FAILURE
  • Parameters: (0xA, 0x0, 0x0, 0xFFFFE2809452E7F0)
  • Description: Kernel detected corruption of a critical data structure
  • Dump: C:\Windows\Minidump\030126-25015-01.dmp

Crash 3 — Sun 01/03/2026 17:44:09

  • Bugcheck: 0x1EKMODE_EXCEPTION_NOT_HANDLED
  • Parameters: (0xFFFFFFFFC0000005, 0xFFFFF806910B30B0, 0x0, 0xFFFFFFFFFFFFFFFF)
  • Description: Kernel-mode program generated an unhandled exception
  • Dump: C:\Windows\Minidump\030126-24234-01.dmp

Crash 4 — Sun 01/03/2026 17:23:19

  • Bugcheck: 0x1EKMODE_EXCEPTION_NOT_HANDLED
  • Parameters: (0xFFFFFFFFC0000005, 0xFFFFF806B904DF17, 0x0, 0xFFFFFFFFFFFFFFFF)
  • Dump: C:\Windows\Minidump\030126-24812-01.dmp

Crash 5 — Sun 01/03/2026 17:16:08

  • Bugcheck: 0x50PAGE_FAULT_IN_NONPAGED_AREA
  • Parameters: (0xFFFFF806CD582E50, 0x10, 0xFFFFF8064D582E50, 0x2)
  • Module: Ntfs.sys (NT File System Driver)
  • Dump: C:\Windows\Minidump\030126-23296-01.dmp

Note: Crashes 3, 4, and 5 occurred within a 36-minute window (17:16-17:52), suggesting cascade degradation consistent with the pattern documented in anthropics/claude-code#21875.

Why This Is a Bun Issue

WhoCrashed analysis found no offending third-party drivers. The bugcheck codes point to memory corruption, not driver bugs. The key observations:

  1. Crashes only occur during Claude Code sessions — the system is otherwise stable under heavy workloads (gaming, development, etc.)
  2. The 0x139 parameter 1 = 0xA indicates LIST_ENTRY corruption — consistent with heap corruption from a user-mode process propagating into kernel structures
  3. The 0x1E with code 0xC0000005 (ACCESS_VIOLATION) at kernel addresses suggests corrupted pointers being passed to kernel-mode code paths
  4. The Ntfs.sys crash suggests Bun's I/O operations (heavy file reads/writes during Claude Code sessions) may be triggering file system corruption
  5. Both npm and native install methods crash identically — ruling out installation-specific causes

This is consistent with the root cause analysis in anthropics/claude-code#21875, which identified:

When Bun's memory corruption is severe enough, it appears to corrupt structures that subsequently cause kernel-mode crashes — particularly through the file system path (Ntfs.sys).

Related Issues

Bun repo

Claude Code repo (downstream consumer)

Severity

This is not just an application crash. Bun's memory corruption is causing operating system kernel crashes requiring hard reboots. This risks:

  • Data loss from unsaved work across all applications
  • File system corruption (the Ntfs.sys crash is a red flag)
  • Potential hardware damage from repeated unclean shutdowns
  • SSD wear from unexpected power loss events

030126-23296-01.dmp
030126-24234-01.dmp
030126-24812-01.dmp
030126-25015-01.dmp
030226-24468-01.dmp

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions