[socket process] Assertion failure: XRE_IsParentProcess(), at /builds/worker/checkouts/gecko/ipc/glue/InputStreamUtils.cpp:272
Categories
(Core :: Networking, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox79 | --- | fixed |
People
(Reporter: kershaw, Assigned: kershaw)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(2 files, 1 obsolete file)
|
27.57 KB,
patch
|
Details | Diff | Splinter Review | |
|
47 bytes,
text/x-phabricator-request
|
Details |
task 2020-06-15T10:51:00.851Z] 10:51:00 INFO - GECKO(2778) | Assertion failure: XRE_IsParentProcess(), at /builds/worker/checkouts/gecko/ipc/glue/InputStreamUtils.cpp:272
[task 2020-06-15T10:51:00.855Z] 10:51:00 INFO - Initializing stack-fixing for the first stack frame, this may take a while...
[task 2020-06-15T10:51:12.386Z] 10:51:12 INFO - GECKO(2778) | #01: nsBufferedInputStream::Deserialize(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [netwerk/base/nsBufferedStreams.cpp:649]
[task 2020-06-15T10:51:12.387Z] 10:51:12 INFO - GECKO(2778) | #02: mozilla::ipc::InputStreamHelper::DeserializeInputStream(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [ipc/glue/InputStreamUtils.cpp:357]
[task 2020-06-15T10:51:12.390Z] 10:51:12 INFO - GECKO(2778) | #03: nsMultiplexInputStream::Deserialize(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [xpcom/io/nsMultiplexInputStream.cpp:1026]
[task 2020-06-15T10:51:12.391Z] 10:51:12 INFO - GECKO(2778) | #04: mozilla::ipc::InputStreamHelper::DeserializeInputStream(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [ipc/glue/InputStreamUtils.cpp:357]
[task 2020-06-15T10:51:12.391Z] 10:51:12 INFO - GECKO(2778) | #05: mozilla::ipc::DeserializeIPCStream(mozilla::ipc::IPCStream const&) [ipc/glue/IPCStreamUtils.cpp:295]
[task 2020-06-15T10:51:12.392Z] 10:51:12 INFO - GECKO(2778) | #06: mozilla::ipc::DeserializeIPCStream(mozilla::Maybe<mozilla::ipc::IPCStream> const&) [ipc/glue/IPCStreamUtils.cpp:303]
[task 2020-06-15T10:51:12.392Z] 10:51:12 INFO - GECKO(2778) | #07: mozilla::net::HttpTransactionChild::RecvInit(unsigned int const&, mozilla::net::HttpConnectionInfoCloneArgs const&, mozilla::net::nsHttpRequestHead const&, mozilla::Maybe<mozilla::ipc::IPCStream> const&, unsigned long const&, bool const&, unsigned long const&, unsigned char const&, unsigned long const&, unsigned int const&, unsigned int const&, bool const&, unsigned long const&, bool const&, mozilla::Maybe<mozilla::net::H2PushedStreamArg> const&, mozilla::Maybe<mozilla::net::PInputChannelThrottleQueueChild*> const&, bool const&) [netwerk/protocol/http/HttpTransactionChild.cpp:180]
[task 2020-06-15T10:51:12.393Z] 10:51:12 INFO - GECKO(2778) | #08: mozilla::net::PHttpTransactionChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources-l1:a6265be9f362522a0e665e06fbb23e4d45a0975a57788b56660e854fe5b47708d1552548e55ce3796dad85e88bf18f6b31b0b40bd50f629c8e72fac919b8706d/ipc/ipdl/PHttpTransactionChild.cpp::567]
I think change this assertion to MOZ_ASSERT(XRE_IsParentProcess() || XRE_IsSocketProcess()); should be enough.
| Assignee | ||
Comment 1•5 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #0)
task 2020-06-15T10:51:00.851Z] 10:51:00 INFO - GECKO(2778) | Assertion failure: XRE_IsParentProcess(), at /builds/worker/checkouts/gecko/ipc/glue/InputStreamUtils.cpp:272 [task 2020-06-15T10:51:00.855Z] 10:51:00 INFO - Initializing stack-fixing for the first stack frame, this may take a while... [task 2020-06-15T10:51:12.386Z] 10:51:12 INFO - GECKO(2778) | #01: nsBufferedInputStream::Deserialize(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [netwerk/base/nsBufferedStreams.cpp:649] [task 2020-06-15T10:51:12.387Z] 10:51:12 INFO - GECKO(2778) | #02: mozilla::ipc::InputStreamHelper::DeserializeInputStream(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [ipc/glue/InputStreamUtils.cpp:357] [task 2020-06-15T10:51:12.390Z] 10:51:12 INFO - GECKO(2778) | #03: nsMultiplexInputStream::Deserialize(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [xpcom/io/nsMultiplexInputStream.cpp:1026] [task 2020-06-15T10:51:12.391Z] 10:51:12 INFO - GECKO(2778) | #04: mozilla::ipc::InputStreamHelper::DeserializeInputStream(mozilla::ipc::InputStreamParams const&, nsTArray<mozilla::ipc::FileDescriptor> const&) [ipc/glue/InputStreamUtils.cpp:357] [task 2020-06-15T10:51:12.391Z] 10:51:12 INFO - GECKO(2778) | #05: mozilla::ipc::DeserializeIPCStream(mozilla::ipc::IPCStream const&) [ipc/glue/IPCStreamUtils.cpp:295] [task 2020-06-15T10:51:12.392Z] 10:51:12 INFO - GECKO(2778) | #06: mozilla::ipc::DeserializeIPCStream(mozilla::Maybe<mozilla::ipc::IPCStream> const&) [ipc/glue/IPCStreamUtils.cpp:303] [task 2020-06-15T10:51:12.392Z] 10:51:12 INFO - GECKO(2778) | #07: mozilla::net::HttpTransactionChild::RecvInit(unsigned int const&, mozilla::net::HttpConnectionInfoCloneArgs const&, mozilla::net::nsHttpRequestHead const&, mozilla::Maybe<mozilla::ipc::IPCStream> const&, unsigned long const&, bool const&, unsigned long const&, unsigned char const&, unsigned long const&, unsigned int const&, unsigned int const&, bool const&, unsigned long const&, bool const&, mozilla::Maybe<mozilla::net::H2PushedStreamArg> const&, mozilla::Maybe<mozilla::net::PInputChannelThrottleQueueChild*> const&, bool const&) [netwerk/protocol/http/HttpTransactionChild.cpp:180] [task 2020-06-15T10:51:12.393Z] 10:51:12 INFO - GECKO(2778) | #08: mozilla::net::PHttpTransactionChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources-l1:a6265be9f362522a0e665e06fbb23e4d45a0975a57788b56660e854fe5b47708d1552548e55ce3796dad85e88bf18f6b31b0b40bd50f629c8e72fac919b8706d/ipc/ipdl/PHttpTransactionChild.cpp::567]I think change this assertion to
MOZ_ASSERT(XRE_IsParentProcess() || XRE_IsSocketProcess());should be enough.
Well, it's not that simple. IPCBlobInputStream can not be deserialized.
| Assignee | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
I would like to understand what the problem is before changing the inputStream serialization/deserialization.
Can you tell me more about why this crash happens?
Comment 4•5 years ago
|
||
To contextualize more why I think the bug is elsewhere, IPCBlobInputStream works as described here: https://searchfox.org/mozilla-central/rev/37932bfc600f97ec923464086dc12cdaa72aefde/dom/file/ipc/IPCBlobUtils.h#14
If the content process receives a IPCBlobInputStreamParams, there is something fundamentally wrong in the serialization of the stream. It would be great if we can reproduce this crash locally.
| Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #4)
To contextualize more why I think the bug is elsewhere, IPCBlobInputStream works as described here: https://searchfox.org/mozilla-central/rev/37932bfc600f97ec923464086dc12cdaa72aefde/dom/file/ipc/IPCBlobUtils.h#14
If the content process receives a IPCBlobInputStreamParams, there is something fundamentally wrong in the serialization of the stream. It would be great if we can reproduce this crash locally.
Actually, this bug is about to deserializing IPCBlobInputStream in socket process, not content process.
In details, I am trying to serialize the stream in parent process here and deserialize it back in socket process at here.
To reproduce this locally, just run the following command. The crashed process is socket process.
./mach mochitest --headless --setpref="network.http.network_access_on_socket_process.enabled=true" toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js
Comment 6•5 years ago
|
||
To reproduce this locally, just run the following command. The crashed process is socket process.
./mach mochitest --headless --setpref="network.http.network_access_on_socket_process.enabled=true" toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.js
Thanks for sharing this. IPCBlobInputStream is a complex object that doesn't send the real data to the content process, but, instead, it sends just and ID. The underlying inputStream is kept on the parent process and it shared only at the first nsIAsyncInputStream::asyncWait() call.
But all of this is not supported by SocketProcess yet.
I wrote a quick patch that passes the test adding the support for SocketProcess in the IPCBlobInputStream world.
Let me know if you want to use my patch and complete this bug, or you want me to take this bug.
Comment 7•5 years ago
|
||
| Assignee | ||
Comment 8•5 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #6)
To reproduce this locally, just run the following command. The crashed process is socket process.
./mach mochitest --headless --setpref="network.http.network_access_on_socket_process.enabled=true" toolkit/crashreporter/test/browser/browser_aboutCrashesResubmit.jsThanks for sharing this. IPCBlobInputStream is a complex object that doesn't send the real data to the content process, but, instead, it sends just and ID. The underlying inputStream is kept on the parent process and it shared only at the first nsIAsyncInputStream::asyncWait() call.
But all of this is not supported by SocketProcess yet.I wrote a quick patch that passes the test adding the support for SocketProcess in the IPCBlobInputStream world.
Let me know if you want to use my patch and complete this bug, or you want me to take this bug.
Thank you, baku! I think your patch should be the right approach. I've verified you patch is working locally and also on try.
It'd be great if you can take this bug, since I am not familiar with IPCBlobInputStream at all.
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
I wonder how many other issues there might be with this stuff. Needs quite some testing, I think
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
| bugherder | ||
Description
•