Closed
Bug 1381465
Opened 8 years ago
Closed 7 years ago
IPCBlobInputStream should preserve the non-blocking flag of the remote inputStream
Categories
(Core :: DOM: File, enhancement)
Core
DOM: File
Tracking
()
RESOLVED
DUPLICATE
of bug 1397627
People
(Reporter: baku, Assigned: baku)
Details
Attachments
(2 files)
34.75 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
198.19 KB,
image/png
|
Details |
Currently IPCBlobInputStream is always non-blocking.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8887026 -
Flags: review?(bugs)
Comment 2•8 years ago
|
||
Comment on attachment 8887026 [details] [diff] [review]
blocking.patch
Could you explain this bug. Do we have some actual issues without this patch? If so, do we need to fix this on all the branches? If not, why not?
Attachment #8887026 -
Flags: review?(bugs)
Assignee | ||
Comment 3•8 years ago
|
||
Comment on attachment 8887026 [details] [diff] [review]
blocking.patch
Think about a remote file: a DOM file selected from a FilePicker in the parent process and sent to the content process. Its inputStream is a nsFileStream, blocking for I/O.
When we use FileReader on the content process, we move that inputStream to the content process, moving the internal file descriptor. We must preserve the fact that this stream is blocking, otherwise FileReader will do I/O on the main-thread.
Attachment #8887026 -
Flags: review?(bugs)
Comment 4•8 years ago
|
||
And do we need the patch on branches? What is the actual bug this is fixing? I mean, is this fixing some issue a Firefox user can see today?
I'm puzzled why using File objects in child process isn't all broken without this.
Assignee | ||
Comment 5•8 years ago
|
||
> And do we need the patch on branches? What is the actual bug this is fixing?
> I mean, is this fixing some issue a Firefox user can see today?
Everywhere IPCBlob is landed. I/O on main-thread when FileReader is used is bad, but it doesn't break firefox.
Comment 6•8 years ago
|
||
Could we still explain. What causes main thread I/O currently, and on which processes does that happen?
Updated•8 years ago
|
Attachment #8887026 -
Flags: review?(bugs) → review+
Comment 7•8 years ago
|
||
Is there anything remaining blocking this from being landed?
uplifting bug 1377589 to beta 55 depends on this according to bug 1377589 comment 16.
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 8•8 years ago
|
||
I discussed this with smaug and overholt. I need to have necko able to work correctly with a nsIAsyncInputStream. Currently Necko uses ::Available() to know the size of the inputStream, mainly for the Content-Length header. This happens in several places. I have to fix that, and then I can land this patch.
Flags: needinfo?(amarchesini)
Comment 9•8 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #8)
> I discussed this with smaug and overholt. I need to have necko able to work
> correctly with a nsIAsyncInputStream. Currently Necko uses ::Available() to
> know the size of the inputStream, mainly for the Content-Length header. This
> happens in several places. I have to fix that, and then I can land this
> patch.
:baku, thanks for much for explaining again here that helped me a lot. :)
Comment 10•7 years ago
|
||
Shouldn't this be a qf bug, even qf:p1. Comment 3 is very worrisome.
Flags: needinfo?(amarchesini)
Updated•7 years ago
|
Whiteboard: [qf]
Comment 11•7 years ago
|
||
We're definitely reading files on the main thread in the content process right now (probably due to this bug). It's showing up with a fairly high frequency in BHR.
I've attached a screenshot (as linking into hangs.html is unstable right now).
:asuth mentioned that the appearance of SlicedInputStream here might add another wrinkle.
Updated•7 years ago
|
Whiteboard: [qf] → [qf][bhr]
Assignee | ||
Comment 12•7 years ago
|
||
This bug is 'already' fixed, but the patch cannot land because necko doesn't support fully nsIAsyncInputStreams yet.
There are several places where necko uses Available() to retrieve the size of the stream and, of course, this doesn't work if the stream is async.
I have a couple of patches for fixing this issue and they are almost green except for a SW test in e10s.
I hoping to finish these patches for this week.
Flags: needinfo?(amarchesini)
Updated•7 years ago
|
Whiteboard: [qf][bhr] → [qf:p1][bhr]
Assignee | ||
Comment 13•7 years ago
|
||
I'll work on this in bug 1397627. Patches are ready.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Whiteboard: [qf:p1][bhr]
You need to log in
before you can comment on or make changes to this bug.
Description
•