Skip to content

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

Closed

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

Activity

  1. GiovaniGuizzo commented on Aug 18, 2025

    @GiovaniGuizzo
    Contributor

    Yes, it seems that Piscina is not supported with Bun:

    oven-sh/bun#19924

    Unfortunately, there is nothing we can do at the moment. We use Piscina as an integral part of our software. We will have to wait for this feature to be implemented in Bun.

  2. GiovaniGuizzo commented on Aug 19, 2025

    @GiovaniGuizzo
    Contributor

    I just tested with bun 1.2.20 and it does not immediately throw. However, Sidequest does not really work with it. It crashes or simply does not communicate with the main threads.

  3. GiovaniGuizzo commented on Aug 21, 2025

    @GiovaniGuizzo
    Contributor

    I'm closing this issue for now. We won't be able to fix it unless Bun supports Piscina.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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