Closed Bug 1616563 Opened 1 month ago Closed 1 month ago

Crash in [@ mozilla::ipc::BaseProcessLauncher::FinishLaunch]

Categories

(GeckoView :: General, defect, P1)

Unspecified
Android
defect

Tracking

(firefox-esr68 unaffected, firefox73 unaffected, firefox74 wontfix, firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- unaffected
firefox74 --- wontfix
firefox75 --- fixed

People

(Reporter: fluffyemily, Assigned: aklotz)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug is for crash report bp-04779542-7a08-4a06-a6b7-c3aea0200219.

Top 10 frames of crashing thread:

0 libxul.so mozilla::ipc::BaseProcessLauncher::FinishLaunch ipc/glue/GeckoChildProcessHost.cpp:1549
1 libxul.so mozilla::MozPromise<int, mozilla::ipc::LaunchError, false>::ThenValue<mozilla::ipc::BaseProcessLauncher::PerformAsyncLaunch xpcom/threads/MozPromise.h:727
2 libxul.so mozilla::MozPromise<int, mozilla::ipc::LaunchError, false>::ThenValueBase::ResolveOrRejectRunnable::Run xpcom/threads/MozPromise.h:403
3 libxul.so mozilla::TaskQueue::Runner::Run xpcom/threads/TaskQueue.cpp:207
4 libxul.so nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1220
5 libxul.so <name omitted> xpcom/threads/nsThreadUtils.cpp:481
6 libxul.so mozilla::ipc::MessagePumpForNonMainThreads::Run ipc/glue/MessagePump.cpp:302
7 libxul.so MessageLoop::Run ipc/chromium/src/base/message_loop.cc:290
8 libxul.so nsThread::ThreadFunc xpcom/threads/nsThread.cpp:464
9 libnss3.so _pt_root nsprpub/pr/src/pthreads/ptthread.c:201

Assignee: nobody → aklotz
Priority: -- → P1

Ah, looks like the problem here is that we're not rejecting the promise when we should be.

Based on crash report data, somehow we are reaching a state where we complete
a GeckoResult with a pid of 0.

This patch makes ChildConnection.getPid() infallible; it either returns a
valid pid or it throws an exception.

The fallible variant, ChildConnection.getPidFallible(), is useful for logging
or other scenarios where an invalid pid is okay.

Note that this patch likely does not conclusively eliminiate all crashes
surrounding invalid pids during child process creation; I have reason to believe
that once this patch lands we will likely see some crashes due to getPid()
exceptions out in the wild, but at least this patch will make those crash dumps
more actionable.

Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b23f08adbb2
Split ChildConnection.getPid() into fallible and invallible variants; r=geckoview-reviewers,snorp
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.