Skip to content

runtime: failed to create new OS thread #3139

@vetptzru

Description

@vetptzru

When trying to run tsgo against a large TypeScript project (approx. 56,000 files) located on a macFUSE volume, the Go runtime crashes with a runtime: failed to create new OS thread.
Monitoring the process reveals that tsgo spawns over 9,000 OS threads before it ultimately panics.

Steps to Reproduce:

  1. Mount a large TypeScript project (~56,000 files) using macFUSE.
  2. Run typescript-go against this project directory.
  3. Track the thread count using Activity Monitor or ps.
  4. Observe the process memory/thread explosion and the subsequent crash.

Actual Behavior:

The application spawns more than 9,000 threads and then crashes with the OS thread exhaustion error:

runtime: failed to create new OS thread

Environment:

  • OS: MacOs 26.3.1
  • File System: macFUSE 5.1.3
  • Project Size: ~56,000 files
  • TSGo Version: 0.20260303.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions