Closed Bug 1770241 Opened 2 years ago Closed 2 years ago

Utility process child blocked on startup from audio utility

Categories

(Core :: IPC, defect)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox100 --- unaffected
firefox101 --- unaffected
firefox102 --- fixed

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

(Blocks 2 open bugs)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1769624 +++

Reverting the fix of bug 1770086 one should repro intermittent leak of sLaunchUtilityPromise. Investigation showed so far that on osx at least, we get the child process unable to start, somehow blocking around https://searchfox.org/mozilla-central/rev/7f729f601c0b738f870ae0ed49098f9268e250f9/ipc/glue/ProcessUtils_mac.mm#20

This should be investigated further

Summary: osx Intermittent Assertion failure: false (MOZ_ASSERT_UNREACHABLE: Failure when starting actor), at /builds/worker/checkouts/gecko/ipc/glue/UtilityProcessManager.cpp:248 → Utility process child blocked on startup from audio utility

:gerard-majax, since this bug is a regression, could you fill (if possible) the regressed_by field?
For more information, please visit auto_nag documentation.

Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(lissyx+mozillians)
Keywords: regression

Removing completely the SetThisProcessName() seems to help: https://treeherder.mozilla.org/jobs?repo=try&revision=304e452ecc0ed36c438fb31d67684eb42bc997c7

After 456 retriggers, no repro, while https://treeherder.mozilla.org/jobs?repo=try&revision=78e26d2a0d02d937a01bc4741b3e1837d3dc309d would show ~3 repro over 50 runs.

According to https://bugzilla.mozilla.org/show_bug.cgi?id=557226#c14 we need to set the name after doing GetCurrentProcess() and I verified that if we just remove GetCurrentProcess() no name is changed in Activity Monitor.

However reading System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Headers/Processes.h about GetCurrentProcess() one can see:

  • An application can force the connection to the Process Manager to
  • be set up by calling any Process Manager routine, but the
  • recommended way to do this is to call GetCurrentProcess() to ask
  • for the current application's PSN. This will initialize the
  • connection to the Process Manager if it has not already been set
  • up and 'check in' the application with the system.

Right now we do the call, for Utility Process, within the UtilityProcessChild::Init() https://searchfox.org/mozilla-central/rev/49204d3e4b03513ca2741404b7453245863d380c/ipc/glue/UtilityProcessChild.cpp#105

But it looks like if we do it in RecvInit() before calling CGSShutdownServerConnections() https://searchfox.org/mozilla-central/rev/49204d3e4b03513ca2741404b7453245863d380c/ipc/glue/UtilityProcessChild.cpp#129 then the process name appears correctly. Without GetCurrentProcess() call.

Attachment #9277580 - Attachment is obsolete: true
Attachment #9277581 - Attachment is obsolete: true
Attachment #9277581 - Attachment is obsolete: false
Attachment #9277581 - Attachment description: Bug 1770241 - Add sandboxing rules to make sure GetCurrentProcess() never blocks r?haik! → Bug 1770241 - Move SetThisProcessName() to avoid risky GetCurrentProcess() r?haik!
Blocks: 1770966
Pushed by alissy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f0d8c007c8a7
Move SetThisProcessName() to avoid risky GetCurrentProcess() r=haik
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: