Bug 198865

Summary: WebProcessPool::clearWebProcessHasUploads cannot assume its given processIdentifier is valid
Product: WebKit Reporter: youenn fablet <youennf>
Component: Page LoadingAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, ews-watchlist, pnormand, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews215 for win-future
none
Patch none

Description youenn fablet 2019-06-14 13:28:08 PDT
WebProcessPool::clearWebProcessHasUploads cannot assume its given processIdentifier is valid
Comment 1 youenn fablet 2019-06-14 13:28:35 PDT
<rdar://problem/51618878>
Comment 2 youenn fablet 2019-06-14 14:08:55 PDT
Created attachment 372139 [details]
Patch
Comment 3 youenn fablet 2019-06-14 14:10:53 PDT
(In reply to youenn fablet from comment #2)
> Created attachment 372139 [details]
> Patch

First version with some refactoring.
The minimal patch is to just change WebProcessPool methods to return early and probably handle the case of crashing NetworkProcess.
Comment 4 EWS Watchlist 2019-06-14 15:18:54 PDT
Comment on attachment 372139 [details]
Patch

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

New failing tests:
fast/block/float/float-with-anonymous-previous-sibling.html
Comment 5 EWS Watchlist 2019-06-14 15:18:56 PDT
Created attachment 372148 [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
Comment 6 youenn fablet 2019-06-14 17:11:25 PDT
Comment on attachment 372139 [details]
Patch

win error unrelated
Comment 7 WebKit Commit Bot 2019-06-14 18:07:22 PDT
Comment on attachment 372139 [details]
Patch

Clearing flags on attachment: 372139

Committed r246452: <https://trac.webkit.org/changeset/246452>
Comment 8 WebKit Commit Bot 2019-06-14 18:07:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Philippe Normand 2019-06-15 06:22:40 PDT
Broke GTK:

Thread 1 (Thread 0x7fa8e04cb9c0 (LWP 23184)):
#0  WTFCrash () at ../../Source/WTF/wtf/Assertions.cpp:305
#1  0x00007fa8f62c5791 in _ZN6WebKit14WebProcessPool25clearWebProcessHasUploadsEN3WTF16ObjectIdentifierIN7WebCore21ProcessIdentifierTypeEEE (this=0x7fa8c75fc000, processID=...) at ../../Source/WebKit/UIProcess/WebProcessPool.cpp:2562
#2  0x00007fa8f62c652e in _ZN6WebKit15WebProcessProxyD2Ev (this=0x7fa8c73fc000, __in_chrg=<optimized out>) at ../../Source/WebKit/UIProcess/WebProcessProxy.cpp:172
#3  0x00007fa8f62c69ae in _ZN6WebKit15WebProcessProxyD0Ev (this=0x7fa8c73fc000, __in_chrg=<optimized out>) at ../../Source/WebKit/UIProcess/WebProcessProxy.cpp:200
#4  0x00007fa8f61a40d8 in _ZNK3WTF20ThreadSafeRefCountedIN6WebKit15WebProcessProxyELNS_17DestructionThreadE0EE5derefEv (this=0x7fa8c73fc0a0) at DerivedSources/ForwardingHeaders/wtf/ThreadSafeRefCounted.h:76
#5  0x00007fa8f61a237e in _ZN3WTF3RefIN6WebKit15WebProcessProxyENS_13DumbPtrTraitsIS2_EEED2Ev (this=0x7ffdddedd718, __in_chrg=<optimized out>) at DerivedSources/ForwardingHeaders/wtf/Ref.h:60
#6  0x00007fa8f625c62f in _ZN3WTF3RefIN6WebKit15WebProcessProxyENS_13DumbPtrTraitsIS2_EEEaSERS2_ (this=0x7fa8c75f30d0, reference=...) at DerivedSources/ForwardingHeaders/wtf/Ref.h:160
#7  0x00007fa8f6213327 in _ZN6WebKit12WebPageProxy13launchProcessERKN7WebCore17RegistrableDomainE (this=0x7fa8c75f3000, registrableDomain=...) at ../../Source/WebKit/UIProcess/WebPageProxy.cpp:723
#8  0x00007fa8f621f9a5 in _ZN6WebKit12WebPageProxy31launchInitialProcessIfNecessaryEv (this=0x7fa8c75f3000) at ../../Source/WebKit/UIProcess/WebPageProxy.cpp:3588
#9  0x00007fa8f622d03f in _ZN6WebKit12WebPageProxy27postMessageToInjectedBundleERKN3WTF6StringEPN3API6ObjectE (this=0x7fa8c75f3000, messageName="Reset", messageBody=0x7fa8cc1f8508) at ../../Source/WebKit/UIProcess/WebPageProxy.cpp:5909
#10 0x00007fa8f6385149 in WKPagePostMessageToInjectedBundle (pageRef=0x7fa8c75f3000, messageNameRef=0x7fa8cc1fd4c8, messageBodyRef=0x7fa8cc1f8508) at ../../Source/WebKit/UIProcess/API/C/WKPage.cpp:2562
#11 0x000055fab0018879 in _ZN3WTR14TestController28resetStateToConsistentValuesERKNS_11TestOptionsENS0_10ResetStageE (this=0x7ffdddede5f0, options=..., resetStage=WTR::TestController::ResetStage::BeforeTest) at ../../Tools/WebKitTestRunner/TestController.cpp:923
#12 0x000055fab001798c in _ZN3WTR14TestController32ensureViewSupportsOptionsForTestERKNS_14TestInvocationE (this=0x7ffdddede5f0, test=...) at ../../Tools/WebKitTestRunner/TestController.cpp:753
#13 0x000055fab001aced in _ZN3WTR14TestController20configureViewForTestERKNS_14TestInvocationE (this=0x7ffdddede5f0, test=...) at ../../Tools/WebKitTestRunner/TestController.cpp:1432
#14 0x000055fab0042e76 in _ZN3WTR14TestInvocation6invokeEv (this=0x55fab12b8200) at ../../Tools/WebKitTestRunner/TestInvocation.cpp:159
#15 0x000055fab001bee5 in _ZN3WTR14TestController7runTestEPKc (this=0x7ffdddede5f0, inputLine=0x7ffdddeddd60 "/home/slave/webkitgtk/gtk-linux-64-debug-tests/build/LayoutTests/animations/added-while-suspended.html'--timeout'30000") at ../../Tools/WebKitTestRunner/TestController.cpp:1652
#16 0x000055fab001c0dd in _ZN3WTR14TestController20runTestingServerLoopEv (this=0x7ffdddede5f0) at ../../Tools/WebKitTestRunner/TestController.cpp:1698
#17 0x000055fab001c11e in _ZN3WTR14TestController3runEv (this=0x7ffdddede5f0) at ../../Tools/WebKitTestRunner/TestController.cpp:1706
#18 0x000055fab00156bd in _ZN3WTR14TestControllerC2EiPPKc (this=0x7ffdddede5f0, argc=2, argv=0x7ffdddede928) at ../../Tools/WebKitTestRunner/TestController.cpp:162
#19 0x000055fab006dea9 in main (argc=2, argv=0x7ffdddede928) at ../../Tools/WebKitTestRunner/gtk/main.cpp:45
Comment 10 youenn fablet 2019-06-15 21:25:58 PDT
Reopening to attach new patch.
Comment 11 youenn fablet 2019-06-15 21:25:59 PDT
Created attachment 372217 [details]
Patch
Comment 12 youenn fablet 2019-06-15 21:28:11 PDT
I am removing the assertion.
We should probably do another refactoring to move more logic in WebProcessProxy and add back a similar assertion.
Comment 13 WebKit Commit Bot 2019-06-15 23:38:09 PDT
Comment on attachment 372217 [details]
Patch

Clearing flags on attachment: 372217

Committed r246472: <https://trac.webkit.org/changeset/246472>
Comment 14 WebKit Commit Bot 2019-06-15 23:38:10 PDT
All reviewed patches have been landed.  Closing bug.