WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
42978
Add a watchdog timer to WebGL to prevent bad shaders from running forever
https://bugs.webkit.org/show_bug.cgi?id=42978
Summary
Add a watchdog timer to WebGL to prevent bad shaders from running forever
Chris Marrin
Reported
2010-07-26 10:41:18 PDT
If you create a trivially simply shader which infinite loops, it will hang Mac essentially forever. I need to experiment with the possibility of adding a watchdog timer to check for this condition and destroy the GL context when detected. This will hopefully get out of the hanging condition.
Attachments
WARNING! Run this in a browser that supports WebGL and your system may hang!
(3.17 KB, text/html)
2010-09-02 15:19 PDT
,
Chris Marrin
no flags
Details
Case which renders triangle over and over. Shader takes a long time, but is not infinite loop
(3.25 KB, text/html)
2010-09-10 10:56 PDT
,
Chris Marrin
no flags
Details
Even longer shader. This one flickers the background so you can see each render
(3.39 KB, text/html)
2010-09-10 11:24 PDT
,
Chris Marrin
no flags
Details
Infinite loop in vertex shader, repeated every 100ms. Locks up WebKit!
(3.32 KB, text/html)
2010-09-10 16:01 PDT
,
Chris Marrin
no flags
Details
Infinite loop in fragment shader, repeated every 100ms, locks up WebKit!
(3.33 KB, text/html)
2010-09-10 17:41 PDT
,
Chris Marrin
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Chris Marrin
Comment 1
2010-09-02 15:19:43 PDT
Created
attachment 66419
[details]
WARNING! Run this in a browser that supports WebGL and your system may hang!
Chris Marrin
Comment 2
2010-09-10 10:56:07 PDT
Created
attachment 67203
[details]
Case which renders triangle over and over. Shader takes a long time, but is not infinite loop
Chris Marrin
Comment 3
2010-09-10 11:24:56 PDT
Created
attachment 67207
[details]
Even longer shader. This one flickers the background so you can see each render
Chris Marrin
Comment 4
2010-09-10 16:01:58 PDT
Created
attachment 67255
[details]
Infinite loop in vertex shader, repeated every 100ms. Locks up WebKit!
Chris Marrin
Comment 5
2010-09-10 17:41:51 PDT
Created
attachment 67273
[details]
Infinite loop in fragment shader, repeated every 100ms, locks up WebKit!
Kenneth Russell
Comment 6
2011-12-19 15:28:30 PST
I noticed that this bug was just added as a blocker for the CSS Shader umbrella bug. Note that some progress has already been made on this issue on some platforms and ports, though more work is certainly needed. See
https://bugs.webkit.org/show_bug.cgi?id=64497
.
Chris Marrin
Comment 7
2011-12-19 16:06:11 PST
(In reply to
comment #6
)
> I noticed that this bug was just added as a blocker for the CSS Shader umbrella bug. Note that some progress has already been made on this issue on some platforms and ports, though more work is certainly needed. See
https://bugs.webkit.org/show_bug.cgi?id=64497
.
I think this bug is irrelevant given our recent work with robustness and protection against runaway shaders. Our driver team doesn't think it would ever be possible to do this sort of thing in user level code. I suggest we close it as NTBF
Kenneth Russell
Comment 8
2011-12-19 16:18:34 PST
(In reply to
comment #7
)
> > I think this bug is irrelevant given our recent work with robustness and protection against runaway shaders. Our driver team doesn't think it would ever be possible to do this sort of thing in user level code. > > I suggest we close it as NTBF
Sounds fine to me. Consider adding one or more of your test cases above to the denial of service samples in the public WebGL repository under sdk/tests/extra/. The infinite loop ones probably are not relevant as I believe ANGLE shouldn't allow those to compile any more.
Dean Jackson
Comment 9
2013-08-12 13:50:57 PDT
Covered by robustness stuff.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug