Bug 264509 - [WPE][GTK] API test /WPE/TestResources afterAll is a flaky crash
Summary: [WPE][GTK] API test /WPE/TestResources afterAll is a flaky crash
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-09 10:45 PST by Carlos Alberto Lopez Perez
Modified: 2023-11-09 11:49 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2023-11-09 10:45:05 PST
WPE failure:

TEST: /app/webkit/WebKitBuild/WPE/Release/bin/TestWebKitAPI/WPE/TestResources...
  /webkit/WebKitWebView/resources:                                    PASS
GLib-GIO-DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
EGLDisplay Initialization failed: EGL_NOT_INITIALIZED
  /webkit/WebKitWebView/history-cache:                                PASS
  /webkit/WebKitWebView/sync-request-on-max-conns:                    PASS
  /webkit/WebKitWebResource/loading:                                  PASS
  /webkit/WebKitWebResource/response:                                 PASS
  /webkit/WebKitWebResource/mime-type:                                PASS
  /webkit/WebKitWebResource/suggested-filename:                       PASS
  /webkit/WebKitWebResource/active-uri:                               PASS
  /webkit/WebKitWebResource/get-data:                                 PASS
  /webkit/WebKitWebResource/get-data-error:                           PASS
  /webkit/WebKitWebResource/get-data-empty:                           PASS
  /webkit/WebKitWebPage/send-request:                                 PASS

(TestResources:3762): GLib-CRITICAL **: 14:23:35.177: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

GLib-FATAL-CRITICAL: g_atomic_ref_count_dec: assertion 'old_value > 0' failed

[...]

Unexpected crashes:
    /WPE/TestResources
        afterAll


Log: https://ews-build.webkit.org/#/builders/41/builds/2645/steps/26/logs/stdio


It happens randomly on the EWS queue mainly at: https://ews-build.webkit.org/#/builders/API-Tests-WPE-EWS

Looks like a race condition somewhere.
Comment 1 Carlos Alberto Lopez Perez 2023-11-09 10:58:41 PST
Funny that it crashes when trying to delete the object

Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp-
Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:void afterAll()
Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp-{
Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp-    delete kServer;
Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp-}



Seems a refcount or pointer issue somewhere.

This happens very randomly, to reproduce it you have to run the tests in a loop until it eventually happens (1th of 100 times maybe)
Comment 2 Carlos Alberto Lopez Perez 2023-11-09 11:07:55 PST
This happens also on GTK bot. See: https://ews-build.webkit.org/#/builders/21/builds/26577/steps/26/logs/stdio


TEST: /app/webkit/WebKitBuild/GTK/Release/bin/TestWebKitAPI/WebKitGTK/TestResources...
  /webkit/WebKitWebView/resources:                                    PASS
GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
GLib-GIO-DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
  /webkit/WebKitWebView/history-cache:                                PASS
  /webkit/WebKitWebView/sync-request-on-max-conns:                    FAIL
ERROR:/app/webkit/Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:735:testWebViewSyncRequestOnMaxConns(SyncRequestOnMaxConnsTest*, gconstpointer)::<lambda(gpointer)>: code should not be reached
  /webkit/WebKitWebResource/loading:                                  PASS
GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
GLib-GIO-DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
  /webkit/WebKitWebResource/response:                                 PASS
  /webkit/WebKitWebResource/mime-type:                                PASS
  /webkit/WebKitWebResource/suggested-filename:                       PASS
  /webkit/WebKitWebResource/active-uri:                               PASS
  /webkit/WebKitWebResource/get-data:                                 PASS
  /webkit/WebKitWebResource/get-data-error:                           PASS
  /webkit/WebKitWebResource/get-data-empty:                           PASS
  /webkit/WebKitWebPage/send-request:                                 PASS

(TestResources:23087): GLib-GIO-CRITICAL **: 19:24:54.755: g_socket_accept: assertion 'G_IS_SOCKET (socket)' failed

GLib-GIO-FATAL-CRITICAL: g_socket_accept: assertion 'G_IS_SOCKET (socket)' failed
Comment 3 Carlos Alberto Lopez Perez 2023-11-09 11:49:07 PST
Updated expectations on 270468@main