Bug 218769

Summary: GPUProcess does not properly get relaunched after crashing
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sergio, simon.fraser, thorton, 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=218807
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch none

Description Chris Dumez 2020-11-10 12:57:19 PST
GPUProcess does not properly get relaunched after crashing.
Comment 1 Chris Dumez 2020-11-10 13:03:53 PST
Created attachment 413726 [details]
Patch
Comment 2 Chris Dumez 2020-11-10 13:11:06 PST
Created attachment 413727 [details]
Patch
Comment 3 Geoffrey Garen 2020-11-10 13:24:05 PST
Comment on attachment 413727 [details]
Patch

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

> Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:86
>  GPUProcessProxy* GPUProcessProxy::m_singleton = nullptr;

Can we use WeakPtr for m_singleton?
Comment 4 Chris Dumez 2020-11-10 13:47:38 PST
(In reply to Geoffrey Garen from comment #3)
> Comment on attachment 413727 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=413727&action=review
> 
> > Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:86
> >  GPUProcessProxy* GPUProcessProxy::m_singleton = nullptr;
> 
> Can we use WeakPtr for m_singleton?

In file included from /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/DerivedSources/WebKit2/unified-sources/UnifiedSource54.cpp:3:
/Volumes/Data/WebKit/OpenSource/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:86:43: error: declaration requires an exit-time destructor [-Werror,-Wexit-time-destructors]
WeakPtr<GPUProcessProxy> GPUProcessProxy::m_singleton;
/Volumes/Data/WebKit/OpenSource/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:86:43: error: declaration requires a global destructor [-Werror,-Wglobal-constructors]

Do you have a proposal to make it work?
Comment 5 Geoffrey Garen 2020-11-10 13:53:07 PST
I *think* NeverDestroyed<WeakPtr<GPUProcessProxy>> should work, since NeverDestroyed avoids exit time destructors and WeakPtr allows assignment.
Comment 6 Chris Dumez 2020-11-10 14:10:09 PST
Created attachment 413739 [details]
Patch
Comment 7 EWS 2020-11-10 15:36:35 PST
Committed r269657: <https://trac.webkit.org/changeset/269657>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413739 [details].
Comment 8 Radar WebKit Bug Importer 2020-11-10 15:37:20 PST
<rdar://problem/71258139>