Closed Bug 1959966 Opened 4 months ago Closed 4 months ago

Firefox fails to relaunch immediately after being quit via App menu or Ctrl+Shift+Q with warning dialog active

Categories

(Firefox :: Data Loss Prevention, defect)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
139 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox137 --- unaffected
firefox138 --- wontfix
firefox139 --- verified

People

(Reporter: bhidecuti, Assigned: gstoll)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached video video showing the issue

Found in

  • 138.0b5

Affected versions

  • 139.0a1 (2025-04-10)
  • 138.0b5

Tested platforms

  • Affected platforms: Windows 10/11
  • Unaffected platforms: Ubuntu, macOS

Preconditions

  • Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view
  • Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
  • DLP Agent is running: .\content_analysis_sdk_agent.exe --user --toblock=.*\d{3}-?\d{2}-?\d{4}.* --towarn=.*warn.* --delays=10

Steps to reproduce

  1. Navigate to any website (e.g. https://support.mozilla.org/)
  2. Paste the "warning text" into the search field
  3. Wait for the “This content may be unsafe” dialog to appear, then quit the browser using the Application menu or Ctrl+Shift+Q keys
  4. Relaunch Firefox and observe the behavior

Expected result

  • Firefox should launch immediately

Actual result

  • Firefox does not launch for approximately a minute

Regression range

Additional notes

  • Attached a screen recording
  • Also reproducing when restarting the browser
  • After quitting, Firefox remains active as a background process for about a minute (can be checked in Task Manager). Ending the process allows immediate relaunch
  • Not reproducing when closing Firefox via the window Close button ("X")

:gstoll, since you are the author of the regressor, bug 1957902, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(gstoll)

The regressor was just fixing the quit dialog, so I suspect this has been going on for longer. (although looking a little more closely I did do some refactoring there, so maybe I did break it!)

Assignee: nobody → gstoll
Status: NEW → ASSIGNED
Flags: needinfo?(gstoll)

Explicitly cancel pending WARNs when we quit so that the dialogs go away
and nothing gets stuck. I feel like this used to work by coincidence,
but now we do it explicitly.

Pushed by gstoll@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1191b21ec8f0 cancel WARN Content Analysis dialogs when quitting to avoid a shutdownhang r=dlp-reviewers,handyman
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
Attached video 1959966.mp4

Verified this using Firefox Nightly 139.0a1 (2025-04-13), on Windows 10 and 11 and the issue is still reproducing as described in Comment 0. Firefox does not launch for approximately a minute after being quit via App menu or Ctrl+Shift+Q with warning dialog active.
Reopening the ticket.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(gstoll)
Flags: needinfo?(gstoll)

Sigh, this works when you close the window with the top-right button in the toolbar, but not when selecting Quit from the hamburger menu. (as :bhidecuti showed in the video) I'll take a look.

Per the comment, the quit-application event can be delayed if the user
quits via keyboard or the hamburger menu (as opposed to simply closing
the last window). I didn't dig too deep into this but this seems like
the kind of thing we can do in quit-application-granted anyway.

Pushed by gstoll@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a37d22ff53f5 cancel WARN Content Analysis dialogs in an earlier event when quitting to avoid a shutdownhang r=dlp-reviewers,handyman
Status: REOPENED → RESOLVED
Closed: 4 months ago4 months ago
Resolution: --- → FIXED

The patch landed in nightly and beta is affected.
:gstoll, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(gstoll)

Since this only affects WARN dialogs, not going to uplift.

Flags: needinfo?(gstoll)

Verified as fixed using Firefox Nightly 139.0a1 (2025-04-17), on Windows 11. Firefox now relaunches immediately after being quit via App menu or Ctrl+Shift+Q with warning dialog active.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: