Closed Bug 1847229 Opened 3 years ago Closed 3 years ago

[mozcrash] Check for minidump files in custom folders (eg. Windows DumpFolder) as well

Categories

(Testing :: Mozbase, enhancement, P2)

Default
enhancement

Tracking

(firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: whimboo, Assigned: gsvelto)

References

Details

Attachments

(1 external file)

With bug 1694584 fixed we will put Window Error reports from Firefox into custom folder on Taskcluster workers. Those are specifically:

  • C:\error-dumps
  • Z:\error-dumps

We should add an option to mozcrash to allow test jobs to pass these folders into mozcrash so that additional minidump files can be processed.

in mozcrash there is log_crashes which takes a dump_directory as an argument, as well as check_for_crashes which also takes a dump_directory as an argument.

typically in CI we use log_crashes, for example reftest uses os.path.join(profile.profile, "minidumps") and mozrunner also uses log_crashes and will default to the dump directory of dump_directory = os.path.join(self.profile.profile, "minidumps").

So the question here is where do we add this in? Right now any api could call log_crashes or check_for_crashes multiple times with different arguments. Is there a desire to detect the OS and add the c:\error-dumps and z:\error-dumps automatically?

Lastly, I notice that we always check in a minidumps subdir, is it safe to assume when c:\error-dumps has data it is really in c:\error-dumps\minidumps ?

Severity: -- → S3
Priority: -- → P2

(In reply to Joel Maher ( :jmaher ) (UTC -8) from comment #1)

in mozcrash there is log_crashes which takes a dump_directory as an argument, as well as check_for_crashes which also takes a dump_directory as an argument.

Ah that's even better when the folder to check gets feeded in. So we indeed do not have to do anything for mozcrash then.

So the question here is where do we add this in? Right now any api could call log_crashes or check_for_crashes multiple times with different arguments. Is there a desire to detect the OS and add the c:\error-dumps and z:\error-dumps automatically?

Given that those folders will only exist in CI jobs on Windows maybe we have to update several mozharness scripts to pass it into the test jobs?

Lastly, I notice that we always check in a minidumps subdir, is it safe to assume when c:\error-dumps has data it is really in c:\error-dumps\minidumps ?

I don't know so lets ask Gabriele for some feedback.

Flags: needinfo?(gsvelto)

Calling either mozcrash.check_for_crashes() or mozcrash.log_crashes() on C:\error-dumps and Z:\error-dumps should do the trick. However given that the directories we'll check on have hard-coded paths and are only available on Windows we could just tweak the CrashInfo class to look them up. We could add some code here like:

if mozinfo.isWin:
    self._dump_files += [
        (path, None)
        for path in reversed(
            sorted(glob.glob(os.path.join("C:\error-dumps", "*.dmp")))
        )
    ]

Note that we don't need to check for the minidumps directory, only the tests that work with a profile do that, because that's where crashes end up when a Gecko profile is set. I'll cook up a patch later today.

Flags: needinfo?(gsvelto)
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED

(In reply to Gabriele Svelto [:gsvelto] from comment #3)

Calling either mozcrash.check_for_crashes() or mozcrash.log_crashes() on C:\error-dumps and Z:\error-dumps should do the trick. However given that the directories we'll check on have hard-coded paths and are only available on Windows we could just tweak the CrashInfo class to look them up.

Shall we add something to the documentation that users running tests locally know how to setup this as well? I think that would be beneficial.

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #4)

Shall we add something to the documentation that users running tests locally know how to setup this as well? I think that would be beneficial.

Sure, we could open a bug for that.

Pushed by gsvelto@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1786c51d9271 [mozcrash] Look for minidumps recorded by Windows Error Reporting r=gbrown
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
See Also: → 2096461
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: