[BUG] WebKit (Linux, WPE): WebProcess main thread deadlocks when a muted video is suspended for being out of the viewport during preroll
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- linux, typescript
- 領域
- backend, testing-qa
調査の方向性
Start by running the standalone repro.html and run.mjs reproducer in the Playwright Linux WebKit build and compare the trigger with toggle=0 and muted=0. Read the supplied GStreamer logs and thread dumps to trace the viewport suspension state change against the synchronous bus handler. Done when the reproducer completes reliably without the WebProcess main thread blocking.
索引モデルが issue の本文から書いたものです。
説明
Version
- Playwright 1.64.1, browser
webkit-2370(WebKit 27.2), WPE MiniBrowser, headless. - Ubuntu 24.04 (
mcr.microsoft.com/playwright:v1.64.1-noble); also seen on GitHub Actionsubuntu-24.04. - GStreamer 1.24.2 (plugins-base 1.24.2, plugins-good 1.24.2, libav 1.24.1).
Steps to reproduce
Use the standalone reproducer, which contains no project code: repro.html and run.mjs.
docker run --rm -it mcr.microsoft.com/playwright:v1.64.1-noble bash
# inside: copy repro.html, run.mjs and any H.264/AAC MP4 (e.g. tiny-10s.mp4 below) into a folder
npm init -y && npm i [email protected]
node run.mjs tiny-10s.mp4 "" 5 # trigger
node run.mjs tiny-10s.mp4 toggle=0 5 # control
Sample media (synthetic, BSD-3-Clause): tiny-10s.mp4.
repro.html creates a muted <video> with a blob: URL and moves it in and out of the viewport on every animation frame until loadedmetadata, for 20 iterations. run.mjs serves the page and the media with page.route, then reports STALL if page.evaluate/textContent gets no answer for 3 s.
Expected: all iterations complete; the control finishes in about 1.7 s.
Actual: within a few iterations the WebProcess main thread blocks permanently. The page answers no Playwright call, and every test using the page times out. Measured:
| Variant | Result |
|---|---|
| Trigger | stalled 5/5, 5/5, 3/3 (three batches); 2/2 in an independent re-run |
toggle=0 (video not moved) |
passed 5/5, 3/3, 2/2 |
muted=0 |
passed 5/5 |
Diagnosis (gdb on the hung WPEWebProcess, ~0 % CPU)
Thread 1 "WPEWebProcess" <- main thread
#0 futex_wait / ___pthread_mutex_lock
#5 gst_pad_set_active () <- needs the pad's stream lock
#13 gst_element_change_state () (playbin3 -> uridecodebin3 -> decodebin3)
#23 ?? libWPEWebKit-2.0.so.1 <- MediaPlayerPrivateGStreamer state change
Thread 7 "qtdemux1:sink" <- streaming thread, holds the stream lock
#4 ___pthread_cond_wait ()
#5 ?? libWPEWebKit-2.0.so.1 <- waits for the main thread
#14 gst_bus_sync_signal_handler ()
#15 gst_bus_post ()
The GStreamer log shows managePlayerSuspend: Muted video player not visible in viewport. The main thread then sets playbin3 to READY and blocks in gst_pad_set_active, waiting for the stream lock. Meanwhile qtdemux:sink holds that lock and waits in the synchronous bus handler for the main thread.
Full dumps:
Write-up: docs/investigations/webkit-17.md.
The WebKit library in the browser build has no debug symbols, so WebKit frames are unresolved.
Expected behaviour
Suspending a player must not block the main thread on a GStreamer streaming thread that is itself waiting for the main thread. Possible fixes: defer the state change, perform it asynchronously, or make the sync bus handler non-blocking for this path.
Real-world trigger
In our application the stall occurs with a sandboxed iframe containing a muted <video> (no controls) on a blob: URL plus a <track default>. Removing muted, the <track>, its default, or the media avoids it.
Not tested
WebKitGTK (headed), Safari on macOS, newer GStreamer.
- 主要言語
- TypeScript
- スター
- 99.1k
- フォーク
- 6.8k
- 平均マージ
- 17時間 6分
- マージ済み PR(30日)
- 306
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/playwright のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
microsoft/playwright#43987 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoft/playwright#43986 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Embedded number/range inputs contribute their `value` attribute, not their current value, to accessible names対応中かも @lazerg が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
microsoft/playwright#43984 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
microsoft/playwright#43983 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/playwright#43981 ·
メンテナーはふだん 1 日以内に返信
microsoft/playwright の issue をすべて見る
似ている issue
-
status: needs triage
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
mastra-ai/mastra#29706 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
lingdojo/kana-dojo#33802 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/workerd#8290 ·
メンテナーはふだん 1 日以内に返信
-
area: build-and-ci possible-duplicate S3: minor
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
manaflow-ai/cmux#38889 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
ValentinH/react-easy-crop#670 ·