Closed Bug 907993 Opened 8 years ago Closed 5 years ago
Annotate crash reports if the slow-script dialog has been shown
We had a theory that some crashes are much more likely to happen during/after the slow-script dialog. We'd like to annotate crash reports when that dialog is first shown using a key.
Whiteboard: [email@example.com] → [firstname.lastname@example.org][lang=c++]
What would we want to add here? A boolean if we've ever seen a slow script dialog? A timestamp of when the slow script dialog was last shown?
For now I just want a boolean.
hey Benjamin, I am interested in solving this bug. Please guide me.
Sanchit, crash report annotations are added via this interface: http://mxr.mozilla.org/mozilla-central/source/xpcom/system/nsICrashReporter.idl#64http://mxr.mozilla.org/mozilla-central/source/xpcom/system/nsICrashReporter.idl#64 The slow script dialog is shown starting here: http://hg.mozilla.org/mozilla-central/annotate/4887845b1142/dom/base/nsGlobalWindow.cpp#l9320 And you can probably add the annotation at or near the top of the function. As a bonus, it may be interesting to annotate also whether the user killed the script from the dialog. I don't know if there are any tests for the slow-script dialog which you can copy to test this annotation; bholley do you know?
Assignee: nobody → garg.sanchitiitb
(In reply to Benjamin Smedberg [:bsmedberg] workweek high latency 19-Aug through 23-Aug from comment #4) > Sanchit, crash report annotations are added via this interface: > http://mxr.mozilla.org/mozilla-central/source/xpcom/system/nsICrashReporter. > idl#64http://mxr.mozilla.org/mozilla-central/source/xpcom/system/ > nsICrashReporter.idl#64 > > The slow script dialog is shown starting here: > http://hg.mozilla.org/mozilla-central/annotate/4887845b1142/dom/base/ > nsGlobalWindow.cpp#l9320 > > And you can probably add the annotation at or near the top of the function. > > As a bonus, it may be interesting to annotate also whether the user killed > the script from the dialog. > > I don't know if there are any tests for the slow-script dialog which you can > copy to test this annotation; bholley do you know? I recently wrote tests for the watchdog thread, but not the slow-script dialog itself. Having some would probably be very worthwhile - it'd involve hooking up a mock prompt service, dropping the max script runtime pref, and then causing script to infinite loop.
Hey Benjamin, when can I catch you on irc? :)
I'm "bsmedberg", US Eastern Time (UTC-4).
We have this test file which annotates the slow script but we do not know how to test the annotation is present.
Attachment #8376705 - Flags: feedback?(benjamin)
Testing this is hard because we don't expose the annotations in-process so you'd actually have to crash the process to check them. But an automated test may not be worthwhile in this case.
Comment on attachment 8376705 [details] [diff] [review] Patch to annotate slow script Skip the test and fix the indentation in the #ifdef MOZ_CRASHREPORTER case. Then set r?bholley on the new patch. Thank you!
Attachment #8376705 - Flags: feedback?(benjamin) → feedback+
Whiteboard: [email@example.com][lang=c++] → [lang=c++]
Hello, Is the bug still available to fix? Thanks
Is it still worthwhile for someone to address comment 10?
Hrm, things have changed somewhat with e10s. In e10s mode, we no longer spin a nested event loop for the slow-script dialog, so the crashiness is less interesting or serious in that case. So no, this is probably no longer worth fixing.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.