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)
Tracking
()
RESOLVED
FIXED
mozilla49
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 | ||
Updated•9 years ago
|
Assignee: nobody → milan
Assignee | ||
Updated•9 years ago
|
OS: Unspecified → All
Assignee | ||
Comment 1•9 years ago
|
||
As for the practical scenario - image decoding.
Comment 2•9 years ago
|
||
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)
Assignee | ||
Comment 3•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/36141/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/36141/
Comment 4•9 years ago
|
||
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.
Updated•9 years ago
|
Flags: needinfo?(aklotz)
Assignee | ||
Comment 5•9 years ago
|
||
This seems to still be an issue, with bug 1236108 fixed. Do we need this patch anyway?
Flags: needinfo?(ted)
Comment 6•9 years ago
|
||
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)
Assignee | ||
Comment 7•9 years ago
|
||
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)
Comment 8•9 years ago
|
||
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 9•9 years ago
|
||
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)
Assignee | ||
Comment 10•9 years ago
|
||
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)
Updated•9 years ago
|
Attachment #8722619 -
Flags: review?(aklotz) → review+
Comment 11•9 years ago
|
||
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"
Assignee | ||
Comment 12•9 years ago
|
||
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
Assignee | ||
Comment 13•9 years ago
|
||
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/
Assignee | ||
Comment 14•9 years ago
|
||
(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)
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•