Issue 5701 in angleproject: A shader which takes too long crashes on M1 Mac

127 views
Skip to first unread message

akihi… via monorail

unread,
Mar 2, 2021, 8:16:47 AM3/2/21
to angleproj...@googlegroups.com
Status: New
Owner: ----
Priority: Medium
Type: Defect

New issue 5701 by akihi...@gmail.com: A shader which takes too long crashes on M1 Mac
https://bugs.chromium.org/p/angleproject/issues/detail?id=5701

What steps will reproduce the problem?
1. Visit https://www.shadertoy.com/view/WlKBzK on Google Chrome on M1 Mac. It has the following shader:
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
float f = 0.0;

for (int i = 0; i < 9999999; i++) {
f++;
}

fragColor = vec4(f, 1.0, 1.0, 1.0);
}

What is the expected output? What do you see instead?
The browser tab doesn't crash. It crashes with stderr instead:
2021-03-02 22:07:53.314 Google Chrome Helper (GPU)[5345:340598] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=2 "Caused GPU Hang Error (IOAF code 3)" UserInfo={NSLocalizedDescription=Caused GPU Hang Error (IOAF code 3)}
2021-03-02 22:07:53.571 Google Chrome Helper (GPU)[5345:340601] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=2 "Caused GPU Hang Error (IOAF code 3)" UserInfo={NSLocalizedDescription=Caused GPU Hang Error (IOAF code 3)}
2021-03-02 22:07:53.598 Google Chrome Helper (GPU)[5345:340598] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=4 "Ignored (for causing prior/excessive GPU errors) (IOAF code 4)" UserInfo={NSLocalizedDescription=Ignored (for causing prior/excessive GPU errors) (IOAF code 4)}
[0302/220753.604993:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x16afdc000, 0x8000): (os/kern) protection failure (2)

What version of the product are you using? On what operating system?
Google Chrome 88.0.4324.192 on macOS

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

syous… via monorail

unread,
Mar 2, 2021, 10:05:50 AM3/2/21
to angleproj...@googlegroups.com
Updates:
Cc: k...@chromium.org
Labels: OS-Mac

Comment #1 on issue 5701 by syou...@chromium.org: A shader which takes too long crashes on M1 Mac
https://bugs.chromium.org/p/angleproject/issues/detail?id=5701#c1

@Ken, is this not working as intended?

k… via monorail

unread,
Mar 2, 2021, 2:12:03 PM3/2/21
to angleproj...@googlegroups.com
Updates:
Cc: jon...@google.com geoff...@chromium.org ccam...@chromium.org

Comment #2 on issue 5701 by k...@chromium.org: A shader which takes too long crashes on M1 Mac
https://bugs.chromium.org/p/angleproject/issues/detail?id=5701#c2

@Shabi not completely clear.

Submitter: when you say you expect "the browser tab doesn't crash" - what exactly happens? Do you see a sad-tab? Can you please provide the full contents of about:gpu and any crash IDs from about:crashes ?

Yes, it's fully expected the GPU process may crash in this situation. This should result in a WebGL context lost event being delivered to the tab, and perhaps a sad-canvas showing up on Shadertoy's page, but the entire tab shouldn't crash.

syous… via monorail

unread,
Mar 2, 2021, 2:49:52 PM3/2/21
to angleproj...@googlegroups.com

Comment #3 on issue 5701 by syou...@chromium.org: A shader which takes too long crashes on M1 Mac
https://bugs.chromium.org/p/angleproject/issues/detail?id=5701#c3

What I meant is a shader taking too long triggering some GPU watchdog resulting in a crash/context loss.

akihi… via monorail

unread,
Mar 2, 2021, 9:39:25 PM3/2/21
to angleproj...@googlegroups.com

Comment #4 on issue 5701 by akihi...@gmail.com: A shader which takes too long crashes on M1 Mac
https://bugs.chromium.org/p/angleproject/issues/detail?id=5701#c4

"Tab crash" was a wrong description. I don't see a sad-tab. Instead, I see an alert saying "Shadertoy: ooops, your WebGL implementation has crashed!" and the page reloads. I believe only GPU process crashes.

So ANGLE requires process isolation to make an application which loads shaders provided by the user reliable?

k… via monorail

unread,
Mar 3, 2021, 4:24:32 AM3/3/21
to angleproj...@googlegroups.com
Updates:
Owner: k...@chromium.org
Status: WontFix

Comment #5 on issue 5701 by k...@chromium.org: A shader which takes too long crashes on M1 Mac
https://bugs.chromium.org/p/angleproject/issues/detail?id=5701#c5

Chrome's GPU process *is* the process isolation which insulates the browser from badly behaving shaders.

This is working as intended.
Reply all
Reply to author
Forward
0 new messages