Bug 146657 - [WK2] UIProcess/WebProcess shutdown logic may have race condition
Summary: [WK2] UIProcess/WebProcess shutdown logic may have race condition
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-06 15:56 PDT by Brent Fulgham
Modified: 2017-08-07 05:29 PDT (History)
6 users (show)

See Also:


Attachments
Logging of "good" and "bad" disconnection. (20.62 KB, text/plain)
2015-07-06 16:16 PDT, Brent Fulgham
no flags Details
Logging additions to explore problem. NOT A FIX. (15.18 KB, patch)
2015-07-06 16:47 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-07-06 15:56:04 PDT
While fixing Bug 146554, I found that I had to update WebProcess::didClose to forcibly stop all media playback.

This was because the standard handling for WebPage::Close was getting missed due to the IPC connection between UIProcess and WebProcess getting terminated before the WebPage::Close message was received.

This should not be needed, and should be investigated.
Comment 1 Radar WebKit Bug Importer 2015-07-06 15:59:57 PDT
<rdar://problem/21693748>
Comment 2 Brent Fulgham 2015-07-06 16:16:45 PDT
Created attachment 256250 [details]
Logging of "good" and "bad" disconnection.

Attaching some logging I did.
(1) "Good" is the case where the WebPage::Close message is properly received by the WebProcess, and everything shuts down cleanly. This is the typical case.

(2) "Bad" is the case where the IPC connection between UIProcess and WebProcess is severed before WebPage::Close is received by the WebProcess.
Comment 3 Brent Fulgham 2015-07-06 16:47:32 PDT
Created attachment 256256 [details]
Logging additions to explore problem. NOT A FIX.
Comment 4 WebKit Commit Bot 2015-07-06 16:49:47 PDT
Attachment 256256 [details] did not pass style-queue:


ERROR: Source/WebKit2/Shared/ChildProcess.cpp:143:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKit2/Platform/IPC/Connection.cpp:710:  "syslog.h" already included at Source/WebKit2/Platform/IPC/Connection.cpp:347  [build/include] [4]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.