Open Bug 1751957 Opened 3 years ago Updated 3 years ago

Mochitest harness seems to allow a crash and not report it

Categories

(Testing :: Mochitest, defect)

Default
defect

Tracking

(Not tracked)

People

(Reporter: mgaudet, Unassigned)

Details

Just ran a mochitest that was crashing, to see if my fix was sufficient, then had to task switch to a meeting.

I came back to see:

 1:07.36 INFO runtests.py | Running tests: end.
 1:07.37 INFO Buffered messages finished
0 INFO TEST-START | Shutdown
1 INFO Passed:  0
2 INFO Failed:  0
3 INFO Todo:    0
4 INFO Mode:    e10s
5 INFO SimpleTest FINISHED
 1:07.37 INFO Buffered messages finished
 1:07.37 SUITE_END
 1:07.37 
Overall Summary
===============

mochitest-plain
~~~~~~~~~~~~~~~
Ran 3079 checks (3078 subtests, 1 tests)
Expected results: 3078
Unexpected results: 0
OK

Which sure looks like an OK result. yet, if I scroll up a bit in my terminal, I see in fact no, the test crashed:

0:50.66 PASS Message received!
 0:50.67 INFO test_global: same-compartment
 0:50.68 GECKO(560264) Assertion failure: !mMightHaveUnreportedJSException, at /home/matthew/unified/obj-debug-browser-x86_64-pc-linux-gnu/dist/include/mozilla/ErrorResult.h:583
Initializing stack-fixing for the first stack frame, this may take a while...
 1:06.77 GECKO(560264) #01: mozilla::binding_danger::TErrorResult<mozilla::binding_danger::AssertAndSuppressCleanupPolicy>::AssertReportedOrSuppressed() [/home/matthew/unified/obj-debug-browser-x86_64-pc-linux-gnu/dist/include/mozilla/ErrorResult.h:583]

It seems like the harness should tell me about this crash?

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(ahal)

Hey Matthew, do you know the command that was run that caused this? Was there a particular revision needed to trigger the crash? STR will be helpful to fix this.

Severity: -- → S3
Flags: needinfo?(ahal) → needinfo?(mgaudet)

Yeah, sorry: an STR would have been helpful, and easy enough to provide. Apologies.

STR:

  1. Checkout 5bc1f3a51d40
  2. Apply the following patch:
diff --git a/dom/fetch/FetchStreamReader.cpp b/dom/fetch/FetchStreamReader.cpp
--- a/dom/fetch/FetchStreamReader.cpp
+++ b/dom/fetch/FetchStreamReader.cpp
@@ -292,10 +292,6 @@ FetchStreamReader::OnOutputStreamReady(n
   ReadableStreamDefaultReaderRead(aes.cx(), MOZ_KnownLive(mReader), readRequest,
                                   rv);
 
-  // We report the (potential) JS Exception via the AutoEntryScript above, as
-  // was done in the JS Streams implementation as well.
-  rv.WouldReportJSException();
-
   if (NS_WARN_IF(rv.Failed())) {
     // Let's close the stream.
     CloseAndRelease(aes.cx(), NS_ERROR_DOM_INVALID_STATE_ERR);

Then do a Debug Build.

Then run ./mach mochitest --headless dom/tests/mochitest/fetch/test_readableStreams.html

The test case crashes, and you get the expected bizarre output:

 1:02.38 INFO Buffered messages finished
0 INFO TEST-START | Shutdown
1 INFO Passed:  0
2 INFO Failed:  0
3 INFO Todo:    0
4 INFO Mode:    e10s
5 INFO SimpleTest FINISHED
 1:02.38 INFO Buffered messages finished
 1:02.38 SUITE_END
 1:02.38 
Flags: needinfo?(mgaudet)
You need to log in before you can comment on or make changes to this bug.