Open Bug 1077795 Opened 10 years ago Updated 2 years ago

[AsyncShutdown] Maintain up-to-date information on the blockers for which we are waiting

Categories

(Toolkit :: Async Tooling, defect)

defect

Tracking

()

People

(Reporter: Yoric, Unassigned)

References

Details

Attachments

(3 files, 1 obsolete file)

In some cases, we crash during shutdown (possibly through the Terminator). It would be very useful to know, as part of the crash report, which of the AsyncShutdown blockers are active at the moment of the crash.
Assignee: nobody → dteller
Aklotz suggests that calling `annotateCrashReport` directly is not a good idea as this requires re-serializing every single crash annotation after every single call. Since we might need to update our annotations a few hundred times during shutdown, this might be too much.

Apparently, there is a mechanism to extend the crash reporter that would be more appropriate.

Ted, Aklotz, can you confirm?
Flags: needinfo?(ted)
Flags: needinfo?(aklotz)
We generally go with one-off APIs to handle perf-sensitive annotations, like SetGarbageCollecting or SetEventloopNestingLevel:
http://hg.mozilla.org/mozilla-central/annotate/50b689feab5f/toolkit/crashreporter/nsExceptionHandler.cpp#l1803

Note that you also have to add code to write out your custom annotation:
http://hg.mozilla.org/mozilla-central/annotate/50b689feab5f/toolkit/crashreporter/nsExceptionHandler.cpp#l750
Flags: needinfo?(ted)
Since the data is collected from JS, is it acceptable to expose a new such API through nsICrashReporter?

Also, should we do this for v1 or should we start by calling the usual `annotateCrashReports`, see if it causes regressions, and then set out to add a custom annotator?
You are certainly welcome to do whatever you think needs doing. I'm not opposed to either option.
Attaching a first version without any specific optimization.
Attachment #8503138 - Flags: review?(nfroyd)
Comment on attachment 8503138 [details] [diff] [review]
Maintain up-to-date information on active blockers

Review of attachment 8503138 [details] [diff] [review]:
-----------------------------------------------------------------

WFM, going to profile to see if you need to improve this any?
Attachment #8503138 - Flags: review?(nfroyd) → review+
That's the idea. I'm not sure exactly how, though.
So, what about the following strategy?
1. finally, find a way to land bug 1044020;
2. wait a little for that bug to produce telemetry;
3. land this bug, and see how this impacts telemetry.
Depends on: 1044020
Flags: needinfo?(nfroyd)
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #9)
> So, what about the following strategy?
> 1. finally, find a way to land bug 1044020;
> 2. wait a little for that bug to produce telemetry;
> 3. land this bug, and see how this impacts telemetry.

Sure.
Flags: needinfo?(nfroyd)
Attached file MozReview Request: bz://1077795/Yoric (obsolete) (deleted) —
/r/4089 - Bug 1077795 - Maintain up-to-date information on active AsyncShutdown blockers;r=froydnj
/r/4091 - Bug 1110681 - Instrumenting nsSearchService;r=florian

Pull down these commits:

hg pull review -r 82a0acb6c3c52533f28cf8aa26138614cd7db743
Attachment #8594316 - Attachment is obsolete: true
Not working on it atm, feel free to steal.
Assignee: dteller → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: