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)

65 Branch
defect

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)

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.
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)
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)
Adding the crash signature and moving hopefully to a better component.
Crash Signature: [@ js::AutoEnterAnalysis::AutoEnterAnalysis]
Component: Untriaged → DOM: Workers
Product: Firefox → Core
Potentially related to bug 1264182?
Priority: -- → P3
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.
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)
Whoops, and that's what the OS X signatures are too. (Same release assert.)
Attached patch blob.patch (deleted) — Splinter Review
Assignee: nobody → amarchesini
Attachment #9026222 - Flags: review?(twisniewski)
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+
Flags: needinfo?(twisniewski)
Attached patch test (deleted) — Splinter Review
Attachment #9026299 - Flags: review?(twisniewski)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 9026299 [details] [diff] [review] test Looks good to me.
Attachment #9026299 - Flags: review?(twisniewski) → review+
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
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Blocks: 1516614
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: