Description: imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_order_canplay_canplaythrough.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_order_loadedmetadata_loadeddata.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_canplaythrough.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_playing.html The first failure that I saw on the dashboard was 4/4/2022 at r292293, but this does not appear relevant to causing this issue. REPRODUCTION STEPS I can reproduce this on r292959, but unable to reproduce it on 292262. Command: run-webkit-tests --root --exit-after-n-failures 1 --exit-after-n-crashes-or-timeouts 1 --iterations 50 -f --no-retry Result: Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_order_canplay_canplaythrough.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_order_loadedmetadata_loadeddata.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_canplaythrough.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_playing.html [ Crash ] History: https://results.webkit.org/?suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_order_canplay_canplaythrough.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_order_loadedmetadata_loadeddata.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_canplaythrough.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_playing.html&platform=mac&style=debug&limit=50000&flavor=gpuprocess&flavor=wk2 Crash Log: No crash log found for com.apple.WebKit.WebContent.Development:86372.
<rdar://problem/92334616>
Created attachment 458362 [details] event_order_canplay_canplaythrough-crash-log
Created attachment 458363 [details] event_order_canplay_canplaythrough-stderr
Created attachment 458364 [details] event_order_loadedmetadata_loadeddata-crash-log
Created attachment 458365 [details] event_order_loadedmetadata_loadeddata-stderr
Created attachment 458366 [details] readyState_during_canplaythrough-crash-log
Created attachment 458367 [details] readyState_during_canplaythrough-stderr
Created attachment 458368 [details] readyState_during_playing-crash-log
Created attachment 458369 [details] readyState_during_playing-stderr
I have marked these tests as a flaky crash while this issue is investigated.
com.apple.WebKit.Networking.Development: Could not compile WebContent sandbox: /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb:549:13: unbound variable: MSC_mach_msg2_trap
Landed https://commits.webkit.org/249989@main (r293429)!
Reopened because the issue is still being investigated.
Description: Adding two additional tests imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_pause.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_play.html REPRODUCTION STEPS I can reproduce this on r292959, but unable to reproduce it on 292262. The regression is between r292262-r295959. Command: run-webkit-tests --root --exit-after-n-failures 1 --exit-after-n-crashes-or-timeouts 1 --iterations 50 -f --no-retry Result: Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_pause.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_play.html [ Crash ] History: https://results.webkit.org/?suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_pause.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_play.html&platform=mac&flavor=wk2&style=debug&limit=50000 Crash Log: No crash log found for com.apple.WebKit.Networking.Development:26056. stderr: com.apple.WebKit.Networking.Development: Could not compile WebContent sandbox: /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb:549:13: unbound variable: MSC_mach_msg2_trap I have marked this test as a flaky crash while this issue is investigated.
Created attachment 458381 [details] event_pause-crash-log
Created attachment 458382 [details] event_pause-stderr
Created attachment 458383 [details] event_play-crash-log
Created attachment 458384 [details] event_play-stderr
Pull request: https://github.com/WebKit/WebKit/pull/393
Test gardening commit r293437 (249995@main): <https://commits.webkit.org/249995@main> Reviewed commits have been landed. Closing PR #393 and removing active labels.
I believe the sandbox issue was fixed in https://trac.webkit.org/changeset/292975/webkit.
Got it. Seeing this for recent crashes: ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData) ./rendering/RenderLayerCompositor.cpp(1184) : void WebCore::RenderLayerCompositor::computeCompositingRequirements(WebCore::RenderLayer *, WebCore::RenderLayer &, WebCore::LayerOverlapMap &, WebCore::RenderLayerCompositor::CompositingState &, WebCore::RenderLayerCompositor::BackingSharingState &, bool &) 1 0x1f569e8f9 WTFCrash 2 0x1ce777c2b WTFCrashWithInfo(int, char const*, char const*, int) 3 0x1d3cc37e5 WebCore::RenderLayerCompositor::computeCompositingRequirements(WebCore::RenderLayer*, WebCore::RenderLayer&, WebCore::LayerOverlapMap&, WebCore::RenderLayerCompositor::CompositingState&, WebCore::RenderLayerCompositor::BackingSharingState&, bool&) 4 0x1d3cc33f0 WebCore::RenderLayerCompositor::computeCompositingRequirements(WebCore::RenderLayer*, WebCore::RenderLayer&, WebCore::LayerOverlapMap&, WebCore::RenderLayerCompositor::CompositingState&, WebCore::RenderLayerCompositor::BackingSharingState&, bool&)
This happens when media compositing state happens without correctly informing RenderLayerCompositor.
Description: Adding seven additional tests imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_canplay.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadstart.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_timeupdate.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_progress.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_canplay.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_loadeddata.html REPRODUCTION STEPS I can reproduce this on r292959, but unable to reproduce it on 292262. The regression is between r292262-r295959. Command: run-webkit-tests --root --exit-after-n-failures 1 --exit-after-n-crashes-or-timeouts 1 --iterations 50 -f --no-retry Result: Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_canplay.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_loadstart.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_timeupdate.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_progress.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_canplay.html [ Crash ] Regressions: Unexpected crashes (1) imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_loadeddata.html [ Crash ] History: https://results.webkit.org/?suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_canplay.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_loadeddata.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_loadstart.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_timeupdate.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FnetworkState_during_progress.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_canplay.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_loadeddata.html&limit=50000&platform=mac&flavor=wk2&style=debug Crash Log: No crash log found for com.apple.WebKit.Networking.Development:26056. stderr: com.apple.WebKit.Networking.Development: Could not compile WebContent sandbox: /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb:549:13: unbound variable: MSC_mach_msg2_trap I have marked this test as a flaky crash while this issue is investigated.
Created attachment 458393 [details] event_canplay-crash-log
Created attachment 458394 [details] event_canplay-stderr
Created attachment 458395 [details] event_loadeddata-crash-log
Created attachment 458396 [details] event_loadeddata-stderr
Created attachment 458397 [details] event_loadstart-crash-log
Created attachment 458398 [details] event_loadstart-stderr
Created attachment 458399 [details] event_timeupdate-crash-log
Created attachment 458400 [details] event_timeupdate-stderr
Created attachment 458401 [details] networkState_during_progress-crash-log
Created attachment 458402 [details] readyState_during_canplay-stderr
Created attachment 458403 [details] readyState_during_loadeddata-crash-log
Created attachment 458404 [details] readyState_during_loadeddata-stderr
No need for all the duplicate logs. com.apple.WebKit.Networking.Development: Could not compile WebContent sandbox: /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb:549:13: unbound variable: MSC_mach_msg2_trap sandbox initialization failed: /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb:549:13: unbound variable: MSC_mach_msg2_trap com.apple.WebKit.Networking.Development: Could not initialize sandbox profile [/Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb], error '/Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit.NetworkProcess.sb:549:13: unbound variable: MSC_mach_msg2_trap ' ENABLE_SANDBOX_MESSAGE_FILTER=YES _OS_VERSION=12.3 WEBKIT2_FRAMEWORK_DIR=/Volumes/Builds/292959 DARWIN_USER_TEMP_DIR=/private/var/folders/t8/wt_bzchd67ddzrvh2ptzb39w0000gn/T/WebKitTestRunners-287mv_8z DARWIN_USER_CACHE_DIR=/private/var/folders/t8/wt_bzchd67ddzrvh2ptzb39w0000gn/C/WebKitTestRunners-287mv_8z HOME_DIR=/Users/karlrackler HOME_LIBRARY_DIR=/Users/karlrackler/Library HOME_LIBRARY_PREFERENCES_DIR=/Users/karlrackler/Library/Preferences CPU=x86_64 com.apple.WebKit.Networking.Development: Unable to apply sandbox 1 0x113003759 WTFCrash 2 0x1490c7a0c WebKit::AuxiliaryProcess::initializeSandbox(WebKit::AuxiliaryProcessInitializationParameters const&, WebKit::SandboxInitializationParameters&) 3 0x148d072bc WebKit::NetworkProcess::initializeSandbox(WebKit::AuxiliaryProcessInitializationParameters const&, WebKit::SandboxInitializationParameters&) 4 0x1498260cd WebKit::AuxiliaryProcess::initialize(WebKit::AuxiliaryProcessInitializationParameters const&) 5 0x1491adf9e WebKit::NetworkProcess::NetworkProcess(WebKit::AuxiliaryProcessInitializationParameters&&) 6 0x1491ae40d WebKit::NetworkProcess::NetworkProcess(WebKit::AuxiliaryProcessInitializationParameters&&)
Pull request: https://github.com/WebKit/WebKit/pull/398
(In reply to Simon Fraser (smfr) from comment #38) > No need for all the duplicate logs. > > com.apple.WebKit.Networking.Development: Could not compile WebContent > sandbox: > /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit. > NetworkProcess.sb:549:13: unbound variable: > MSC_mach_msg2_trap > > sandbox initialization failed: > /Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit. > NetworkProcess.sb:549:13: unbound variable: > MSC_mach_msg2_trap > > com.apple.WebKit.Networking.Development: Could not initialize sandbox > profile > [/Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit. > NetworkProcess.sb], error > '/Volumes/Builds/292959/WebKit.framework/Resources/com.apple.WebKit. > NetworkProcess.sb:549:13: unbound variable: > MSC_mach_msg2_trap > ' > ENABLE_SANDBOX_MESSAGE_FILTER=YES > _OS_VERSION=12.3 > WEBKIT2_FRAMEWORK_DIR=/Volumes/Builds/292959 > DARWIN_USER_TEMP_DIR=/private/var/folders/t8/wt_bzchd67ddzrvh2ptzb39w0000gn/ > T/WebKitTestRunners-287mv_8z > DARWIN_USER_CACHE_DIR=/private/var/folders/t8/wt_bzchd67ddzrvh2ptzb39w0000gn/ > C/WebKitTestRunners-287mv_8z > HOME_DIR=/Users/karlrackler > HOME_LIBRARY_DIR=/Users/karlrackler/Library > HOME_LIBRARY_PREFERENCES_DIR=/Users/karlrackler/Library/Preferences > CPU=x86_64 > com.apple.WebKit.Networking.Development: Unable to apply sandbox > 1 0x113003759 WTFCrash > 2 0x1490c7a0c > WebKit::AuxiliaryProcess::initializeSandbox(WebKit:: > AuxiliaryProcessInitializationParameters const&, > WebKit::SandboxInitializationParameters&) > 3 0x148d072bc > WebKit::NetworkProcess::initializeSandbox(WebKit:: > AuxiliaryProcessInitializationParameters const&, > WebKit::SandboxInitializationParameters&) > 4 0x1498260cd > WebKit::AuxiliaryProcess::initialize(WebKit:: > AuxiliaryProcessInitializationParameters const&) > 5 0x1491adf9e > WebKit::NetworkProcess::NetworkProcess(WebKit:: > AuxiliaryProcessInitializationParameters&&) > 6 0x1491ae40d > WebKit::NetworkProcess::NetworkProcess(WebKit:: > AuxiliaryProcessInitializationParameters&&) Roger that.
Test gardening commit r293451 (250005@main): <https://commits.webkit.org/250005@main> Reviewed commits have been landed. Closing PR #398 and removing active labels.
I'd prefer we didn't garden around a sandbox crash.
Sandbox crash was supposedly fixed in r292975. The current crashes all seem to be the compositing assertion.
Repro: imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_canplay_noautoplay.html imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/event_canplaythrough.html --iterations=100 --exit-after-n-failures=1 --expect-pass
Debugging so far: * RenderLayer::contentChanged() is called for the video element's layer, setting the NeedsPostLayoutCompositingUpdate bit * some compositing update runs, does not make the video composited, clears the bit * a later compositing update skips the the `willBeComposited = needsToBeComposited(layer, queryData);` line in RenderLayerCompositor::computeCompositingRequirements(), but the video should have become composited.
Here's the problem: 18:19:55.658 71596 worker/0 RenderLayer 0x3ae195410 contentChanged 5 18:19:55.658 71596 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 0 ... 18:19:55.659 71596 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 0 18:19:55.659 71596 worker/0 Clearing compositing requirements bits on layer RenderLayer 0x3ae195410 300x150 18:19:55.659 71596 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 1 18:19:55.659 71596 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 1 18:19:55.659 71596 worker/0 1 Mismatched compositing state on layer RenderLayer 0x3ae195410 300x150 willBeComposited 0 needsToBeComposited 1 did check 0 18:19:55.659 71596 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 1 So "canAccelerateVideoRendering" changes from 0 to 1 without a call to contentChanged(). That's on media code to get right.
18:25:29.728 72341 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 0 18:25:29.728 72341 worker/0 Clearing compositing requirements bits on layer RenderLayer 0x45bf438e0 300x150 18:25:29.728 72341 worker/0 MediaPlayerPrivateAVFoundation 0x10f0a0d80 acceleratedRenderingStateChanged() 18:25:29.728 72341 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 1 18:25:29.728 72341 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 1 18:25:29.728 72341 worker/0 1 Mismatched compositing state on layer RenderLayer 0x45bf438e0 300x150 willBeComposited 0 needsToBeComposited 1 did check 0 18:25:29.728 72341 worker/0 requiresImmediateCompositing 0 shouldDisplayVideo 1 canAccelerateVideoRendering 1 18:25:29.728 72341 worker/0 ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData) So MediaPlayerPrivateAVFoundation::acceleratedRenderingStateChanged() ran but did not trigger a call to contentChanged
The contract here is that if the answer to HTMLMediaElemenet::supportsAcceleratedRendering() changes, then contentChanged(VideoChanged) has to be called. That's not happening reliably.
Created attachment 458488 [details] Patch
Comment on attachment 458488 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458488&action=review > Source/WebKit/ChangeLog:3 > + [ macOS Debug wk2 ] Thirteen imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/ are a flaky crash (ASSERTION FAILED: willBeComposited == needsToBeComposited(layer, queryData)) Could you please unskip the tests?
Created attachment 458528 [details] Patch
Created attachment 458529 [details] Patch
Committed r293589 (250098@main): <https://commits.webkit.org/250098@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458529 [details].
Verified tests no longer crashing. History: https://results.webkit.org/?platform=mac&flavor=wk2&style=debug&limit=50000&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_canplay.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_loadeddata.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_loadstart.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_order_canplay_canplaythrough.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_order_loadedmetadata_loadeddata.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_pause.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_play.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2Fevent_timeupdate.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FnetworkState_during_progress.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_canplay.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_canplaythrough.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_loadeddata.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fhtml%2Fsemantics%2Fembedded-content%2Fmedia-elements%2FreadyState_during_playing.html