vitest: `Channel closed` error as of recent version of Vitest

Describe the bug

Apologies beforehand, vague bug report incoming…

As of a recent Vitest update (potentially between v3.1.4 and v3.2.3) we’re seeing the following error in CI, where it appears the channel is closed before our tests have finished running:

⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯
Error: Channel closed
 ❯ target.send node:internal/child_process:753:16
 ❯ ProcessWorker.send ../../node_modules/tinypool/dist/index.js:140:41
 ❯ MessagePort.<anonymous> ../../node_modules/tinypool/dist/index.js:146:62
 ❯ [nodejs.internal.kHybridDispatch] node:internal/event_target:831:20
 ❯ MessagePort.<anonymous> node:internal/per_context/messageport:23:28

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'ERR_IPC_CHANNEL_CLOSED' }

Opening this issue hoping that maybe someone could point me in the right direction.

Reproduction

Unsure how to reproduce 😬

System Info

Vitest version: `v3.2.3`


System:
  OS: Linux 6.11 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
  CPU: (16) x64 AMD EPYC 7763 64-Core Processor
  Memory: 60.17 GB / 62.80 GB
  Container: Yes
  Shell: 5.1.16 - /bin/bash
Binaries:
  Node: 20.19.2 - /__t/node/20.19.2/x64/bin/node
  Yarn: 1.22.22 - /usr/bin/yarn
  npm: 10.8.2 - /__t/node/20.19.2/x64/bin/npm

Used Package Manager

yarn

Validations

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 8
  • Comments: 19 (5 by maintainers)

Most upvoted comments

I will keep this open, but we cannot do anything if there is no reproduction

Apologies for not having a pithy repro - but I’m running into this as well. I’m migrating my codebase from mocha => vitest, and seeing inconsistent, somewhat random “Error: channel closed” in CI. It appears to happen far more frequently in GitHub actions, which makes me wonder if it’s a memory issue.

If it’s at all helpful, here’s the github actions runs where I’m seeing it: https://github.com/JustinBeckwith/linkinator/actions/runs/16130420367/job/45516589956?pr=673

I’ll keep seeing if I can create a smaller repro that’s easier to track down.

This issue is absolutely not resolved despite the closed status. Apologies @sheremet-va, but I feel the need to raise this to you given the chance that some level of automation is prematurely closing the status of an active issue.