Bug 197366 - Add assertions to catch NetworkProcess null CompletionHandler dispatching
Summary: Add assertions to catch NetworkProcess null CompletionHandler dispatching
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-29 06:48 PDT by Alex Christensen
Modified: 2019-05-06 22:49 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.16 KB, patch)
2019-04-29 06:48 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (2.70 KB, patch)
2019-05-06 16:20 PDT, Alex Christensen
cdumez: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews215 for win-future (13.58 MB, application/zip)
2019-05-06 22:49 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-04-29 06:48:01 PDT
Assert Function is non-null in RunLoop::dispatch
Comment 1 Alex Christensen 2019-04-29 06:48:35 PDT
Created attachment 368452 [details]
Patch
Comment 2 Chris Dumez 2019-04-29 08:44:22 PDT
Comment on attachment 368452 [details]
Patch

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

> Source/WTF/wtf/RunLoop.cpp:129
> +    RELEASE_ASSERT(function);

I am not convinced this will help us debug rdar://problem/48679972 since in rdar://problem/48679972 we're crashing when trying to call a CompletionHandler, not a Function. I think what ends up happening is that somebody calls dispatch() with a Function that wraps a CompletionHandler whose m_function is null.
This case would not get caught by your proposed assertion.
Comment 3 Alex Christensen 2019-05-06 16:19:52 PDT
Reopening to try a different approach.
Comment 4 Alex Christensen 2019-05-06 16:20:47 PDT
Created attachment 369194 [details]
Patch
Comment 5 Chris Dumez 2019-05-06 16:31:14 PDT
Comment on attachment 369194 [details]
Patch

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

> Source/WebKit/ChangeLog:10
> +        * NetworkProcess/cache/CacheStorageEngine.cpp:

Why only these 4? It seems there are other calls to RunLoop::main().dispatch() in the networkProcess which pass a CompletionHandler. E.g. saveCookies() in NetworkProcessCocoa.
Comment 6 Alex Christensen 2019-05-06 18:04:34 PDT
I've decided to try https://bugs.webkit.org/show_bug.cgi?id=197641 instead
Comment 7 EWS Watchlist 2019-05-06 22:49:12 PDT
Comment on attachment 369194 [details]
Patch

Attachment 369194 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12119790

New failing tests:
http/tests/css/filters-on-iframes.html
Comment 8 EWS Watchlist 2019-05-06 22:49:14 PDT
Created attachment 369236 [details]
Archive of layout-test-results from ews215 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews215  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit