Open Bug 1322097 Opened 8 years ago Updated 1 month ago

Unsubmitted/unsent crash reports are ignored

Categories

(Toolkit :: Crash Reporting, defect, P2)

53 Branch
defect

Tracking

()

People

(Reporter: euthanasia_waltz, Assigned: afranchuk)

Details

Attachments

(1 file)

STR:
1. Ensure ~/.mozilla/firefox/Crash Reports/pending is empty
2. Start firefox
3. Visit https://twitter.com/firefox and scroll several pages
4. Exit firefox
5. Make sure ~/.mozilla/firefox/Crash Reports/pending is not empty (if it is empty, repeat step 2-4)
6. Start firefox

ER:
"You have an unsent crash report" notification appears,
about:crash shows Unsubmitted Crash Reports

AR:
Nothing both

In pending folder, there are 3 files such as
0fa6924b-6ee2-49e5-034734b4-2177e031-browser.dmp
0fa6924b-6ee2-49e5-034734b4-2177e031.dmp
0fa6924b-6ee2-49e5-034734b4-2177e031.extra
IMO, this file name(id part) violates UUID pattern.
https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/CrashReports.jsm#44
https://dxr.mozilla.org/mozilla-central/source/toolkit/crashreporter/CrashSubmit.jsm#30
If I renamed it to 0fa6924b-6ee2-49e5-0347-34b42177e031, then expected results come.

This occurs on LinuxMint 18 and Manjaro Linux 16.10, but not on Windows 10.
Component: Untriaged → Breakpad Integration
Product: Firefox → Toolkit
Severity: normal → S3
Severity: S3 → S2
Priority: -- → P2
Status: UNCONFIRMED → NEW
Ever confirmed: true

As a data point: I'm on Linux with Firefox Nightly 114.0a1 (2023-04-30). I recently had the "You have an unsent crash report" notification come up (incidentally, I've never seen this in my 15+ years of firefox on linux, though that was almost all Stable). I clicked "Always" to send all reports in the future. I also had already enabled "Allow Nightly to send backlogged crash reports on your behalf" in the settings. About 5 hours later, I checked about:crashes and the crash report was still unsubmitted (at which point I manually submitted it, which worked).

Nika reproduces this on macOS as well.

OS: Linux → All
Hardware: x86_64 → All
Summary: Unsubmitted/unsent crash reports are ignored on linux → Unsubmitted/unsent crash reports are ignored
Assignee: nobody → afranchuk

I have been unable to reproduce this issue. There may be some specific settings, properties of the crash, or hidden state involved.

In my attempt to reproduce the issue, I've been using about:crashcontent to create new crashes and closing the crashed tab without submitting a crash report. After this, about:crashes always shows an unsubmitted crash. I then close the browser and re-open it. I temporarily modified the unsubmitted crash report timer to be 10 seconds instead of 10 minutes. After that goes off, the notification is shown. I tried both a normal "Submit" and "Always", both cases worked as expected with about:crashes immediately showing the crash as submitted. I also tried this again after "Always" (e.g. with "Allow Nightly to send backlogged crash reports on your behalf" set) as I mentioned above. With this set, shortly after starting up firefox again about:crashes shows the crash as being sent (and the notification did not come up).

When reading the code, however, I saw that the crash reports that are submitted are limited to the past 28 days. Unfortunately my previous comment was long enough ago that I cannot check whether that particular crash occurred prior to the 28 day limit. Though it's worth noting that I only see one crash reported in my about:crashes on that date, so if a more recent crash had triggered the notification and there was an older crash, I would have expected to see two crashes submitted on that date (one from the notification, one manually).

The fact that the notification came up when I thought I had "Allow Nightly to send backlogged crash reports on your behalf" is an indication of something very messed up, since that should immediately stop the notification from being shown as far as I can tell. But maybe I was mistaken, or the profile had been wiped.

As a final note, it's possible that something prevented the crash report from being submitted (something failed). In this case, we don't have any avenue of providing UI feedback to the user, so that would result in a crash remaining unsubmitted. Though the unsubmitted check happens every 10 minutes, and in my previous comment I mentioned that I waited hours and didn't see it submitted (nor any new notifications).

:nika, do you remember the details of the behavior you saw?

Flags: needinfo?(nika)

I sent you some screenshots and stuff on Matrix. The TL;DR is that in my about:crashes, I have many un-submitted crashes going back months. These crashes appear to submit just fine if I submit them manually, and it seems like the most recent of them was during my current browsing session (though it is a couple of days old).

As we discussed, I think we need more logging about what is going on here, so that I can actually fetch that information from my profile when it happens again.

Flags: needinfo?(nika)

FYI we don't really have a proper life-cycle for crashes, and all the code that handles them is entirely ad-hoc which is one of the reasons why this kind of issues arise from time to time. That's one area that could use some serious refactoring.

This is somewhat minor logging which needs to be enabled by setting
browser.crashReports.unsubmittedCheck.loglevel to Debug. It makes it
clear which paths are being followed.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: