Closed Bug 1252414 Opened 4 years ago Closed 4 years ago

handle lost context for webgl2 ClearBufferXXX function

Categories

(Core :: Canvas: WebGL, defect, critical)

x86_64
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox47 --- fixed
firefox48 --- fixed

People

(Reporter: posidron, Assigned: jerry)

References

(Blocks 1 open bug)

Details

(Keywords: crash, csectype-nullptr, Whiteboard: [fuzzblocker][gfx-noted])

Attachments

(3 files, 2 obsolete files)

I can not reproduce this crash with a single test-case but happens on a regular basis.
Attached file callstack.txt
Peter, can you get somebody to look at the stack or see if they can reproduce?
Flags: needinfo?(howareyou322)
Christoph, where did you get the call stack? Is it from treeherder?
Flags: needinfo?(cdiehl)
My current quarterly goal is to fuzz WebGL2. I got it from our fuzzing cluster.
Flags: needinfo?(cdiehl)
Whiteboard: [fuzzblocker] → [fuzzblocker][gfx-noted]
By running webgl2 conformance test, I had reproduced a crash in my local by using rr. But I had trouble to find the symbol for the build, check how to find the match symbol.
Flags: needinfo?(howareyou322) → needinfo?(bas)
clear wrong ni, sorry bas.
Flags: needinfo?(bas)
Is there any update. I know this bug has no testcase but it is blocking fuzzing WebGL2 in further detail.
Can someone take a look at fixing this? This really blocks WebGL2 fuzzing efforts.
Flags: needinfo?(howareyou322)
I will take a look.
Assignee: nobody → hshih
Flags: needinfo?(howareyou322)
Christoph, I'm not familiar with fuzzing test and fuzzing cluster. Is it at try server? And how can I trigger the test locally or at server side?
Status: NEW → ASSIGNED
Flags: needinfo?(cdiehl)
Clearing n-i, cause we talked about this on IRC. Jerry has received a copy of Framboise and the WebGL2 module.
Flags: needinfo?(cdiehl)
Hi Christoph,
I still have problem for fuzzy testing.

When the testing starts, I got a lot of error message. I don't know that these message is abnormal or not.
The log are in:
https://pastebin.mozilla.org/8863969
Flags: needinfo?(cdiehl)
In the crash stack, it shows that the webgl context is already lost. And then we call ClearBufferfv() in js. Normally, it's fine to call any gl function even though the device is lost. This is a bug that we don't check the device status in some gl api. I need to check all gl functions. It might take some times.
Flags: needinfo?(cdiehl)
Blocks: 1257593
Summary: WebGL2: crash [@mozilla::gl::GLContext::IsDestroyed] → handle lost context for webgl2 ClearBufferXXX function
Attachment #8731583 - Flags: review?(jgilbert) → review+
https://hg.mozilla.org/mozilla-central/rev/8c8ed5ea5eaf
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Blocks: 658170
Hi Jerry, Jeff, should we consider uplifting these fixes to Aurora 47 as status-firefox47 is affected? Please let me know.
Flags: needinfo?(jgilbert)
Flags: needinfo?(hshih)
Comment on attachment 8731583 [details] [diff] [review]
handle lost_context for webgl ClearBuffer*. v1

Approval Request Comment
[Feature/regressing bug #]: webgl2
[User impact if declined]: Bad behavior is uncommon cases.
[Describe test coverage new/current, TreeHerder]: In non-local webgl conformance tests.
[Risks and why]: none
[String/UUID change made/needed]: none
Flags: needinfo?(jgilbert)
Flags: needinfo?(hshih)
Attachment #8731583 - Flags: approval-mozilla-aurora?
Comment on attachment 8731583 [details] [diff] [review]
handle lost_context for webgl ClearBuffer*. v1

Crash fix, Aurora47+
Attachment #8731583 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8736564 - Flags: review?(jgilbert)
Comment on attachment 8736564 [details] [diff] [review]
test case for webgl2 ClearBufferXXX(). v1

Review of attachment 8736564 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/test/webgl-mochitest/test_webgl_fuzzy_pattern.html
@@ +34,5 @@
> +  var canvas = document.createElement('canvas');
> +  canvas.id = 'webglCanvas';
> +  canvas.height = 512;
> +  canvas.width = 512;
> +  document.body.appendChild(canvas);

Don't bother with anything but creating the canvas here, since it's not relevant to the below.
Attachment #8736564 - Flags: review?(jgilbert) → review+
Attachment #8736564 - Attachment is obsolete: true
Attachment #8737056 - Attachment is obsolete: true
Please land the attachment 8738944 [details] [diff] [review] to m-c.
test cast for this bug.
Status: RESOLVED → REOPENED
Keywords: checkin-needed
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/36c71d816690
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.