Annotate crash reports with Remote Protocol if minidump was generated with the Remote Agent active
Categories
(Remote Protocol :: Agent, task, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Depends on 1 open bug)
Details
Follow-up from bug 1875773.
(In reply to Gabriele Svelto [:gsvelto] from bug 1875773 comment #8)
I think that's a very good idea. We already have something similar for how the crash was submitted (see the SubmittedFrom crash annotation). You can either add to that if automation submits the crash reports on its own or add a new annotation specifically to say that it was generated in automation (but submitted using one of the existing mechanisms).
With geckodriver we do not allow automatic crash report submission. That is to prevent crash-stats from receiving too many automation related crash reports which as well are not annotated right now and would be hard to identify. By adding the annotation it would indeed become easier.
Gabriele, could you maybe give some details where the annotation needs to be done? I checked some of the crash reporter code but wasn't able to find it. Thanks!
Comment 1•8 months ago
|
||
First you need to add it to CrashAnnotations.yaml and request a data review for it. Then you need to add it to the JSON in the .extra file before submitting it to Socorro. How is automation submitting crashes? Is it using Firefox itself or are the automation scripts sending the crash report directly to Socorro?
Reporter | ||
Updated•7 months ago
|
Reporter | ||
Comment 2•7 months ago
|
||
(In reply to Gabriele Svelto [:gsvelto] from comment #1)
Then you need to add it to the JSON in the .extra file before submitting it to Socorro.
Where is this code for the .extra file located? I assume it should be pretty straight forward once the data review has been approved.
How is automation submitting crashes? Is it using Firefox itself or are the automation scripts sending the crash report directly to Socorro?
Our automation will not send reports automatically. We only allow to enable the crash reporter for diagnostics and manual submission of reports if the minidump file cannot be retrieved. So the frequency of reports will be very low.
Comment 3•7 months ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+1][away 02/20 - 02/26] from comment #2)
Where is this code for the .extra file located? I assume it should be pretty straight forward once the data review has been approved.
The .extra file is emitted together with the minidump (.dmp) when we generate a crash report, it contains all the annotations in the crashed process and in the main process (if the crashed process was a child). So if this annotation is added at any time during Firefox' run it will be included. You could add a parameter that causes Firefox to call CrashReporter::AnnotateCrashReport()
with the new annotation on startup; this would put it in all crashes. Note this can also be called from JavaScript.
The code that writes the file itself is here for child process crashes and here for parent ones, but I don't recommend modifying it. Better stick with the public interface.
Reporter | ||
Comment 4•7 months ago
|
||
Thanks! nsICrashReporter.annotateCrashReport()
seems to be indeed the right choice here. It actually looks like that it can also be set via Services.appinfo
as string values:
Services.appinfo.annotateCrashReport("%key", "%value");
We may have our own annotateCrashReport
function and return early if Services.appinfo.crashReporterEnabled
is false.
Reporter | ||
Comment 5•7 months ago
|
||
I'ld like to wait for bug 1882338 done first so it can be properly tested.
Description
•