Closed
Bug 1496257
Opened 7 years ago
Closed 6 years ago
Enable xpcshell-test for socket process isolation
Categories
(Core :: Networking, enhancement, P2)
Core
Networking
Tracking
()
RESOLVED
FIXED
People
(Reporter: CuveeHsu, Assigned: CuveeHsu)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(3 files, 2 obsolete files)
SPI doesn't launch socket process in current implementation. We need to fix it.
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
attachment 9014219 [details] works for me with the xpcshell-test.
However, I need some input since SyncLaunch on mainthread is not the perfect solution, though.
(SyncLaunch a process takes 270 ms in my computer, which is long)
AsyncLaunch (LaunchAndWaitForProcessHandle) version flow on the main process:
step1 Main Thread
- SocketProcessHost::Launch
- GeckoChildProcessHost::LaunchAndWaitForProcessHandle
step2 Non-Main Thread
- SocketProcessHost::OnChannelConnected
step3 Main Thread
- SocketProcessHost::InitAfterConnect
- PSocketProcessParent::Open // top-level ipdl open
- PSocketProcessParent::SendSetOffline
- OnProcessLaunchComplete
As you know, launch takes really long time.
Socket request highly possible occurs before step2.
Moreover, step3 looks like it must be in the main thread.
So we have two options:
(1) simply block the main thread if there's a socket request and we haven't finished the process launch.
(2) queues the requests. Once the |OnProcessLaunchComplete| fires, dispatch the requests in queue.
Although it did heavily block in xpcshell-test.
However, we don't block main thread for ./mach run.
Hence I prefer the simple implementation.
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(honzab.moz)
Assignee | ||
Updated•7 years ago
|
Priority: -- → P2
Whiteboard: [necko-triaged]
Assignee | ||
Comment 3•7 years ago
|
||
FWIW, current result
xpcshell
~~~~~~~~
Ran 582 checks (489 tests, 93 subtests)
Expected results: 388
Skipped: 14 tests
Unexpected results: 180
test: 130 (118 fail, 12 timeout)
subtest: 50 (50 fail)
![]() |
||
Comment 4•7 years ago
|
||
(In reply to Junior Hsu from comment #2)
> (2) queues the requests. Once the |OnProcessLaunchComplete| fires, dispatch
> the requests in queue.
This is the most acceptable solution, yes. I believe we will have more places accessing the gIOService->mSocketProcess in a potentially racy way, tho. We will simply have to catch and fix them all when they appear.
Main thread blocking (either to have some monitor signalling or spin the main thread even loop) is not an option.
Flags: needinfo?(honzab.moz)
QA Contact: jduell.mcbugs
Updated•7 years ago
|
QA Contact: jduell.mcbugs
Updated•7 years ago
|
Attachment #9014219 -
Attachment description: Bug 1496257 - socket operation should wait until socket process launched → Bug 1496257 - P1 socket operation should wait until socket process launched
Assignee | ||
Comment 5•7 years ago
|
||
Queue the nsHttpChannel::AsyncOpen in P3 in order to make the patch unrelated to nsHttpChannel
Assignee | ||
Comment 6•7 years ago
|
||
Need not to cherry-pick this patch if we don't split nsHttpTranscation
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → juhsu
Assignee | ||
Updated•6 years ago
|
Blocks: socket-proc-webrtc
Updated•6 years ago
|
Attachment #9016129 -
Attachment description: Bug 1496257 - P3 queue the nsHttpChannel::AsyncOpen if the socket process is not ready → Bug 1496257 - P3 queue the nsHttpChannel::AsyncOpenFinal if the socket process is not ready
Comment 8•6 years ago
|
||
Junior, has this landed? can you land it? Can you also make a new bug and upload a patch that we can land on the m.-c. (without http2 part). Please make on top of 1513135
Flags: needinfo?(juhsu)
Assignee | ||
Comment 9•6 years ago
|
||
land in larch
https://hg.mozilla.org/projects/larch/rev/2ada61a20690ee5b5afc81787c3dc7dd79a5996c
https://hg.mozilla.org/projects/larch/rev/e97fe90fa93bb3df64d3a262c815971a20003d1a
https://hg.mozilla.org/projects/larch/rev/f7ea92227fd01e56ab016d08eb6ad651811f026d
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(juhsu)
Resolution: --- → FIXED
Assignee | ||
Comment 10•6 years ago
|
||
(In reply to Dragana Damjanovic [:dragana] from comment #8)
> Junior, has this landed? can you land it? Can you also make a new bug and
> upload a patch that we can land on the m.-c. (without http2 part). Please
> make on top of 1513135
I believe it's bug 1513057. I'll post my patch there since all the patches should be land in one-shot.
Assignee | ||
Comment 11•6 years ago
|
||
backport the modification from bug 1513057
Assignee | ||
Comment 12•6 years ago
|
||
Use CallOrWaitForSocketProcess instead
Updated•6 years ago
|
Attachment #9032505 -
Attachment is obsolete: true
Updated•6 years ago
|
Attachment #9032506 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•