Massive hangs waiting for processes creation on 2012 MacBook Pro
Categories
(Core :: IPC, defect, P3)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
Details
See profile: https://perfht.ml/2wbidoE
Nightly is pretty snappy, but sometimes tab-switching just beachballs, and I managed to catch one of these on a profile.
I don't know how actionable this is... Maybe process creation should be async?
Comment 1•5 years ago
|
||
Fission has support for this, at least for subframes; see bug 1602712 and connected bugs. I don't know if that works for top-level documents yet.
There's also a content process that's launched asynchronously when the browser is idle, which usually satisfies a new tab's request for non-Fission; it doesn't work with Fission yet (I think?) but it eventually will.
But it's bad that launch is taking 8 seconds. It would help to add IPC Launch and maybe also Gecko_IOThread to the profiler's thread filter list and try to reproduce the hang again.
Comment 3•5 years ago
|
||
Nika confirms that Fission process launching is async, but normal/e10s process launching is still synchronous.
Nika recommends duping this bug to async process launching bug 1602441. We intend to fix that bug before we ship Fission.
Emilio, since it looks like you intend to debug some more, I'll let you choose whether or when to dupe this bug to bug 1602441.
| Reporter | ||
Comment 4•5 years ago
|
||
Not quite the same, but I think this process launch timed out and writing the minidump hung up the main thread: https://perfht.ml/2wq5hen just for reference.
| Reporter | ||
Comment 5•5 years ago
|
||
This is what Jed was looking for I think: https://perfht.ml/2QxPjGe
It seems the IPC launch is spending a lot of time just waiting on mach_msg_trap... Jed do you see anything interesting there?
| Reporter | ||
Comment 6•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
Not quite the same, but I think this process launch timed out and writing the minidump hung up the main thread: https://perfht.ml/2wq5hen just for reference.
Also, Gabriele, maybe all the main thread IO in the profile here should also move to another thread? Is there a bug for that? If so I'd be happy to poke.
Comment 7•5 years ago
|
||
We tried moving this OMT but it regressed badly so we gave up on that. The slowness here might be due to bug 1622316 for which I have a fix for waiting for review. That being said all this code is moving completely out-of-process in bug 1588530 which I'm currently working on.
Comment 8•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)
This is what Jed was looking for I think: https://perfht.ml/2QxPjGe
It seems the IPC launch is spending a lot of time just waiting on mach_msg_trap... Jed do you see anything interesting there?
The launch thread is blocked waiting for the child process to start up enough to send it Mach ports. We'd need an OS-level profiler to find out anything else, unfortunately.
Comment 9•5 years ago
|
||
Moving to IPC component
Unlinking unrelated async process launching bug 1602441
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Emilio, can you think of any specific things you're doing that might help us reproduce this? I've got a 2012 MacBook Pro I can test with. I haven't been able to reproduce it with basic browsing.
Do you have any Mac tracing or debugging tools running that might slow down new process creation? I noticed kdebug_trace calls in the main thread stacks. I don't know much about kdebug, but it is used by Activity Monitor and some other tracing tools.
| Reporter | ||
Comment 11•5 years ago
|
||
I was running top -o cpu on a terminal, but that is about it (plus that is after noticing the problem, to try to diagnose it).
Other than that, not really. This started to happen after a catalina update, and I mitigated it a bit by disabling spindump, which was spawning up and slowing things even more (but again, that's after seeing the problem).
Updated•3 years ago
|
Updated•14 days ago
|
Comment 12•8 days ago
|
||
Emilio, did you ever see this problem / hang again when switching tabs?
Comment 14•7 days ago
|
||
Shall we then close the bug as incomplete or is it worth keeping it open?
| Reporter | ||
Updated•7 days ago
|
Description
•