Closed Bug 1529995 Opened 5 years ago Closed 3 years ago

Crash with MOZ_CRASH(All runnables destined for a worker thread must be cancelable!), in [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable ] with offscreenCanvas

Categories

(Core :: Graphics: CanvasWebGL, defect, P4)

Unspecified
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1736177
Tracking Status
firefox67 --- affected

People

(Reporter: dholbert, Unassigned)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug is for crash report bp-bb291515-9497-416b-a28c-d22aa0190219.

Top 10 frames of crashing thread:

0 libxul.so libxul.so@0x2845535 
1 libxul.so libxul.so@0x2854e2a 
2 libxul.so libxul.so@0x8f4197 
3 libxul.so libxul.so@0x205b5eb 
4 libxul.so libxul.so@0x205b6a2 
5 libxul.so libxul.so@0x5890b9f 
6 libxul.so libxul.so@0x1d54bda 
7 libxul.so libxul.so@0x6badf4f 
8 libxul.so libxul.so@0x1fe03e7 
9 libxul.so libxul.so@0x1fe01ef 

Not sure why we're missing symbols; that's unfortunate. :( But the crash reason is:

MOZ_CRASH(All runnables destined for a worker thread must be cancelable!)

...which seems to be this line of code:
https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/dom/workers/WorkerPrivate.cpp#1469

This crash report came from someone named "Wes" in IRC #developers today. (no longer on, unfortunately)

dholbert - I'm watching this bug now.

I'm investigating two crashers right now; I believe this one is the root cause I'm chasing (the other one is that tabs crash when you use the debugger to inspect a typed array; I discussed that on slack bhackett this morning).

I think this was triggered by offscreenCanvas(...).getContext('webgl2').fenceSync() from a WebWorker.

Here is a fairly minimal example which reproduces the bug. Note that you must have gfx.offscreenCanvas enabled in your prefs: http://people.kingsds.network/wesgarland/crashers/ian-chew-webgl2-rendering-context-fenceSync/

Untar the file into a directory and point your browser at index.html. You need gfx.offscreenCanvas enabled. When you click "run", your tab will crash.

I have reproduced on the latest release as well as 826b59e57fe4 pulled from m-c a couple of days ago.

That's great -- I was able to reproduce the crash immediately with the URL (and the pref flip) in comment 2.

Plus, my crash report has symbols, so might be easier to analyze: bp-9d0f6208-f4c0-40ee-8cf1-ceafd0190226

My crash report has signature [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable ]

Crash Signature: libxul.so@0...] → libxul.so@0...] [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable ]
Summary: Crash with MOZ_CRASH(All runnables destined for a worker thread must be cancelable!) → Crash with MOZ_CRASH(All runnables destined for a worker thread must be cancelable!), in [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable ]

jgilbert, maybe you know what's going on here? The JS in question seems to be doing webgl stuff.

Flags: needinfo?(jgilbert)

OffscreenCanvas is unsupported.

Severity: critical → enhancement
Flags: needinfo?(jgilbert)
Priority: -- → P4

Wes, do you know if any of your folks has hit this with gfx.offscreenCanvas at its default (false) value?

(with another testcase that doesn't depend on the offscreenCanvas API, I mean)

Component: DOM: Workers → Canvas: WebGL
Summary: Crash with MOZ_CRASH(All runnables destined for a worker thread must be cancelable!), in [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable ] → Crash with MOZ_CRASH(All runnables destined for a worker thread must be cancelable!), in [@ mozilla::dom::WorkerPrivate::MaybeWrapAsWorkerRunnable ] with offscreenCanvas

dholbert - We did some digging this morning. It does not appear that it is possible to access this functionality without using offscreenCanvas, because the WebGL2RenderingContext object is not added to the top of the prototype chain (global object) in a worker until you |new OffscreenCanvas().getContext()|.

Cool, thanks for that info, and for bringing this to our attention in the first place!

I've chained this to bug 1390089 (the offscreenCanvas metabug).

I went through the runnables as part of bug 1736177 and made them cancelable.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: