Loader stalls MessagePort since v24
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
Version
v24.15.0
Platform
Linux lab178 6.18.19-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 24 01:20:46 GMT 2026 x86_64 GNU/Linux
Subsystem
module
What steps will reproduce the bug?
In an async resolve hook of a custom loader, await a message from a MessagePort. The message never arrives and the promise never resolves.
This repository has a reproduction. It does a simple pong exchange with the main thread. On v23 and before it works. On v24 and later it hangs forever.
https://github.com/cinderflash/loader-stall
$ nvm use v23
Now using node v23.11.1 (npm v10.9.2)
$ node index.mjs
ping
PONG
ping
PONG
ping
PONG
$ nvm use v24
Now using node v24.15.0 (npm v11.12.1)
$ node index.mjs
(STALL FOREVER)
$ nvm use v25
Now using node v25.9.0 (npm v11.12.1)
$ node index.mjs
(STALL FOREVER)
How often does it reproduce? Is there a required condition?
On v24 and v25, 100% of the time.
On prior versions, this never happens.
What is the expected behavior? Why is that the expected behavior?
Ability to perform exchanges with the main thread within a loader hook.
I'd like to use this to acquire information available on the main thread to use in determining how to resolve the specifier.
What do you see instead?
Awaiting a message in a loader hook stalls forever. The message never arrives and the engine never detects an unresolved promise.
Additional information
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、回帰を確認するため、リンク先の loader-stall の再現である index.mjs を Node.js v23 と v24 で実行します。module loader の async resolve hook と MessagePort を介した交換動作を調査し、現行バージョンでメッセージが到着し、promise が解決されることを示す回帰テストを追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100