Bug 229067

Summary: [WPE] WebExtension API test /webkit/WebKitWebView/web-process-crashed is flaky failing
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: WPE WebKitAssignee: Lauro Moura <lmoura>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch with updated expectations none

Description Lauro Moura 2021-08-12 20:30:03 PDT
/WPE/TestWebExtensions
        /webkit/WebKitWebView/web-process-crashed

Output:

  /webkit/WebKitWebView/web-process-crashed:                          FAIL
WPE-FDO-FATAL-WARNING: Instance::dispatchFrameCallbacks(): Cannot find surface with bridgeId 1 in view backend map. Probably the associated surface is gone due to a premature exit in the client side

(/app/webkit/Tools/glib/../../WebKitBuild/Release/bin/TestWebKitAPI/WPE/TestWebExtensions:778): WPE-FDO-WARNING **: 06:40:11.689: Instance::dispatchFrameCallbacks(): Cannot find surface with bridgeId 1 in view backend map. Probably the associated surface is gone due to a premature exit in the client side



In the release bot, the first failure was in the build #2602 for identifier 240345@main. Since this revision, it failed 31 out of 41 runs.

Locally:

Laptop: 4 fails in 20 runs
Desktop: 7 fails in 20 runs

In a manual build outside Flatpak, no errors in 10 runs.
Comment 1 Carlos Garcia Campos 2021-08-12 23:12:01 PDT
I guess that's expected to happen in case of web process crash, so maybe we can just make warnings non fatal at that point or not use g_warning in wpe-fdo
Comment 2 Lauro Moura 2021-08-13 05:26:36 PDT
Created attachment 435477 [details]
Patch
Comment 3 Lauro Moura 2021-08-13 05:27:08 PDT
(In reply to Carlos Garcia Campos from comment #1)
> I guess that's expected to happen in case of web process crash, so maybe we
> can just make warnings non fatal at that point or not use g_warning in
> wpe-fdo

Indeed. With this patch, it's consistently passing.
Comment 4 Lauro Moura 2021-08-13 05:59:20 PDT
Created attachment 435478 [details]
Patch with updated expectations
Comment 5 Carlos Garcia Campos 2021-08-13 07:20:48 PDT
Comment on attachment 435478 [details]
Patch with updated expectations

View in context: https://bugs.webkit.org/attachment.cgi?id=435478&action=review

> Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:166
> +    Test::removeLogFatalFlag(G_LOG_LEVEL_WARNING);
>      g_main_loop_run(test->m_mainLoop);
> +    Test::addLogFatalFlag(G_LOG_LEVEL_WARNING);

Ok, I think we should still check if we can remove the g_warning in wpe-fdo, because thi might hide other warnings happening.
Comment 6 EWS 2021-08-13 07:40:30 PDT
Committed r281015 (240505@main): <https://commits.webkit.org/240505@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435478 [details].