Closed Bug 1605328 Opened 4 years ago Closed 4 years ago

[mozcrash] When encountering a hang report print the content/plugin process stack-trace before the main process one

Categories

(Testing :: Mozbase, defect, P3)

Version 3
defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: gsvelto, Assigned: KrisWright)

References

Details

Attachments

(1 file)

Whenever the hang detector finds a stuck content/plugin process it will generate a hang report that is usually made of three files:

  • <UUID>.dmp - A minidump of the affected content/plugin process
  • <UUID>-browser.dmp - A minidump of the main process when the hang was detected
  • <UUID>.extra - The crash annotations including the additional_minidumps one which should contain the string browser to indicate the presence of the latter minidump

Right now mozcrash prints the stack trace for the browser process before the content one, see this log for example:

Main process stack trace
Content process stack trace

Because of this ordering the bug name and crash signature will use the main process crash but that's useless because those are the same for every hang report. What's interesting is what's in the content process stack trace. It would be best if the two could be swapped around so new bugs would be filed with the appropriate crash signatures.

The problem is located here:

https://searchfox.org/mozilla-central/rev/b243debf6235b050b42fd2eb615fdc729636ca6b/testing/mozbase/mozcrash/mozcrash/mozcrash.py#243-246

From the file system we get the files sorted alphabetically. As such we process the browser minidump first. Here an example:

>>> a = ["uuid.dmp", "uuid-browser.dmp"]
>>> a.sort()
>>> for dmp in a:
...     print dmp
...
uuid-browser.dmp
uuid.dmp

Means we would have to tweak how we process dumps of the same uuid, and do the non-browser one(s) first.

Yeah, uuid.dmp should always be printed first. The uuid-<something>.dmp are always additional stuff that might be useful for analysis but don't capture the problem itself.

Priority: -- → P3
Blocks: 1589966

The list of crash dumps in the dump directory appears as something like ['uuid.dmp, uuid-browser.dmp']. When iterating over the list of files, the files are always sorted alphabetically, meaning any uuid-<something>.dmp goes before uuid.dmp. We only really care that uuid.dmp comes first, as the rest are just additional data not necessarily related to the crashing process, so iterating the list in reverse should put the right .dmp file first.

Assignee: nobody → kwright
Status: NEW → ASSIGNED
Pushed by kwright@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6d7ee00d4a8
Always print the crashing process dump file first r=gbrown
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: