Closed Bug 1250637 Opened 9 years ago Closed 9 years ago

Allow crash report annotation when in a child process and off main thread

Categories

(Toolkit :: Crash Reporting, defect)

Unspecified
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox47 --- affected
firefox49 --- fixed

People

(Reporter: milan, Assigned: milan)

References

Details

Attachments

(1 file)

We have a current limitation in CrashReporter::AnnotateCrashReport and CrashReporter::AppendAppNotesToCrashReport where we don't handle the child process annotation outside the main thread.
Assignee: nobody → milan
OS: Unspecified → All
As for the practical scenario - image decoding.
Also related and may be fixed by the work aklotz is doing in bug 1236108. Aaron, can you comment?
Depends on: 1236108
Flags: needinfo?(aklotz)
Initially, bug 1236108 is focusing on just-in-time annotations vs ahead-of-time annotations. By "just-in-time annotations" I am referring to annotations that are made at the time of the crash, like the size of the OOM-ing malloc or the flag that indicates whether or not we were currently in a GC. Its WIP implementation involves sending that data over the same pipe as the rest of the crash report, meaning that we don't need to punch any additional holes in the sandbox or do any additional IPC turnarounds. In the short term, once bug 1236108 is in place, you could probably just set up your annotations as just-in-time annotations. In the longer term, I think we'd probably want to unify the ahead-of-time and just-in-time annotations mechanism.
Flags: needinfo?(aklotz)
Depends on: 1257486
See Also: → 1259255
This seems to still be an issue, with bug 1236108 fixed. Do we need this patch anyway?
Flags: needinfo?(ted)
I think so. Sorry, Mozreview doesn't seem to have set the review flag in bugzilla, which is what I actually use to triage my review queue!
Flags: needinfo?(ted)
Comment on attachment 8722619 [details] MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz Didn't notice the review flag wasn't automatically set.
Attachment #8722619 - Flags: review?(ted)
FYI, I'm intending to review this patch but I have to block off some time to read and understand it because threading is always hard. I will find some time tomorrow or Thursday to review it.
Comment on attachment 8722619 [details] MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz I'm sorry, I haven't quite found time for this, and I'm leaving for a week of vacation. I think aklotz might be a good reviewer for this code.
Attachment #8722619 - Flags: review?(ted)
Comment on attachment 8722619 [details] MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz Sounds like a plan.
Attachment #8722619 - Flags: review?(aklotz)
Attachment #8722619 - Flags: review?(aklotz) → review+
Comment on attachment 8722619 [details] MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz https://reviewboard.mozilla.org/r/36141/#review47651 ::: toolkit/crashreporter/nsExceptionHandler.cpp:1859 (Diff revision 1) > gDelayedAnnotations = new nsTArray<nsAutoPtr<DelayedNote> >(); > } > gDelayedAnnotations->AppendElement(aNote); > } > > +class CrashReporterHelperRunnable : public nsCancelableRunnable { s/nsCancelableRunnable/nsRunnable/ ::: toolkit/crashreporter/nsExceptionHandler.cpp:1876 (Diff revision 1) > + {} > + > + NS_METHOD Run() override; > + > +private: > + nsAutoCString mKey; s/nsAutoCString/nsCString/ for these member variables, please. ::: toolkit/crashreporter/nsExceptionHandler.cpp:2001 (Diff revision 1) > return AnnotateCrashReport(NS_LITERAL_CSTRING("Notes"), *notesField); > } > > +nsresult CrashReporterHelperRunnable::Run() > +{ > + // We expect this to be in the child process' main thread. If it isn't Nit: please add a comma after "isn't"
Comment on attachment 8722619 [details] MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36141/diff/1-2/
Attachment #8722619 - Attachment description: MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r?ted.mielczarek → MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz
Comment on attachment 8722619 [details] MozReview Request: Bug 1250637: Allow child process crash annotation off main thread. r=aklotz Review request updated; see interdiff: https://reviewboard.mozilla.org/r/36141/diff/2-3/
(In reply to Aaron Klotz [:aklotz] from comment #11) > ... > > > > +class CrashReporterHelperRunnable : public nsCancelableRunnable { > > s/nsCancelableRunnable/nsRunnable/ Aaron, change to nsRunnable or Runnable?
Flags: needinfo?(aklotz)
mozilla::Runnable due to khuey's latest changes.
Flags: needinfo?(aklotz)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: