Closed Bug 1322097 Opened 9 years ago Closed 9 months ago

Unsubmitted/unsent crash reports are ignored

Categories

(Toolkit :: Crash Reporting, defect, P2)

53 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: euthanasia_waltz, Assigned: afranchuk)

References

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.

See Also: → 1873956
Keywords: leave-open
Pushed by afranchuk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/35984f4a47e3 Add logging to the unsubmitted crash handler r=gsvelto

Let's try to figure out whether we can get this configurable in about:logging too.

(In reply to Alex Franchuk [:afranchuk] from comment #10)

Let's try to figure out whether we can get this configurable in about:logging too.

Looking at the code, I don't think about:logging can interact with this, as it adjusts logging.<module> and logging.config.LOG_FILE. The former definitely doesn't interact with console.createInstance (without us setting the pref to match), and I don't think the latter does either (though that I'm less confident on). I tried setting the logging pref previously discussed here and simply enabling logging to a file, but nothing was ever written (where something should be written every 10 minutes as the unsubmitted crash report check occurs).

The leave-open keyword is there and there is no activity for 6 months.
:afranchuk, maybe it's time to close this bug?
For more information, please visit BugBot documentation.

Flags: needinfo?(afranchuk)

This should be kept open as the existing patch is only to add logging. We should try to follow up soon to get feedback from the logging.

Flags: needinfo?(afranchuk)
See Also: → 1956290
See Also: → 1956341
See Also: → 1976485

I'm closing this bug on the basis of the original title and STR being no longer applicable (unsent crash reports do trigger the notification and show up in about:crashes). More recently, this bug has been a vague placeholder for (somewhat silent) failures to submit crash reports. I've created bug 1976485 to continue the work on that in a more directed manner.

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: