New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 897914 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Falling back to SwiftShader triggers a GPU process crash on MacOSX

Project Member Reported by zmo@chromium.org, Oct 22

Issue description

If we add an entry to the software_rendering_list.json

    {
      "id": 158,
      "description": "testing",
      "os": {
        "type": "macosx"
      },
      "features": [
        "accelerated_webgl"
      ]  
    }

then GPU process always exits due to an error and launches again.

It's not very user visible because GPU process runs fine with SwiftShader on the second launch, but this is less optimal. On all other platforms where SwiftShader is supported, we can directly fallback to SwiftShader without exiting and relaunching GPU process.

Below are terminal messages from Chrome:

[10622:775:1022/135521.145478:ERROR:external_web_apps.cc(207)] Scanning 
[10627:775:1022/135521.404573:ERROR:gl_implementation.cc(281)] Failed to load /Users/zmo/src/chrome.git/src/out/Release/Chromium.app/Contents/Versions/72.0.3586.0/Chromium Framework.framework/Versions/Current/Libraries/libswiftshader_libGLESv2.dylib: dlopen(/Users/zmo/src/chrome.git/src/out/Release/Chromium.app/Contents/Versions/72.0.3586.0/Chromium Framework.framework/Versions/Current/Libraries/libswiftshader_libGLESv2.dylib, 1): no suitable image found.  Did find:
	/Users/zmo/src/chrome.git/src/out/Release/Chromium.app/Contents/Versions/72.0.3586.0/Chromium Framework.framework/Versions/Current/Libraries/libswiftshader_libGLESv2.dylib: file system sandbox blocked stat()
[10622:775:1022/135521.410906:ERROR:delegated_frame_host.cc(165)] Not implemented reached in void content::DelegatedFrameHost::SetNeedsBeginFrames(bool)
AVDCreateGPUAccelerator: Error loading GPU renderer
[10627:775:1022/135521.438431:ERROR:viz_main_impl.cc(184)] Exiting GPU process due to errors during initialization
AVDCreateGPUAccelerator: Error loading GPU renderer

My map desktop has an AMD GPU, not sure if it's relative to this bug or not.

This is caught by GpuProcess_feature_status_under_swiftshader on mac GPU bots in

https://chromium-review.googlesource.com/c/chromium/src/+/1289699/2
 
Status: Available (was: Untriaged)
To confirm, GpuProcess_feature_status_under_swiftshader also fails on Mac Intel bot, so it's not GPU specific. 
Owner: sugoi@chromium.org
Status: Assigned (was: Available)
Probably why we're seeing a significant number of Mac crash reports: Issue 897659.
OK, the issue is in sandbox_init_mac.cc, needs_more_info returns true, so we didn't switch to SwiftShader here. Instead, later in gpu_init.cc, we switch to SwiftShader, likely too late and triggering some sandbox issues.

I really don't think on Mac we need more info, so we should just fix that.
Owner: zmo@chromium.org
Status: Started (was: Assigned)
Actually recently backer@ added the context info collection on Mac, and of course ccameron@ decided to use that and added an entry that required full GPU info (blacklist everything if GL < 4.1).

Per offline discussion with kbr@, it seems the path moving forward would be to add swiftshader's dylib into the sandbox whitelist on Mac.
Labels: ReleaseBlock-Beta M-71
This bug will increase Mac crash quite a big because now we blacklist GPU on GL < 4.1.

Let's fix this and merge back to M71, where SwiftShader will be shipped.
Cc: kerrnel@chromium.org
Fix is uploaded for review: https://chromium-review.googlesource.com/c/chromium/src/+/1297481
We already cut Beta RC for this week beta release on Thursday.
Pls request a merge to M71 once cl listed at #8 looks good in canary so we can pick it up for next week beta. Thank you.
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f

commit be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f
Author: Zhenyao Mo <zmo@chromium.org>
Date: Wed Oct 24 17:57:42 2018

Allow loading SwiftShader after sandbox init on Mac

We could blacklist WebGL based on GL version, which is after creating a context.

Right now this will trigger a failure and GPU process will exit and then
relaunch with SwiftShader mode, which pre-load SwiftShader before sandbox init.

So users will not notice, but this GPU process exit and relaunch is less optimal
and unnecessary.

BUG= 897914 
TEST=manual
R=kerrnel@chromium.org,kbr@chromium.org,sugoi@chromium.org

Change-Id: Idcd018ca1f2e5161002cdae4563462c76316c606
Reviewed-on: https://chromium-review.googlesource.com/c/1297481
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602391}
[modify] https://crrev.com/be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f/content/test/gpu/gpu_tests/gpu_process_expectations.py
[modify] https://crrev.com/be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f/services/service_manager/sandbox/mac/cdm.sb
[modify] https://crrev.com/be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f/services/service_manager/sandbox/mac/common.sb
[modify] https://crrev.com/be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f/services/service_manager/sandbox/mac/gpu.sb
[modify] https://crrev.com/be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f/services/service_manager/sandbox/mac/sandbox_mac.mm

Labels: Merge-Rejected-71
Status: Fixed (was: Started)
Let me make merge request now in case I forgot, but let's wait for the fix get into canary and bake for a day or two.
Labels: -Merge-Rejected-71 Merge-Request-71
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5

commit 45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5
Author: Zhenyao Mo <zmo@chromium.org>
Date: Wed Oct 24 21:27:18 2018

Revert "Allow loading SwiftShader after sandbox init on Mac"

This reverts commit be9cde4790e7a70ea8b80503b83fdca1ea3f1b7f.

Reason for revert: broke media lab bots

Original change's description:
> Allow loading SwiftShader after sandbox init on Mac
> 
> We could blacklist WebGL based on GL version, which is after creating a context.
> 
> Right now this will trigger a failure and GPU process will exit and then
> relaunch with SwiftShader mode, which pre-load SwiftShader before sandbox init.
> 
> So users will not notice, but this GPU process exit and relaunch is less optimal
> and unnecessary.
> 
> BUG= 897914 
> TEST=manual
> R=​kerrnel@chromium.org,kbr@chromium.org,sugoi@chromium.org
> 
> Change-Id: Idcd018ca1f2e5161002cdae4563462c76316c606
> Reviewed-on: https://chromium-review.googlesource.com/c/1297481
> Reviewed-by: Alexis Hétu <sugoi@chromium.org>
> Reviewed-by: Greg Kerr <kerrnel@chromium.org>
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#602391}

TBR=sugoi@chromium.org,zmo@chromium.org,kbr@chromium.org,kerrnel@chromium.org,rsesek@chromium.org

Change-Id: Ib9ab22645f1727249db8f3f9a007cc76402e6067
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  897914 
Reviewed-on: https://chromium-review.googlesource.com/c/1298419
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602457}
[modify] https://crrev.com/45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5/content/test/gpu/gpu_tests/gpu_process_expectations.py
[modify] https://crrev.com/45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5/services/service_manager/sandbox/mac/cdm.sb
[modify] https://crrev.com/45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5/services/service_manager/sandbox/mac/common.sb
[modify] https://crrev.com/45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5/services/service_manager/sandbox/mac/gpu.sb
[modify] https://crrev.com/45fe99b7c3ad87279fdbc64b0d89f1b13e58bda5/services/service_manager/sandbox/mac/sandbox_mac.mm

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cc960d8aaa22026ba9684de674b99e73c09be387

commit cc960d8aaa22026ba9684de674b99e73c09be387
Author: Zhenyao Mo <zmo@chromium.org>
Date: Thu Oct 25 01:14:01 2018

[reland] Allow loading SwiftShader after sandbox init on Mac

We could blacklist WebGL based on GL version, which is after creating a context.

Right now this will trigger a failure and GPU process will exit and then
relaunch with SwiftShader mode, which pre-load SwiftShader before sandbox init.

So users will not notice, but this GPU process exit and relaunch is less optimal
and unnecessary.

BUG= 897914 
TEST=manual
R=rsesek@chromium.org
TBR=kerrnel@chromium.org,kbr@chromium.org,sugoi@chromium.org

Change-Id: I94cb687f9c4484084f27c78ed7fb16b123593579
Reviewed-on: https://chromium-review.googlesource.com/c/1298481
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602556}
[modify] https://crrev.com/cc960d8aaa22026ba9684de674b99e73c09be387/content/test/gpu/gpu_tests/gpu_process_expectations.py
[modify] https://crrev.com/cc960d8aaa22026ba9684de674b99e73c09be387/services/service_manager/sandbox/mac/cdm.sb
[modify] https://crrev.com/cc960d8aaa22026ba9684de674b99e73c09be387/services/service_manager/sandbox/mac/common.sb
[modify] https://crrev.com/cc960d8aaa22026ba9684de674b99e73c09be387/services/service_manager/sandbox/mac/gpu.sb
[modify] https://crrev.com/cc960d8aaa22026ba9684de674b99e73c09be387/services/service_manager/sandbox/mac/sandbox_mac.mm

Project Member

Comment 15 by sheriffbot@chromium.org, Oct 26

Labels: -Merge-Request-71 Hotlist-Merge-Review Merge-Review-71
This bug requires manual review: Reverts referenced in bugdroid comments after merge request.
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Which cl you're requesting a merge for? And is the change well baked/verified in canary, safe to merge?
Yes, verified in the current canary and it works as intended.
We want to merge back the CL in #14
Labels: -Merge-Review-71 Merge-Approved-71
Approving merge for Cl listed at #14 to M71 branch 3578 based on comments #17 and #18. Pls merge ASAP so we can pick it up for next week beta. Thank you.
Project Member

Comment 20 by bugdroid1@chromium.org, Oct 26

Labels: -merge-approved-71 merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db14de4b7bc3590f690c79293de4e47f8f195699

commit db14de4b7bc3590f690c79293de4e47f8f195699
Author: Zhenyao Mo <zmo@chromium.org>
Date: Fri Oct 26 22:00:42 2018

[reland] Allow loading SwiftShader after sandbox init on Mac

We could blacklist WebGL based on GL version, which is after creating a context.

Right now this will trigger a failure and GPU process will exit and then
relaunch with SwiftShader mode, which pre-load SwiftShader before sandbox init.

So users will not notice, but this GPU process exit and relaunch is less optimal
and unnecessary.

BUG= 897914 
TEST=manual
R=rsesek@chromium.org
TBR=kerrnel@chromium.org,kbr@chromium.org,sugoi@chromium.org

(cherry picked from commit cc960d8aaa22026ba9684de674b99e73c09be387)

Change-Id: I94cb687f9c4484084f27c78ed7fb16b123593579
Reviewed-on: https://chromium-review.googlesource.com/c/1298481
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602556}
Reviewed-on: https://chromium-review.googlesource.com/c/1303049
Cr-Commit-Position: refs/branch-heads/3578@{#354}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/db14de4b7bc3590f690c79293de4e47f8f195699/services/service_manager/sandbox/mac/cdm.sb
[modify] https://crrev.com/db14de4b7bc3590f690c79293de4e47f8f195699/services/service_manager/sandbox/mac/common.sb
[modify] https://crrev.com/db14de4b7bc3590f690c79293de4e47f8f195699/services/service_manager/sandbox/mac/gpu.sb
[modify] https://crrev.com/db14de4b7bc3590f690c79293de4e47f8f195699/services/service_manager/sandbox/mac/sandbox_mac.mm

Labels: Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/db14de4b7bc3590f690c79293de4e47f8f195699

Commit: db14de4b7bc3590f690c79293de4e47f8f195699
Author: zmo@chromium.org
Commiter: zmo@chromium.org
Date: 2018-10-26 22:00:42 +0000 UTC

[reland] Allow loading SwiftShader after sandbox init on Mac

We could blacklist WebGL based on GL version, which is after creating a context.

Right now this will trigger a failure and GPU process will exit and then
relaunch with SwiftShader mode, which pre-load SwiftShader before sandbox init.

So users will not notice, but this GPU process exit and relaunch is less optimal
and unnecessary.

BUG= 897914 
TEST=manual
R=rsesek@chromium.org
TBR=kerrnel@chromium.org,kbr@chromium.org,sugoi@chromium.org

(cherry picked from commit cc960d8aaa22026ba9684de674b99e73c09be387)

Change-Id: I94cb687f9c4484084f27c78ed7fb16b123593579
Reviewed-on: https://chromium-review.googlesource.com/c/1298481
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602556}
Reviewed-on: https://chromium-review.googlesource.com/c/1303049
Cr-Commit-Position: refs/branch-heads/3578@{#354}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}

Sign in to add a comment