[socket process] Assertion failure: mOnStartRequestCalled (OnStartRequest should be called before OnStopRequest)
Categories
(Core :: Networking, defect, P2)
Tracking
()
People
(Reporter: kershaw, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 obsolete file)
I've noticed this assertion when running this test [1].
Here are the steps for causing this assertion.
- A sync XHR is created in OnStartRequest at [2].
- Since it's a sync XHR, SpinEventLoopUntil is called here [3].
- We never have a chance to set mOnStartRequestCalled to true at [4].
- nsHttpChannel::OnStopRequest is called since HttpTransactionParent receives the IPC from socket process.
[1] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/netwerk/test/unit/test_reentrancy.js
[2] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/netwerk/test/unit/test_reentrancy.js#51
[3] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/dom/xhr/XMLHttpRequestMainThread.cpp#2910
[4] https://searchfox.org/mozilla-central/rev/1b2636e8517aa48422ed516affe4d28cb7fa220a/netwerk/protocol/http/nsHttpChannel.cpp#1829
Reporter | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
can you explain why is it working without the socket process?
Reporter | ||
Comment 3•5 years ago
|
||
(In reply to Dragana Damjanovic [:dragana] from comment #2)
can you explain why is it working without the socket process?
Because OnStartRequest is called at [1]. The |nsInputStreamPump::mState| is always STATE_START until |mListener->OnStartRequest| returns. This means that ODA and OnStopRequest will not called.
When socket process is enabled, RecvOnDataAvailable and RecvOnStopRequest are actually events dispatched from IPC thread and could be executed from [2].
[1] https://searchfox.org/mozilla-central/rev/d33d470140ce3f9426af523eaa8ecfa83476c806/netwerk/base/nsInputStreamPump.cpp#487
[2] https://searchfox.org/mozilla-central/rev/d33d470140ce3f9426af523eaa8ecfa83476c806/xpcom/threads/nsThreadUtils.h#348
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
|
||
Updated•3 years ago
|
Description
•