Closed Bug 1953481 Opened 12 days ago Closed 2 days ago

MOZ_ASSERT_UNREACHABLE("missing canceled response action") with TimeoutResult=1 when requests time out

Categories

(Firefox :: Data Loss Prevention, defect)

defect

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: gstoll, Assigned: gstoll)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

STR:

  • Run the sample DLP agent with --delays=10
  • Launch Firefox
  • Set browser.contentanalysis.agent_timeout to 5
  • Set browser.contentanalysis.timeout_result to 1
  • Restart Firefox
  • Navigate to https://mdn.github.io/learning-area/html/forms/file-examples/simple-file.html
  • Click "Browse..." and select three files that wouldn't be blocked by the DLP agent
  • When the WARN dialogs pop up, click "Use content"

A few seconds later the MOZ_ASSERT_UNREACHABLE will be hit.

Attached image 1953481.gif

Hello Greg! Unfortunately, I cannot reproduce this crash with Firefox 138.0a1 (2025-03-12). Am I missing something? Attached a screen recording.

Flags: needinfo?(gstoll)

Hi Alexandru! I think you are hitting this problem - at the very end of the agent log you can see that it is receiving an acknowledgment with final action <Unspecified>, which is an indication that this is probably happening. The crash is actually a MOZ_ASSERT(), which will only crash in a debug build - were you trying with a debug build? Thanks!

Flags: needinfo?(gstoll) → needinfo?(atrif)

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

Hi Alexandru! I think you are hitting this problem - at the very end of the agent log you can see that it is receiving an acknowledgment with final action <Unspecified>, which is an indication that this is probably happening. The crash is actually a MOZ_ASSERT(), which will only crash in a debug build - were you trying with a debug build? Thanks!

Oh, I was on a normal build. Thank you for the explanation, I didn't know that MOZ_ASSERT() happens on debug builds and I thought this was a crash.

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

The code was expecting that once we get a response from the agent and
we are going to auto-acknowledge there should be an entry in
mUserActionIdToCanceledResponseMap. This was not the case if we were
waiting for a warn response from the user. Now we check for that case
and early return.

Also removing a function that nothing was using anymore.

We didn't have any of these previously, so I added a few simple use
cases and a few that were previously triggering the MOZ_ASSERT_UNREACHABLE()
addressed in this bug.

Pushed by gstoll@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e6de35b0e9d6 part 1 - avoid asserting when hitting timeout with TimeoutResult=warn r=dlp-reviewers,handyman https://hg.mozilla.org/integration/autoland/rev/48f39a85bb61 part 2 - refactor some Content Analysis tests to share timeout logic r=dlp-reviewers,handyman https://hg.mozilla.org/integration/autoland/rev/c97516598534 part 3 - add some Content Analysis WARN tests r=dlp-reviewers,handyman
Status: ASSIGNED → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: