Open Bug 1605100 Opened 6 years ago Updated 3 years ago

BrowserTestUtils.crashFrame() and SpecialPowers both try to remove crash reports after a test has finished

Categories

(Testing :: Mochitest, defect, P3)

Version 3
defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: gsvelto, Assigned: gsvelto)

References

Details

While working on bug 1544147 I noticed a race in the test harness: if a frame is crashed with BrowserTestUtils.crashFrame() we register an ipc:content-shutdown handler to remove the resulting crash report files. However SpecialPowers is already doing that so the two handlers will race.

The race is harmless most of the time but I suspect that it might be behind some obscure intermittent failures we've been experiencing.

Priority: -- → P2

Sorry, edited the wrong bug.

Priority: P2 → --

I've got a working WIP for this. As a side note the code in BrowserTestUtils.crashFrame() always waits for the crash to be recorded and parses the resulting .extra file to return the annotations to the caller. AFAIK there is only one test using this functionality which makes it sound like it's overkill, I'll file a bug to simplify it and make it optional.

Assignee: nobody → gsvelto
Status: NEW → ASSIGNED

It seems like only dom/ipc/tests/test_process_error.xhtml is using both BrowserTestUtils and SpecialPowers at the same time, all the other browser mochitests aren't so this problem is smaller than I thought. Still I find it odd that we have two separate mechanisms to cleanup crashes depending if the test is a plain or a browser mochitest.

The priority flag is not set for this bug.
:ahal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)
Flags: needinfo?(ahal)
Priority: -- → P3
Blocks: 1544147
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.