RESOLVED FIXED310859
[WPE] Popups may fail to render after refactoring AcceleratedSurface SwapChain initialization in r310006@main
https://bugs.webkit.org/show_bug.cgi?id=310859
Summary [WPE] Popups may fail to render after refactoring AcceleratedSurface SwapChai...
Carlos Alberto Lopez Perez
Reported 2026-03-26 20:56:43 PDT
Since commit 310006@main, AcceleratedSurface::SwapChain now calls wpe_renderer_backend_egl_target_create() in its constructor using webPage->hostFileDescriptor(), but before this was called when window() was first called. For popup pages created via window.open(), this change may cause the WPE backend to be initialized with an empty host FD if the view backend is not yet set up, leaving the compositing pipeline broken for that popup and making it render nothing." This was detected because it caused 43 failures on the playwright tests, all related to popus. I tried to reproduce the problem without using Playwright but I was not able to do that, so I'm not sure if WPE without playwright is affected. It could be affected, is just that I was not able to come with a test to reproduce it. This are the failures it caused on playwright: 43 failed [webkit-library] › tests/library/browsercontext-basic.spec.ts:72:3 › window.open should use parent tab context [webkit-library] › tests/library/browsercontext-basic.spec.ts:351:3 › should emulate media in popup [webkit-library] › tests/library/browsercontext-locale.spec.ts:74:3 › should format number in popups [webkit-library] › tests/library/browsercontext-locale.spec.ts:89:3 › should affect navigator.language in popups [webkit-library] › tests/library/browsercontext-locale.spec.ts:103:3 › should work for multiple pages sharing same process [webkit-library] › tests/library/browsercontext-page-event.spec.ts:67:3 › should report when a new page is created and closed [webkit-library] › tests/library/browsercontext-page-event.spec.ts:129:3 › should have an opener [webkit-library] › tests/library/browsercontext-timezone-id.spec.ts:73:3 › should work for multiple pages sharing same process [webkit-library] › tests/library/emulation-focus.spec.ts:32:3 › should focus popups by default ─ [webkit-library] › tests/library/inspector/cli-codegen-2.spec.ts:340:7 › cli codegen › should not clash pages [webkit-library] › tests/library/page-clock.spec.ts:298:3 › popup › should tick after popup ──── [webkit-library] › tests/library/page-clock.spec.ts:313:3 › popup › should tick before popup ─── [webkit-library] › tests/library/page-close.spec.ts:152:5 › should not treat navigations as new popups [webkit-library] › tests/library/popup.spec.ts:60:3 › should inherit extra headers from browser context [webkit-library] › tests/library/popup.spec.ts:73:3 › should inherit offline from browser context [webkit-library] › tests/library/popup.spec.ts:86:3 › should inherit http credentials from browser context [webkit-library] › tests/library/popup.spec.ts:118:3 › should inherit viewport size from browser context [webkit-library] › tests/library/popup.spec.ts:132:3 › should use viewport size from window features [webkit-library] › tests/library/popup.spec.ts:161:3 › should respect routes from browser context when using window.open [webkit-library] › tests/library/popup.spec.ts:178:3 › BrowserContext.addInitScript should apply to an in-process popup [webkit-library] › tests/library/popup.spec.ts:191:3 › BrowserContext.addInitScript should apply to a cross-process popup [webkit-library] › tests/library/popup.spec.ts:206:3 › should expose function from browser context [webkit-library] › tests/library/popup.spec.ts:248:3 › should not throttle rAF in the opener page [webkit-library] › tests/library/popup.spec.ts:261:3 › should not throw when click closes popup [webkit-library] › tests/library/video.spec.ts:215:5 › screencast › should continue recording main page after popup closes [webkit-library] › tests/library/video.spec.ts:419:5 › screencast › should work for popups ───── [webkit-page] › tests/page/elementhandle-owner-frame.spec.ts:76:3 › should work for adopted elements [webkit-page] › tests/page/elementhandle-query-selector.spec.ts:37:3 › should work for adopted elements [webkit-page] › tests/page/page-autowaiting-no-hang.spec.ts:61:3 › opening a popup ───────────── [webkit-page] › tests/page/page-click.spec.ts:39:3 › should issue clicks in parallel in page and popup [webkit-page] › tests/page/page-event-console.spec.ts:157:3 › should not throw when there are console messages in detached iframes [webkit-page] › tests/page/page-event-popup.spec.ts:28:3 › should work with window features ──── [webkit-page] › tests/page/page-event-popup.spec.ts:105:3 › should work with noopener and url ── [webkit-page] › tests/page/page-event-popup.spec.ts:149:3 › should report popup opened from iframes [webkit-page] › tests/page/page-history.spec.ts:281:3 › should reload proper page ────────────── [webkit-page] › tests/page/page-navigation.spec.ts:36:3 › should work with _blank target in form [webkit-page] › tests/page/page-network-idle.spec.ts:141:3 › should wait for networkidle from the popup [webkit-page] › tests/page/page-set-input-files.spec.ts:130:5 › should upload a file after popup [webkit-page] › tests/page/page-wait-for-load-state.spec.ts:61:3 › should work with pages that have loaded before being connected to [webkit-page] › tests/page/page-wait-for-load-state.spec.ts:105:3 › should wait for load state of popup with network url [webkit-page] › tests/page/page-wait-for-load-state.spec.ts:115:3 › should wait for load state of popup with network url and noopener [webkit-page] › tests/page/page-wait-for-load-state.spec.ts:147:3 › should resolve after popup load [webkit-page] › tests/page/wheel.spec.ts:70:3 › should dispatch wheel events after popup was opened @smoke
Attachments
Carlos Alberto Lopez Perez
Comment 1 2026-03-26 21:23:41 PDT
EWS
Comment 2 2026-03-26 23:25:45 PDT
Committed 310052@main (8bab43a4d8f7): <https://commits.webkit.org/310052@main> Reviewed commits have been landed. Closing PR #61466 and removing active labels.
Carlos Alberto Lopez Perez
Comment 3 2026-03-27 06:06:04 PDT
BTW, In the end this bug was quite easy to reproduce, the key is to build with -DENABLE_WPE_PLATFORM=OFF (which playwright does). Just build with --cmakeargs=-DENABLE_ASSERTS=ON --cmakeargs=-DENABLE_WPE_PLATFORM=OFF --cmakeargs=-DENABLE_WPE_PLATFORM_DRM=OFF And then the minibrowser just asserts when opening it $ Tools/Scripts/run-minibrowser --wpe Using default MiniBrowser ERROR: Failed to make thread real time: GDBus.Error:org.freedesktop.DBus.Error.Failed: No such file or directory ../../../Source/WTF/wtf/linux/RealTimeThreads.cpp(224) : void WTF::RealTimeThreads::realTimeKitMakeThreadRealTime(uint64_t, uint64_t, uint32_t) ERROR: Failed to make thread real time: Timeout was reached ../../../Source/WTF/wtf/linux/RealTimeThreads.cpp(224) : void WTF::RealTimeThreads::realTimeKitMakeThreadRealTime(uint64_t, uint64_t, uint32_t) ERROR: Failed to make thread real time: Timeout was reached ../../../Source/WTF/wtf/linux/RealTimeThreads.cpp(224) : void WTF::RealTimeThreads::realTimeKitMakeThreadRealTime(uint64_t, uint64_t, uint32_t) ASSERTION FAILED: m_workQueue->runLoop().isCurrent() ../../../Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCompositor.cpp(490) : void WebKit::ThreadedCompositor::frameComplete() 1 0x7fc6ed8ec76a /home/clopez/webkit/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1(+0x5eec76a) [0x7fc6ed8ec76a] 2 0x7fc6f64d4f1c wpe_renderer_backend_egl_target_dispatch_frame_complete 3 0x7fc6e21fcb16 /lib/x86_64-linux-gnu/libffi.so.8(+0x7b16) [0x7fc6e21fcb16] 4 0x7fc6e21f93ef /lib/x86_64-linux-gnu/libffi.so.8(+0x43ef) [0x7fc6e21f93ef] 5 0x7fc6e21fc0be ffi_call 6 0x7fc6e2052bfe /lib/x86_64-linux-gnu/libwayland-client.so.0(+0x6bfe) [0x7fc6e2052bfe] 7 0x7fc6e2053473 /lib/x86_64-linux-gnu/libwayland-client.so.0(+0x7473) [0x7fc6e2053473] 8 0x7fc6e205371c wl_display_dispatch_queue_pending 9 0x7fc6de63f221 /jhbuild/install/lib/libWPEBackend-fdo-1.0.so(+0xd221) [0x7fc6de63f221] 10 0x7fc6e618cf7f /jhbuild/install/lib/libglib-2.0.so.0(+0x5af7f) [0x7fc6e618cf7f] 11 0x7fc6e618f6f8 g_main_context_dispatch 12 0x7fc6f0103302 /home/clopez/webkit/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1(+0x8703302) [0x7fc6f0103302] 13 0x7fc6f0103a6a WTF::RunLoop::run() 14 0x7fc6ed8f6506 /home/clopez/webkit/webkit/WebKitBuild/WPE/Release/lib/libWPEWebKit-2.0.so.1(+0x5ef6506) [0x7fc6ed8f6506] 15 0x7fc6e78181ca /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x7fc6e78181ca] 16 0x7fc6e781828b __libc_start_main 17 0x562011658705 /home/clopez/webkit/webkit/WebKitBuild/WPE/Release/bin/WPEWebProcess(+0x1705) [0x562011658705]
Note You need to log in before you can comment on or make changes to this bug.