Open
Bug 1290357
Opened 9 years ago
Updated 3 years ago
[mozcrash] Add logging for uptime of the application
Categories
(Testing :: Mozbase, defect, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: whimboo, Unassigned)
Details
It would be great to know how long the application was already running since a crash happened. With that information we could determine if it is a startup crash (application run time <60s).
Ted, would that be possible? I hope so.
Flags: needinfo?(ted)
Comment 1•9 years ago
|
||
Yes, we already record that information in the .extra file. I don't think mozcrash currently parses the .extra file, but it's not a very complicated format. If you look at one you'll find:
CrashTime=1431997333
StartupTime=1431945302
Those are both timestamps, so you can calculate (CrashTime - StartupTime) to get uptime in seconds.
Flags: needinfo?(ted)
Comment 2•9 years ago
|
||
The code that parses .extra files for when you submit crashes via about:crashes is here, FYI:
https://dxr.mozilla.org/mozilla-central/rev/fe895421dfbe1f1f8f1fc6a39bb20774423a6d74/toolkit/crashreporter/KeyValueParser.jsm#16
| Reporter | ||
Comment 3•9 years ago
|
||
Strange when I run the latest code locally via:
> $ python mozcrash/mozcrash.py /mozilla/code/gecko/ None
The output I see is the following:
> Crash reason: SIGSEGV
> Crash address: 0x0
> Process uptime: not available
So we already have the process uptime as part of the output from minidump_stackwalk. Not sure why I do not see that on Treeherder for crashes. Maybe we had this feature at one point but removed it? The version I have is a bit old:
> -rwxr-xr-x 1 henrik henrik 1729752 Mar 7 15:33 /mozilla/bin/minidump_stackwalk
If that is not what you have in mind please let me know. But adding content via mozcrash to the process crash output from minidump especially at specific lines doesn't seem to be that easy.
Flags: needinfo?(ted)
Comment 4•9 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #3)
> Strange when I run the latest code locally via:
>
> > $ python mozcrash/mozcrash.py /mozilla/code/gecko/ None
>
> The output I see is the following:
>
> > Crash reason: SIGSEGV
> > Crash address: 0x0
> > Process uptime: not available
>
> So we already have the process uptime as part of the output from
> minidump_stackwalk. Not sure why I do not see that on Treeherder for
> crashes. Maybe we had this feature at one point but removed it? The version
> I have is a bit old:
That output was added in upstream Breakpad in 2014:
https://chromium.googlesource.com/breakpad/breakpad/+/63919583ba0d302a2ceb437ecf41a7975f44f54b%5E%21/#F7
It only shows up if certain information is present in the minidump though, and it's possible that Breakpad doesn't write that information on all platforms.
Note that as of recently we also have a "StartupCrash" annotation in the .extra file: bug 1295934.
Flags: needinfo?(ted)
| Reporter | ||
Comment 5•9 years ago
|
||
So what would you prefer then? Should we add those extra lines to the stackwalk_output array right before the output from minidump_stackwalk? If we do it afterward it won't be that recognizable. Or should we inject those lines as mentioned above right behind the block starting with "Crash reason".
| Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(ted)
Comment 6•9 years ago
|
||
Printing it before the minidump_stackwalk output seems fine. I wouldn't try to inject it into the middle of the stackwalk output, that's confusing.
Flags: needinfo?(ted)
Updated•7 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•