Bug 224864

Summary: WebGL GPUP crashes when preparing for display due to off-thread WeakPtr access (IOSURFACE_SET_OWNERSHIP_IDENTITY)
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dino, kbr, kkinnunen, peng.liu6, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 224881    
Bug Blocks: 217211    
Attachments:
Description Flags
Patch none

Description Kimmo Kinnunen 2021-04-21 03:33:46 PDT
WebGL GPUP crashes when preparing for display due to off-thread WeakPtr access (IOSURFACE_SET_OWNERSHIP_IDENTITY)
Comment 1 Kimmo Kinnunen 2021-04-21 03:39:08 PDT
Created attachment 426666 [details]
Patch
Comment 2 Chris Dumez 2021-04-21 07:38:55 PDT
Comment on attachment 426666 [details]
Patch

r=me
Comment 3 EWS 2021-04-21 08:42:04 PDT
Committed r276363 (236841@main): <https://commits.webkit.org/236841@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426666 [details].
Comment 4 Peng Liu 2021-04-21 09:59:18 PDT
Comment on attachment 426666 [details]
Patch

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

> Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:50
> +#if HAVE(TASK_IDENTITY_TOKEN)

Is the macro here correct? Do we need to use HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY)? or maybe both?
Comment 5 Chris Dumez 2021-04-21 10:08:10 PDT
Comment on attachment 426666 [details]
Patch

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

>> Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:50
>> +#if HAVE(TASK_IDENTITY_TOKEN)
> 
> Is the macro here correct? Do we need to use HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY)? or maybe both?

Why?
Comment 6 Peng Liu 2021-04-21 10:13:53 PDT
Comment on attachment 426666 [details]
Patch

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

>>> Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:50
>>> +#if HAVE(TASK_IDENTITY_TOKEN)
>> 
>> Is the macro here correct? Do we need to use HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY)? or maybe both?
> 
> Why?

There will be a compiling error like "xxx is not used" if HAVE(TASK_IDENTITY_TOKEN) is true while HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY) is false.
Comment 7 Peng Liu 2021-04-21 12:06:34 PDT
Will be fixed in https://bugs.webkit.org/show_bug.cgi?id=224881.(In reply to Peng Liu from comment #6)
> Comment on attachment 426666 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426666&action=review
> 
> >>> Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:50
> >>> +#if HAVE(TASK_IDENTITY_TOKEN)
> >> 
> >> Is the macro here correct? Do we need to use HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY)? or maybe both?
> > 
> > Why?
> 
> There will be a compiling error like "xxx is not used" if
> HAVE(TASK_IDENTITY_TOKEN) is true while
> HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY) is false.

FYI. It will be fixed in https://bugs.webkit.org/show_bug.cgi?id=224881.
Comment 8 Radar WebKit Bug Importer 2021-04-22 18:25:45 PDT
<rdar://problem/77049474>