Closed Bug 1899703 Opened 1 month ago Closed 25 days ago

Firefox fails to relaunch after closing the browser when DLP busy and warning dialogs are shown

Categories

(Firefox :: Data Loss Prevention, defect)

Firefox 128
Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox126 --- unaffected
firefox127 --- unaffected
firefox128 --- verified

People

(Reporter: bhidecuti, Assigned: gstoll)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Found in

  • 128.0a1 (2024-05-29)

Affected versions

  • 128.0a1 (2024-05-29)

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
  • Run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10

Tested platforms

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

Steps to reproduce

  1. Navigate to https://support.mozilla.org/
  2. Open up a document in an external program (for example Notepad) and type “warning text” into it and copy it
  3. Return to Firefox and paste the “warning text” into the search bar in the middle of the page
  4. While the scan is still in progress, quit the browser without interacting with the dialog “Scan in progress” dialog
  5. Open Firefox again and observe the behavior
  6. Repeat steps 1-3
  7. Wait for the “This content may be unsafe” dialog to be shown and then quit the browser without interacting with the dialog
  8. Open Firefox again and observe the behavior

Expected result

  • For both step 5 and 8: Firefox is successfully launched

Actual result

  • For both step 5 and 8: Firefox does not launch

Regression range

  • This is not a regression as this is a new feature

Additional notes

  • See the attached video
  • After quitting Firefox while the message is displayed, it remains active as a background process for a few minutes (can be checked in Task Manager)
  • Not reproducing if attempting to relaunch Firefox after it is no longer running in the background
  • Also, after managing to launch the browser, it seems that a crash (including silent crash as well) occurred due to the performed actions: https://crash-stats.mozilla.org/report/index/e1e84e1c-25f1-4a26-ba86-9d03a0240530
  • This issue was fixed for the blocked dialog in Bug 1898718
Assignee: nobody → gstoll
Status: NEW → ASSIGNED

I'm not sure how much we can do about this for the case when the DLP request is still in progress - the sample agent doesn't implement CancelAllRequests, so I'm hopeful a real agent wouldn't have this problem. But we should be able to address the problem with quitting while the the "This content may be unsafe" dialog is open. (step 8 above)

FWIW I suspect that this may only be a problem with clipboard operations (because of their synchronousity)

Attachment #9405373 - Attachment description: Bug 1899703 - don't shutdownhang when quitting while DLP request is active r=#dlp-reviewers! → Bug 1899703, 1899971 - don't shutdownhang when quitting while DLP request is active r=#dlp-reviewers!
Pushed by gstoll@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e2739904da94
1899971 - don't shutdownhang when quitting while DLP request is active r=dlp-reviewers,handyman
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

Verified this using Firefox Nightly 128.0a1, build ID 20240606035352, from treeherder, and the issue is no longer reproducible when quitting Firefox while the “This content may be unsafe” dialog is open. Firefox is successfully relaunched.
However, the issue is still reproducible when quitting Firefox while the "Scan in progress" dialog is open. @gstoll, should we close this ticket and file a new one for the "Scan in progress" dialog?
Thanks in advance!

Flags: needinfo?(gstoll)

Let's go ahead and file a new one.

I'm also curious whether you see all the same side effects - for me it does take a little while to exit but not as long as before the fix, and I don't see the crash/crash report afterwards.

Thanks!

Flags: needinfo?(gstoll)

(In reply to Greg Stoll :gstoll from comment #7)

I'm also curious whether you see all the same side effects - for me it does take a little while to exit but not as long as before the fix, and I don't see the crash/crash report afterwards.

Thank you for the reply! For me it still takes about 2 minutes to exit, same as before the fix. Regarding the crash, I am still encountering it. If you go to about:crashes you should see the unsubmitted crash report.

Based on comment 6, I am marking verified as fixed. I have filled bug 1901197 for the "Scan in progress" issue.

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

Attachment

General

Creator:
Created:
Updated:
Size: