biomejs/biome · error

failed to spawn scanner thread

Error message

failed to spawn scanner thread

What it means

Error "failed to spawn scanner thread" thrown in biomejs/biome.

Source

Thrown at crates/biome_service/src/scanner.rs:276

        project_key: ProjectKey,
        project_path: &Utf8Path,
        dependencies: ModuleDependencies,
        trigger: IndexTrigger,
    ) -> Result<Vec<Diagnostic>, WorkspaceError> {
        let scan_kind = self
            .get_scan_kind_for_project(project_key)
            .ok_or_else(WorkspaceError::no_project)?;

        let (interner, _path_receiver) = PathInterner::new();

        let (diagnostics_sender, diagnostics_receiver) = unbounded();
        let collector = DiagnosticsCollector::new(false);

        let diagnostics = thread::scope(|scope| {
            let handler = thread::Builder::new()
                .name("biome::scanner".to_string())
                .spawn_scoped(scope, || collector.run(diagnostics_receiver))
                .expect("failed to spawn scanner thread");

            // The traversal context is scoped to ensure all the channels it
            // contains are properly closed once scanning finishes.
            let mut ctx = ScanContext {
                workspace,
                project_key,
                interner,
                diagnostics_sender,
                evaluated_paths: Default::default(),
                scan_kind,
                trigger,
                watch: true,
                dependencies: Default::default(),
            };

            let (_duration, folders_to_watch) =
                scan_dependencies(project_path, dependencies, &mut ctx);

View on GitHub (pinned to 0fca643d22)

Solutions

  1. Check system thread limits (ulimit, cgroup constraints) if spawning the scanner thread fails.
  2. Reduce configured scanner parallelism before starting the workspace server.

Example fix

// Inspect the attached io::Error source for OS-level spawn failure details

When it happens

Trigger: Thrown at crates/biome_service/src/scanner.rs:252 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of biomejs/biome@0fca643d22 (2026-08-20). Data as JSON: /api/errors/f06e8e1c3b6e6c0d. Report an issue: GitHub.