Skip to content

Bug Report: Sidequest worker crashes on Bun runtime (PiscinaHistogramHandler: Not implemented) #72

@aulaleslie

Description

@aulaleslie

Description

When running Sidequest under Bun instead of Node.js, the worker process crashes immediately with a Not implemented error from Piscina.

This happens because Piscina internally uses Node’s perf_hooks.monitorEventLoopDelay / createHistogram, which are not implemented in Bun’s Node-compatibility layer. As a result, Sidequest cannot currently be used in a Bun runtime.

Error log

[info] [2025-08-18 14:51:46] [Sidequest] [Worker] : Starting worker with provided configuration...
[error] [2025-08-18 14:51:46] [Sidequest] [Worker] : Not implemented
Error: Not implemented
    at unknown
    at new PiscinaHistogramHandler (.../node_modules/piscina/dist/histogram.js:21:94)
    at new ThreadPool (.../node_modules/piscina/dist/index.js:94:30)
    at new Piscina (.../node_modules/piscina/dist/index.js:622:57)
    at new RunnerPool (.../node_modules/@sidequest/engine/dist/shared-runner/runner-pool.js:18:25)
    at new ExecutorManager (.../node_modules/@sidequest/engine/dist/execution/executor-manager.js:25:31)
    at <anonymous> (.../node_modules/@sidequest/engine/dist/workers/main.js:25:151)

Steps to reproduce

  1. Install Sidequest in a Bun project
  2. Call Sidequest.start() in Bun runtime
  3. Worker crashes before starting

Expected behavior

Sidequest should either:

  • Support Bun’s runtime

Actual behavior

Worker immediately crashes with PiscinaHistogramHandler: Not implemented.

Environment

  • Sidequest version: @sidequest/engine@x.x.x (please fill exact version)
  • Bun version: 1.1.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions