Open Bug 1758634 Opened 3 years ago Updated 2 years ago

An early quit/restart while Firefox hasn't been finished initialization can trigger crashes

Categories

(Testing :: Marionette Client and Harness, defect, P3)

Default
defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

As seen while working on bug 1726465 an early quit/shutdown as triggered by Marionette can cause crashes of the browser. We have seen similar things in the past but so far haven't thought about delaying the actual shutdown until initialization has been finished.

While taking a look at the quitter extension today I noticed the following code:

https://searchfox.org/mozilla-central/rev/131f3af9a49d2203adb7b7ef30dcc37c9f1aa10b/tools/quitter/parent.js#18

          if (browserWindow && browserWindow.gBrowserInit) {
            await browserWindow.gBrowserInit.idleTasksFinishedPromise;
          }

As such before calling Services.app.quit() we should run the above code and make sure that all open browser windows have finished their idle tasks.

As discussed we will not focus on this bug yet given that a browser window is still needed.

Whiteboard: [bidi-m3-mvp]

The severity field is not set for this bug.
:whimboo, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(hskupin)

Lets actually revisit if it's really needed after bug 1726465 has been fixed.

No longer blocks: 1726465
Severity: -- → S3
Depends on: 1726465
Flags: needinfo?(hskupin)

We still have certain situations when an early shutdown can cause a hang of Firefox. Lets get those added as dependencies.

Also there is bug 1745430 which covers possible test scenarios with Marionette to trigger these crashes.

Blocks: 1745430
Depends on: 1764420
Product: Testing → Remote Protocol
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in before you can comment on or make changes to this bug.