Closed Bug 465490 Opened 16 years ago Closed 15 years ago

Intermittent time out after test_0051_general.js: test_0110_general.js hangs randomly

Categories

(Toolkit :: Application Update, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: roc, Assigned: robert.strong.bugs)

References

()

Details

(Keywords: fixed1.9.1, intermittent-failure)

Attachments

(2 files, 4 obsolete files)

{
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1229823522.1229828011.5217.gz
MacOSX Darwin 9.2.2 mozilla-central moz2-darwin8-slave01 dep unit test on 2008/12/20 17:38:42

TEST-PASS | ../../../../_tests/xpcshell-simple/test_update/unit/test_0051_general.js | all tests passed
command timed out: 300 seconds without output, killing pid 36438
}
Blocks: 438871
Flags: wanted1.9.1?
Summary: test_0110_general.js hung randomly → Intermittent time out after test_0051_general.js: test_0110_general.js hangs randomly
Version: unspecified → Trunk
No idea why this would be happening about once a month on only one Mac OS X systems... any insights from anyone as to why?
(In reply to comment #0)
> http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1226993816.1226998643.13195.gz#err0

MacOSX Darwin 9.2.2 moz2-darwin8-slave02 dep unit test on 2008/11/17 23:36:56


(In reply to comment #2)
> No idea why this would be happening about once a month on only one Mac OS X

What ? It certainly happens (much) more often than that !

Trunk:
{
...

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1229496465.1229500933.10651.gz
MacOSX Darwin 9.2.2 mozilla-central moz2-darwin8-slave01 dep unit test on 2008/12/16 22:47:45

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1229506509.1229512041.8331.gz
MacOSX Darwin 9.2.2 mozilla-central moz2-darwin8-slave01 dep unit test on 2008/12/17 01:35:09

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1229737744.1229743825.20293.gz
MacOSX Darwin 9.2.2 mozilla-central moz2-darwin8-slave01 dep unit test on 2008/12/19 17:49:04
}

1.9.1 Branch
{
...

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1229632834.1229637645.11362.gz
MacOSX 10.5.2 mozilla-1.9.1 moz2-darwin9-slave05 dep unit test on 2008/12/18 12:40:34

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1229654434.1229659226.31228.gz
MacOSX 10.5.2 mozilla-1.9.1 moz2-darwin9-slave05 dep unit test on 2008/12/18 18:40:34

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1229665234.1229670216.27288.gz
MacOSX 10.5.2 mozilla-1.9.1 moz2-darwin9-slave05 dep unit test on 2008/12/18 21:40:34

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1229691982.1229696798.14879.gz
MacOSX 10.5.2 mozilla-1.9.1 moz2-darwin9-slave05 dep unit test on 2008/12/19 05:06:22

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1229719234.1229724080.2091.gz
MacOSX 10.5.2 mozilla-1.9.1 moz2-darwin9-slave05 dep unit test on 2008/12/19 12:40:34

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.1/1229827234.1229831999.12598.gz
MacOSX 10.5.2 mozilla-1.9.1 moz2-darwin9-slave05 dep unit test on 2008/12/20 18:40:34
}

> systems... any insights from anyone as to why?

Now, why "only" (as it would seem) these 2(-3) MacOSX slaves.?. I don't know.
I thought your comment #1 was to say it had just happened again and I hadn't seen the other occurrences though I look at the logs often... thanks for the heads up!
So, the updater code for Mac OS X sleeps for 5 seconds iirc. It may be possible to fix this by making this two tests instead of one.
Attached patch possible patch rev1 (obsolete) — Splinter Review
Hey Dave, I think the problem with this test on Mac OS X may be due to calling the updater binary twice in the same test and perhaps the following
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/src/updater/progressui_osx.mm#126
Assignee: nobody → robert.bugzilla
Attachment #355348 - Flags: review?(dtownsend)
(In reply to comment #6)
> Created an attachment (id=355348) [details]
> possible patch rev1
> 
> Hey Dave, I think the problem with this test on Mac OS X may be due to calling
> the updater binary twice in the same test and perhaps the following
> http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/src/updater/progressui_osx.mm#126

I'm not sure I see how splitting out the latter part of the test into its own unit test file will help, or have I missed something?
(In reply to comment #7)
> (In reply to comment #6)
> > Created an attachment (id=355348) [details] [details]
> > possible patch rev1
> > 
> > Hey Dave, I think the problem with this test on Mac OS X may be due to calling
> > the updater binary twice in the same test and perhaps the following
> > http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/src/updater/progressui_osx.mm#126
> 
> I'm not sure I see how splitting out the latter part of the test into its own
> unit test file will help, or have I missed something?
The systems where the test fails are all Mac OS X and the only significant difference I know of is the usleep(500000) call. I'm not by any means positive this will fix it but I do suspect that it is caused at least in part by the usleep(500000) call. Perhaps also sleeping for 5 seconds in the script might help as well... I'll take another look later.
Comment on attachment 355348 [details] [diff] [review]
possible patch rev1

If splitting it out helps then it's ok by me
Attachment #355348 - Flags: review?(dtownsend) → review+
Whiteboard: [orange]
Attached patch test cleanup (obsolete) — Splinter Review
I'm going to hold off on trying out the first patch for now and instead cleanup the test so it only tests the updater binary application of a mar file.
Comment on attachment 371581 [details] [diff] [review]
test cleanup

btw: some cruft from test_0010_general.js snuck in here
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1239139996.1239144966.4444.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/04/07 14:33:16

Passed with 'check' then timed out with new 'xpcshell-tests' ;->
Attachment #355348 - Attachment is obsolete: true
Attachment #371581 - Attachment is obsolete: true
I'll land this on mozilla-central after the tree is greener
Attachment #371635 - Attachment is obsolete: true
Attachment #371945 - Attachment description: patch - separation of tests, cleanup, and additional logging (checked in to mozilla-1.9.1) → patch - separation of tests, cleanup, and additional logging (checked in)
Comment on attachment 371945 [details] [diff] [review]
patch - separation of tests, cleanup, and additional logging (checked in)

Also pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/9213aa676ae6

If anyone sees another one of these failures please comment in the bug so I can take a look at the logs. Thanks
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1239650285.1239655356.662.gz&fulltext=1#err0

Testing: successful removal of the directory used to apply the mar file
Testing: cleanup of the updates directory used to test
Testing: updater binary process exitValue for success when applying a complete mar
Testing: contents of files added by a complete mar
Unable to remove directory
path: /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/test_update/unit/app_dir/updates/0
Exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsILocalFile.remove]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/test_update/unit/test_0110_general.js :: run_test :: line 113"  data: no]
Testing: successful removal of the updates subdirectory where the updater binary was launched
Looks like the additional logging tracked down where this was failing... I'll have a patch shortly. Thanks sdwilsh!
I believe this should fix this bug once and for all.
Attachment #372008 - Attachment is obsolete: true
(In reply to comment #18)

This looks like bug 473385, no?
Could very well be. The patch as it stands should be sufficient to prevent this bug from happening in the future.
Depends on: 473385
btw: for this bug the failure could very well be due to the binary being launched prior to the directory being removed especially since the only failures have been with this test and the latest failure also points to this being the cause. So, I'm not convinced this has anything to do with bug 473385.
Comment on attachment 372472 [details] [diff] [review]
patch (checked in)

Pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/79c0e45ad285

Pushed to mozilla-1.9.1
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/8bc65d6e998e
Attachment #372472 - Attachment description: patch → patch (checked in)
If anyone sees another one of these failures please reopen this bug so I can
investigate further. Thanks
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: wanted1.9.1?
Keywords: fixed1.9.1
Resolution: --- → FIXED
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.2a1
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: