Bug 228978 - Avoid infinite recursion when command buffer creation fails
Summary: Avoid infinite recursion when command buffer creation fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kyle Piddington
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-10 15:37 PDT by Kyle Piddington
Modified: 2021-08-11 13:05 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.06 KB, patch)
2021-08-10 15:42 PDT, Kyle Piddington
no flags Details | Formatted Diff | Diff
Patch (5.08 KB, patch)
2021-08-10 15:43 PDT, Kyle Piddington
no flags Details | Formatted Diff | Diff
Patch for landing (5.11 KB, patch)
2021-08-11 12:36 PDT, Kyle Piddington
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Piddington 2021-08-10 15:37:41 PDT
Avoid infinite recursion when command buffer creation fails
Comment 1 Kyle Piddington 2021-08-10 15:42:47 PDT
Created attachment 435308 [details]
Patch
Comment 2 EWS Watchlist 2021-08-10 15:43:34 PDT
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 3 Kyle Piddington 2021-08-10 15:43:49 PDT
Created attachment 435309 [details]
Patch
Comment 4 Kenneth Russell 2021-08-10 16:30:56 PDT
Comment on attachment 435309 [details]
Patch

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

Looks good; r+. Minor comment about the ChangeLog.

If there are any cases where this was found in the wild, I'd appreciate it if you could mention them on https://bugs.webkit.org/show_bug.cgi?id=228978 .

> Source/ThirdParty/ANGLE/ChangeLog:9
> +        In cases where the MTLCommandBuffer is not a valid metal object, we can end up in an infinite recursive loop during context steup. Refactor setupDraw to take no more than two attempts through the setup function. 

Could you reflow to 80 columns? This makes it easier to read the ChangeLogs and commit messages later. Also: steup -> setup.
Comment 5 Kyle Piddington 2021-08-11 10:40:19 PDT
We've had a few reports in from the wild, but no luck with a repro case. The best I've got is that we ended up in a state where the metal device was available, but we failed to create a command queue for another process as well.
Comment 6 Kyle Piddington 2021-08-11 12:36:41 PDT
Created attachment 435368 [details]
Patch for landing
Comment 7 EWS 2021-08-11 13:04:43 PDT
Committed r280926 (240444@main): <https://commits.webkit.org/240444@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435368 [details].
Comment 8 Radar WebKit Bug Importer 2021-08-11 13:05:24 PDT
<rdar://problem/81809463>