[BUG] WebKit (Linux, WPE): WebProcess main thread deadlocks when a muted video is suspended for being out of the viewport during preroll
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, typescript
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 99.1k
- Fork
- 6.8k
- Merge trung bình
- 16 giờ 7 phút
- Pull request đã merge (30 ngày)
- 325
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/playwright
-
[Regression]: APIRequestContext JSON-encodes string data for "application/json;charset=UTF-8" since 1.65 (not in release notes)Có thể đã có người làm @microsoft-playwright-automation đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
microsoft/playwright#43937 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature]: Expose Advanced WebAuthn Virtual Authenticator Options in Cross-Browser Credentials APIĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
microsoft/playwright#43921 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Firefox: `page.emulateMedia({ contrast })` updates `matchMedia()` but never restyles the pageĐang mởneeds-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 44/100
microsoft/playwright#43916 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Videos are not generated when reusing a single page between testsCó thể đã có người làm @microsoft-playwright-automation đã nhận hôm nay. Đang mởneeds-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/playwright#43915 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: getByLabel (and accessible name) ignore <label> for form-associated custom elementsCó thể đã có người làm @microsoft-playwright-automation đã nhận 2 ngày trước. Đang mởneeds-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
microsoft/playwright#43898 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/playwright
Issue tương tự
-
Navbar avatar and name stay stale after saving profile changesCó thể đã có người làm @alexechoi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/atomic-crm#416 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
epam/ai-dial-react-file-manager#99 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
canonical/craft-actions#146 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
bluesky-social/social-app#12343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lucide-icons/lucide#5165 ·
Maintainer thường phản hồi trong vòng 1 ngày