Closed
Bug 1507893
Opened 6 years ago
Closed 6 years ago
Response.blob() in Web Worker crashes Firefox Nightly/Dev when passed objectURL
Categories
(Core :: DOM: Workers, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox63 | --- | unaffected |
firefox64 | --- | wontfix |
firefox65 | --- | fixed |
People
(Reporter: rikschennink, Assigned: baku)
References
Details
Crash Data
Attachments
(2 files)
(deleted),
patch
|
twisniewski
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
twisniewski
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15
Steps to reproduce:
1. Create an objectURL `const url = createObjectURL(file)`
2. Send the URL to a Web Worker
3. In the Web Worker try to turn the URL into a Blob with `fetch(url).then(res => res.blob())`
Actual results:
Firefox Nightly/Developer Edition crashes to desktop.
No problems on normal Firefox (63.0.1 (64-bit))
https://github.com/pqina/filepond-plugin-image-preview/issues/9
https://github.com/pqina/jquery-filepond/issues/6
Expected results:
Not crash and nicely return a blob to work with.
Comment 1•6 years ago
|
||
Rik: Can you please type about:crashes in the URL bar and paste your crash report ID? This will help bucket this in the proper component. Thanks!
Flags: needinfo?(rikschennink)
Reporter | ||
Comment 2•6 years ago
|
||
bp-7d55060e-60b1-42b6-9928-f37bf0181116
I've got twenty more, all from the same time stamp, but I guess the contents will be the same, let me know if I need to paste those as well.
Flags: needinfo?(rikschennink)
Comment 3•6 years ago
|
||
Adding the crash signature and moving hopefully to a better component.
Crash Signature: [@ js::AutoEnterAnalysis::AutoEnterAnalysis]
status-firefox63:
--- → unaffected
status-firefox65:
--- → affected
Component: Untriaged → DOM: Workers
Product: Firefox → Core
Comment 5•6 years ago
|
||
Based on the linked issues in comment 0, it looks like the problem involves <input type="file">-sourced File blobs, which means that bug 1491504 and bug 1482752 are most likely to be related.
Comment 6•6 years ago
|
||
It looks like this is also happening other some other signatures if we use the proto signature:
https://crash-stats.mozilla.com/search/?proto_signature=BeginConsumeBodyRunnable&version=65.0a1&version=64.0b9&version=64.0b8&version=64.0b7&version=64.0b6&date=%3E%3D2018-11-05T15%3A31%3A36.000Z&date=%3C2018-11-19T15%3A31%3A36.000Z&_sort=-date&_facets=signature&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#facet-signature
Ah, and that's helpful because it looks like there's a thread mis-match. In this crash:
https://crash-stats.mozilla.com/report/index/fe4a5f32-f3a2-4629-a62b-7052f0181118
we're dying on this release assert. It looks like the wrapper is being created on the main thread when it wants to be created on the worker thread?
MOZ_RELEASE_ASSERT(CurrentThreadCanAccessZone(zone))
Flags: needinfo?(twisniewski)
Comment 7•6 years ago
|
||
Whoops, and that's what the OS X signatures are too. (Same release assert.)
Assignee | ||
Comment 8•6 years ago
|
||
Assignee: nobody → amarchesini
Attachment #9026222 -
Flags: review?(twisniewski)
Comment 9•6 years ago
|
||
Comment on attachment 9026222 [details] [diff] [review]
blob.patch
Review of attachment 9026222 [details] [diff] [review]:
-----------------------------------------------------------------
This patch makes sense to me. I'm not sure if my r+ is good enough, but I'll grant it. I'm guessing we'd want a test, right?
Attachment #9026222 -
Flags: review?(twisniewski) → review+
Updated•6 years ago
|
Flags: needinfo?(twisniewski)
Assignee | ||
Comment 10•6 years ago
|
||
Attachment #9026299 -
Flags: review?(twisniewski)
Updated•6 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 11•6 years ago
|
||
Comment on attachment 9026299 [details] [diff] [review]
test
Looks good to me.
Attachment #9026299 -
Flags: review?(twisniewski) → review+
Comment 12•6 years ago
|
||
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d544aa6b069b
Fetch() should consume DOM Files on the target thread only, r=twisniewski
https://hg.mozilla.org/integration/mozilla-inbound/rev/637291128b2e
Fetch() should consume DOM Files on the target thread only - test, r=twisniewski
Comment 13•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d544aa6b069b
https://hg.mozilla.org/mozilla-central/rev/637291128b2e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Updated•6 years ago
|
status-firefox64:
--- → ?
status-firefox-esr60:
--- → wontfix
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•