Closed
Bug 1317725
Opened 8 years ago
Closed 8 years ago
[e10s] Crash in mozilla::ipc::MessageChannel::AssertWorkerThread when sending file data in FormData through XHR in a worker
Categories
(Core :: DOM: Workers, defect)
Tracking
()
People
(Reporter: cachius, Assigned: baku)
References
Details
(Keywords: crash, hang, testcase)
Crash Data
Attachments
(4 files)
421 bytes,
text/javascript
|
Details | |
1.48 KB,
text/html
|
Details | |
7.72 KB,
patch
|
smaug
:
review+
gchang
:
approval-mozilla-aurora+
gchang
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
7.96 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36 Steps to reproduce: I use FormData inside a webworker to send files piece by piece via XHR. The worker receives a File object via postMessage. Then it creates a chunk using the File.slice() method, appends it to a FormData instance and sends this via XHR. Actual results: Without e10s everything works fine. With e10s enabled this suddenly doesn't work anymore, instead Windows 7: the tab freezes, closable via 2(!) clicks on its close button MacOS: the whole browser freezes. Expected results: It should work with e10s enabled.
With e10s enabled. Freezing should have been fixed by bug 1301094: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=d3303b1ac645d0b9def8dabd3e6a5f09aebd274c&tochange=cdc7be84b21a4092e04f1665e5eba5b31e54b63f But FF50+ are crashing now with the testcase joined to the bug report. FF51: https://crash-stats.mozilla.com/report/index/5361c977-5ef7-4630-bc22-ade652161116 FF53: https://crash-stats.mozilla.com/report/index/35705a81-5fa0-4995-9670-fd3b82161116
Blocks: 1301094
Severity: normal → critical
Status: UNCONFIRMED → NEW
Crash Signature: [@ mozilla::ipc::MessageChannel::AssertWorkerThread | mozilla::ipc::MessageChannel::Send | mozilla::ipc::PBackgroundChild::SendPBlobConstructor ]
[@ mozilla::ipc::MessageChannel::AssertWorkerThread | mozilla::dom::BlobChild::SendSliceConstructor<T> ]
status-firefox50:
--- → affected
status-firefox51:
--- → affected
status-firefox52:
--- → affected
status-firefox53:
--- → affected
tracking-firefox50:
--- → ?
tracking-firefox51:
--- → ?
tracking-firefox52:
--- → ?
tracking-firefox53:
--- → ?
Ever confirmed: true
Flags: needinfo?(amarchesini)
Summary: webworker: FormData/file access broken when e10s enabled → [e10s] Crash in mozilla::ipc::MessageChannel::AssertWorkerThread when sending file data in FormData through XHR in a worker
Version: 49 Branch → 50 Branch
Regression range: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=1a641275e97e48f383f1ed65363109e94c475b9b&tochange=7fac4674fdfa5cd1d2acbd5018f36213be63b010 Regressed by: bug 989619
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 4•8 years ago
|
||
Some comments here: 1. the crash itself is fixed by using EnsureBlobForBackgroundManager() in Read/WriteFormData. 2. but then there is a new crash: how we manage sliced remove blob cross threads. We don't set mActorTarget in remoteBlob when they are generated from a slice, this means that when ::Destroy() is called, we crash. This happens because: https://dxr.mozilla.org/mozilla-central/source/dom/ipc/Blob.cpp#2311 This returns true, bacause mEventTarget is nullptr. if (EventTargetIsOnCurrentThread(mActorTarget)) { if (mActor) { This crash, because we are not on the worker thread. mActor->AssertIsOnOwningThread(); Solution is to initialiaze mEventTarget also for sliced blobs.
Attachment #8811208 -
Flags: review?(bugs)
Updated•8 years ago
|
Attachment #8811208 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/959c8ce0a649 Correct creation of Sliced Remote Blob actorss when used in FormData in workers, r=smaug
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/959c8ce0a649
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Comment 8•8 years ago
|
||
Track 51- as the volume of the crash is low. Hi :baku, Is this worth uplifting to Beta51 and Aurora52?
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8811208 [details] [diff] [review] blob_formData.patch Approval Request Comment [Feature/regressing bug #]: FormData + XHR + Worker [User impact if declined]: FF crashes. [Describe test coverage new/current, TreeHerder]: green on try. test included. [Risks and why]: The patch is simple: we must create blob actors for each thread also when FormData is serialized. Somehow we forgot to do it for this cloned objected. [String/UUID change made/needed]: none
Flags: needinfo?(amarchesini)
Attachment #8811208 -
Flags: approval-mozilla-beta?
Attachment #8811208 -
Flags: approval-mozilla-aurora?
Comment 10•8 years ago
|
||
Comment on attachment 8811208 [details] [diff] [review] blob_formData.patch Fix a crash. Beta51+ and Aurora52+. Should be in 51 beta 3.
Attachment #8811208 -
Flags: approval-mozilla-beta?
Attachment #8811208 -
Flags: approval-mozilla-beta+
Attachment #8811208 -
Flags: approval-mozilla-aurora?
Attachment #8811208 -
Flags: approval-mozilla-aurora+
Comment 11•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/5cac2e6569d0
Comment 12•8 years ago
|
||
has problems to uplift grafting 376698:5cac2e6569d0 "Bug 1317725 -Correct creation of Sliced Remote Blob actorss when used in FormData in workers, r=smaug, a=gchang" merging dom/base/StructuredCloneHolder.cpp merging dom/ipc/Blob.cpp merging dom/workers/test/mochitest.ini merging dom/workers/test/script_bug1301094.js and dom/workers/test/script_createFile.js to dom/workers/test/script_createFile.js warning: conflicts while merging dom/workers/test/mochitest.ini! (edit, then use 'hg resolve --mark') abort: unresolved conflicts, can't continue (use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 13•8 years ago
|
||
Flags: needinfo?(amarchesini)
Updated•8 years ago
|
Comment 14•8 years ago
|
||
Hi :Tomcat, Per comment #13, can you help uplift the new patch to beta?
Flags: needinfo?(cbook)
Comment 15•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/aaa739912343
Updated•8 years ago
|
Flags: needinfo?(cbook)
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•