Closed Bug 1600658 Opened 4 years ago Closed 4 years ago

junit harness for content process crash tests needs redesign

Categories

(GeckoView :: Sandboxing, defect, P1)

Unspecified
All
defect

Tracking

(firefox73 fixed)

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

(Whiteboard: [geckoview:m1912])

Attachments

(2 files)

TL;DR (emphasis mine):

If the process name begins with a ':' character, a new process private to that application will be created when needed to run that component (allowing you to spread your application across multiple processes).

Our current setup for the crashContent test assumes that any content processes started by the RemoteGeckoService will be charged to the RemoteGeckoService process, when in fact the content processes are charged to the androidTest application as a whole.

In other words, RemoteGeckoService's instance of Gecko thinks it is creating a new content process, while Android just hands it the existing content process from androidTest.

Prior to bug 1594820, this seemed to kind of mostly work due to fluky timing between the various processes. With the patches from bug 1594820 applied, the timing changed enough that, while the content process does successfully crash, that crash report is consumed by androidTest's crash handler instead of RemoteGeckoService's crash handler. Ergo, crashContent perma-failure.

Whiteboard: [geckoview:m1912]
Assignee: nobody → aklotz
Status: NEW → ASSIGNED
Depends on: 1603250

We now need the junit crash handler to see crash reports.

Depends on D56852

  • We add bidirectional messaging to TestCrashHandler:

    1. The test sends a message to the TestCrashHandler, notifying it that an
      upcoming crash is intentional and its intent should be checked.
    2. Upon receipt of the crash report, the service reviews the contents of the
      crash intent, and then sends a message back to the test with the test results.
    3. The service deletes any crash dump artifacts belonging to crash intents
      that have been evaluated so that the harness doesn't pick up any
      intentional crashes.
  • We remove crashContent from CrashTest.kt and create ContentCrashTest.kt
    for that case. The crashParent test remains unchanged other than switching
    its crash handler over to TestCrashHandler.

  • We remove the CrashTestHandler service, as both crashContent and
    crashParent tests now use TestCrashHandler.

Depends on D56853

Depends on: 1603508
Pushed by aklotz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5bd66ef01543
Part 1 - Remove setting of MOZ_CRASHREPORTER_NO_REPORT from runjunit.py; r=gbrown
https://hg.mozilla.org/integration/autoland/rev/2a1e94a02eef
Part 2 - Move content crash test into a session test and modify TestCrashHandler to selectively evaluate crash report submission; r=snorp
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Moving content process management bugs to the new GeckoView::Sandboxing component.

Component: General → Sandboxing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: