Bug 291925

Summary: [WebDriver][BiDi] Assertion in RefCountedAndCanMakeWeakPtr<WebSocketServer> destructor
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: WebDriverAssignee: Lauro Moura <lmoura>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=286274

Lauro Moura
Reported 2025-04-22 18:50:44 PDT
During a full test run, sometimes we hit the following assertion: #0 0x00005f3871508dc5 in WTFCrash () #1 0x00005f387148fc3a in WTFCrashWithInfo(int, char const*, char const*, int) () #2 0x00005f38714f32d8 in WTF::RefCountedAndCanMakeWeakPtr<WebDriver::WebSocketServer>::~RefCountedAndCanMakeWeakPtr() () #3 0x00005f38714dc6b0 in WebDriver::WebDriverService::~WebDriverService() () #4 0x00005f38714dc52b in main () This happens because while WebSocketServer is RefCountedAndCanMakeWeakPtr, it's held by value by WebDriverService. Originally, bug286274 and https://github.com/WebKit/WebKit/pull/39310 addressed it, but also modified other classes in relation to smart pointer usage, despite not hitting assertions. During the review process, we agreed to submit first a more focused fix (this issue), leaving the original bug for when we address other safer cpp-related issues.
Attachments
Lauro Moura
Comment 1 2025-04-22 18:57:59 PDT
EWS
Comment 2 2025-04-25 16:31:36 PDT
Committed 294135@main (71b34966f4fb): <https://commits.webkit.org/294135@main> Reviewed commits have been landed. Closing PR #44398 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-04-25 16:34:48 PDT
Note You need to log in before you can comment on or make changes to this bug.