Open Bug 1514250 Opened 5 years ago Updated 2 years ago

Firefox doesn't restart after a crash if Browser Toolbox is opened

Categories

(Toolkit :: Crash Reporting, defect)

defect

Tracking

()

Tracking Status
firefox-esr60 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- fix-optional

People

(Reporter: obotisan, Unassigned)

Details

(Keywords: regression)

Attachments

(4 files)

Attached file user.js
[Affected versions]:
- Firefox 64
- Firefox 65.0b4
- Nightly 66.0a1

[Affected platforms]:
- macOS 10.13
- Ubuntu 18.04 x64

[Prerequites]:
- Save the attached .js in the profile you are using to test.

[Steps to reproduce]:
1. Open Browser Toolbox (hamburger menu -> Web Developer -> Browser Toolbox)
2. In the Browser Toolbox select the Network tab and click on "Reload".
3. In the browser write in the url bar about:crashparent.
4. Write the word "test" in the comment section then click on "Restart Firefox".
 
[Expected result]:
- The browser is restarted.

[Actual result]:
- On mac: The browser never restarts.
- On Ubuntu: The browser opens, but an error that another Firefox is running appears on the screen.

[Regression range]:
- It's a regression. I can reproduce the issue using a build from 2018-01-01.

[Additional Notes]:
- I couldn't reproduce the issue on Windows.
Attached image ezgif.com-optimize.gif
This is the behaviour on Ubuntu 18.04 x64
Attached video failed restart.mov
Behaviour on macOS 10.13
- last good build: 2018-02-23 ( 20180223100113 )
- first bad build: 2018-02-24 ( 20180224103027 ) 
These was the only information I could gather about the regression, because I had to do it manually. 
But if there is anything I can help you with, please don't hesitate to put a need info on me.

I think I remember some changes around that time to how the browser toolbox managed/worked with profiles - though I can't see it in the potential regression range (assuming that's right). Julian might remember...

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6661c077325c35af028f1cdaa660f673cbea39be&tochange=b3191953ccdabd335ffb383905a36b0062e547b2

Component: General → Crash Reporting
Flags: needinfo?(jdescottes)
Product: Firefox → Toolkit

I was unable to reproduce your issue on Mac OS, I get the same behavior as on Linux for you. On top of having the warning, the remaining browser console is also unable to interact with the new Firefox that got restarted. If I try to switch tools leads to a blank panel in the Browser Toolbox.

I think this comes from the fact that we now try to restart the Browser Toolbox if we detect that it was open before the restart. This was introduced in Bug 1438487, which landed on the 22nd of February on Mozilla central. This is very close to the regression range provided here, but it's just outside. I am not sure how to verify this without about:crashparent, which was added in the middle of 2018. Do you have alternative STRs?

Regarding the error message, here the browser crashes, but the Browser Toolbox, opened as a different application doesn't close. So when we restart Firefox, we try to restart the Browser Toolbox, but since we already have the previous Browser Toolbox instance running, we get this warning. Ideally we should find a way to kill this Browser Toolbox instance when crashing.

I think the only part which might be considered as a regression is that now you get an error message when restarting the browser. But the actual issue (dead Browser Toolbox) was most likely already present (again I'd need to have alternate STRs to verify that).

If my assumptions are correct, my suggestion would be to remove the regression keyword from here, and repurpose the bug as "Close the Browser Toolbox after a Firefox Crash".

Oana: can you share the STRs you used to crash without about:crashparent?

Flags: needinfo?(jdescottes) → needinfo?(oana.botisan)

Yes. No problem.
If you want to crash the browser without about:crashparent, you have to:

  1. Enable browser chrome and add-on debugging toolboxes.
  2. Open the Browser Console (Ctrl/Cmd+Shift+J).
  3. Write in the field from Browser Console this text:

Cu.import("resource://gre/modules/ctypes.jsm");let zero = new ctypes.intptr_t(8);let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));badptr.contents;

and press Enter.

Please look at the attached gif for more info.

Flags: needinfo?(oana.botisan)
Has Regression Range: --- → yes
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: