Closed Bug 474688 Opened 15 years ago Closed 15 years ago

TUnit check: TestCrashReporterAPI.cpp fails on Windows, around shutdown

Categories

(Toolkit :: Crash Reporting, defect)

All
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: standard8, Assigned: sgautherie)

References

()

Details

(Keywords: crash, intermittent-failure, Whiteboard: [test is disabled on 1.9.1] )

Attachments

(1 file)

make[4]: Entering directory `/d/buildbot/win32-comm-1.9.1-check/build/objdir-tb/mozilla/toolkit/crashreporter/test'
../../../dist/bin/TestCrashReporterAPI
TEST-PASS | d:/buildbot/win32-comm-1.9.1-check/build/mozilla/toolkit/crashreporter/test/TestCrashReporterAPI.cpp | all tests passed
Tests run: 7
make[4]: Leaving directory `/d/buildbot/win32-comm-1.9.1-check/build/objdir-tb/mozilla/toolkit/crashreporter/test'
make[3]: Leaving directory `/d/buildbot/win32-comm-1.9.1-check/build/objdir-tb/mozilla/toolkit/crashreporter'
make[2]: Leaving directory `/d/buildbot/win32-comm-1.9.1-check/build/objdir-tb/mozilla/toolkit'
make[1]: Leaving directory `/d/buildbot/win32-comm-1.9.1-check/build/objdir-tb/mozilla'
make[4]: *** [check] Error 1
make[3]: *** [check] Error 2
make[2]: *** [check] Error 2
make[1]: *** [check] Error 2
make: *** [check] Error 2

Gozer says that about 50% of the times he ran locally, the test was exiting with a code of 1.
It's empirical, but I'd say it fails more than 50% of the time, maybe 75%.

Is there some magical MOZ_* env variable I might be able to set to help see what's going on here ?
Ok, time for an update:

Firstly, there is a MOZ_ENABLE_LIBXUL ifdef which afaik means Firefox builds don't run this test, which explains why they aren't seeing it.

Next, I can repeat gozer's results - for me its failing about 90% of the time on a debug build, the error is always 1.

Having done that, I commented out all the run_test calls in all_tests(). This case then passed.

So I uncommented just the first and last tests i.e.

run_test(test_init_exception_handler);
run_test(test_unset_exception_handler);

This causes the failure to occur. I'm not sure what is happening here, but something obviously is going wrong with running the test.
Ok, I've done some debugging and I'm convinced this isn't a TB specific problem (apart from the fact that this doesn't touch the TB specific code).

The only thing I can really see that could be an issue is the TerminateThread in ~ExceptionHandler, but I can't prove it.

The test code (as I suspected before) always appears to shut down correctly, but I think there is something lying around (the thread?) that changes the exit code to 1 randomly. My windows debugging skills aren't good enough to find where that is.

I did try setting the second argument (exit value) to TerminateThread to 0, however that didn't make any difference.

Therefore moving to Toolkit's Breakpad integration component and raising the importance because it is giving random test failures and looks like unclean tidy up on exit.
Assignee: bugzilla → nobody
Severity: normal → critical
Component: Build Config → Breakpad Integration
Product: Thunderbird → Toolkit
QA Contact: build-config → breakpad.integration
Since we're not actually running this on Firefox anyway, r=me to just disable this test for now until we can sort out the problem. No sense in making your tinderbox all orange because of a buggy test.
(In reply to comment #5)
> Since we're not actually running this on Firefox anyway, r=me to just disable
> this test for now until we can sort out the problem. No sense in making your
> tinderbox all orange because of a buggy test.

Disable test checked in to trunk: http://hg.mozilla.org/mozilla-central/rev/c4e2504f3901

I'll do 1.9.1 tomorrow.
(In reply to comment #6)
> Disable test checked in to trunk:
> http://hg.mozilla.org/mozilla-central/rev/c4e2504f3901
> 
> I'll do 1.9.1 tomorrow.

http://hg.mozilla.org/releases/mozilla-1.9.1/rev/9c6a7e570995
No longer blocks: 474683
Severity: critical → major
The shutdown randomness makes me wonder if bug 488596 and this one would be related...
Blocks: 438871, 488596
Whiteboard: [test is disabled] [orange]
Severity: major → critical
Summary: TestCrashReporterAPI fails on Windows TUnit tests (trunk & 1.9.1) → TUnit check: TestCrashReporterAPI.cpp fails on Windows, around shutdown
Per bug 495730 comment 13:
{
From  Ted Mielczarek (:luser)   2009-06-22 11:40:11 PDT

We should just remove the latter [= CPP] now that we have the former [= JS].
It doesn't test as much anyway.
}

Yet, do you think it would be worth to re-enable it to try and fix the crash cause first?
Attachment #384523 - Flags: review?(ted.mielczarek)
Keywords: crash
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090530 SeaMonkey/2.0b1pre] (experimental/_m-c_, home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/e44d9c0f4805
 +http://hg.mozilla.org/comm-central/rev/62f2c362a9a4 + bug 493008 patches)

Fwiw, I ran this (+/- recompiled to current tree) test
both manually from cmd.exe and with
|make -C objdir/mozilla/toolkit/crashreporter/test check| from msys
and it always succeeded:
{
TEST-PASS | .../TestCrashReporterAPI.cpp | all tests passed
Tests run: 7
}
without error (afterward).

Mark, Philippe, could you check if you can still reproduce this bug? Thanks.
(It could very well have been fixed during the last 5 months.)
Attachment #384523 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 384523 [details] [diff] [review]
(Bv1) Delete this (superseded) test
[Checkin: See comment 12]

Re-enabling it wouldn't help us fix it, since we can't get a stack from it anyway. Let's focus on the xpcshell test.

You can remove more of that Makefile. Remove all the REQUIRES and LIBS assignments, and the MOZILLA_INTERNAL_API bit.
Comment on attachment 384523 [details] [diff] [review]
(Bv1) Delete this (superseded) test
[Checkin: See comment 12]


http://hg.mozilla.org/mozilla-central/rev/fa355d118585
Bv1, with comment 11 suggestion(s).
Attachment #384523 - Attachment description: (Bv1) Delete this (superseded) test → (Bv1) Delete this (superseded) test [Checkin: Comment 12]
Assignee: nobody → sgautherie.bz
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Attachment #384523 - Attachment description: (Bv1) Delete this (superseded) test [Checkin: Comment 12] → (Bv1) Delete this (superseded) test [Checkin: See comment 12]
Ted, I'd like to (try and) re-enable the CPP test on 1.9.1, as the JS test has not landed there (yet).
Do you agree?
Whiteboard: [test is disabled] [orange] → [test is disabled on 1.9.1] [orange]
Whiteboard: [test is disabled on 1.9.1] [orange] → [test is disabled on 1.9.1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: