Last Comment Bug 488597 - Random Test Failure (test_punycodeURIs.js) - Nothing to do with trunk 64 bit builds
: Random Test Failure (test_punycodeURIs.js) - Nothing to do with trunk 64 bit ...
Status: RESOLVED FIXED
: fixed1.9.1, intermittent-failure
Product: Core Graveyard
Classification: Graveyard
Component: File Handling (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla1.9.1
Assigned To: Mark Banner (:standard8)
:
:
Mentors:
http://mxr.mozilla.org/comm-central/s...
Depends on: 378991 598794
Blocks: 438871
  Show dependency treegraph
 
Reported: 2009-04-15 16:25 PDT by Shawn Wilsher :sdwilsh
Modified: 2016-06-22 12:16 PDT (History)
6 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
The fix (1.26 KB, patch)
2009-05-18 06:09 PDT, Mark Banner (:standard8)
sdwilsh: review+
Details | Diff | Splinter Review

Description User image Shawn Wilsher :sdwilsh 2009-04-15 16:25:21 PDT
TEST-UNEXPECTED-FAIL | e:\builds\moz2_slave\mozilla-1.9.1-win32-unittest\build\objdir\_tests\xpcshell\test_uriloader_exthandler\unit\test_punycodeURIs.js | test failed, see following log:
TEST-UNEXPECTED-FAIL | e:\builds\moz2_slave\mozilla-1.9.1-win32-unittest\build\objdir\_tests\xpcshell\test_uriloader_exthandler\unit\test_punycodeURIs.js | Expected File e:\builds\moz2_slave\mozilla-1.9.1-win32-unittest\build\objdir\_tests\xpcshell\test_uriloader_exthandler\unit\result.txt does not exist

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1239827982.1239835683.817.gz&fulltext=1
WINNT 5.2 mozilla-1.9.1 unit test on 2009/04/15 13:39:42
Comment 1 User image Mark Banner (:standard8) 2009-04-16 02:12:21 PDT
Hmm, I've seen this occasionally on the TB boxes (and not got round to filing it :-( ), there's a one-second timeout where it waits just after calling launchWithURI (which launches a very small exe based on WriteArgument.cpp), I wonder if that's enough of a delay or if something really is going wrong.
Comment 2 User image Shawn Wilsher :sdwilsh 2009-04-16 08:33:27 PDT
Is there any way you can determine when the exe is done doing whatever you wanted it to do?  Timeouts are unpredictable because the unit test slaves are really really slow sometimes.
Comment 3 User image Mark Banner (:standard8) 2009-05-18 03:23:33 PDT
(In reply to comment #2)
> Is there any way you can determine when the exe is done doing whatever you
> wanted it to do?

I don't think so, unless we can do reliable process detection cross platform. I'm currently thinking we should just adjust the timeout methods, I'll come up with a patch in a while.
Comment 4 User image Mark Banner (:standard8) 2009-05-18 06:09:03 PDT
Created attachment 378046 [details] [diff] [review]
The fix

This patch changes the test so that if the file doesn't exist, it retries up to 30 times/seconds. This should reduce the possible cases where we fail, and if we pass we'll only wait as long as we need to rather than the full 30 seconds.

I don't see any other way to do this without timeouts.
Comment 5 User image Shawn Wilsher :sdwilsh 2009-05-18 07:57:29 PDT
Comment on attachment 378046 [details] [diff] [review]
The fix

Hrm, yeah.  This is probably the best option we have available to us for now.  sadface.

This technically needs sr, but I'm not sure anybody will care.
Comment 6 User image Mark Banner (:standard8) 2009-05-19 03:00:42 PDT
Checked in: http://hg.mozilla.org/mozilla-central/rev/d1abfc97c140

I'll push to 1.9.1 later assuming it sticks.
Comment 7 User image Mark Banner (:standard8) 2009-05-20 06:18:21 PDT
Checked in to 1.9.1 (test-only fix): http://hg.mozilla.org/releases/mozilla-1.9.1/rev/edee09521af4
Comment 8 User image Steffen Wilberg 2009-05-20 06:25:38 PDT
Comment on attachment 378046 [details] [diff] [review]
The fix

>+// Try several times in case the box we're running on is slow.
>+const kMaxCheckExistAttempts = 30; // seconds
>+var gCheckExistsAttempts = 0;
>+
> function checkFile() {
>+  if (!tempFile.exists()) {
>+    if (gCheckExistsAttempts >= kMaxCheckExistAttempts) {
>+      do_throw("Expected File " + tempFile.path + " does not exist after " +
>+	       kMaxCheckExistAttempts + " seconds");
>+    }
>+    else {
>+      // Wait a bit longer then try again
>+      do_timeout(1000, "checkFile()");
Did you forget to increment gCheckExistsAttempts somewhere?
Comment 9 User image Mark Banner (:standard8) 2009-05-20 07:00:15 PDT
(In reply to comment #8)
> Did you forget to increment gCheckExistsAttempts somewhere?

Damn, yes I did. Thanks for picking up on that.
Comment 10 User image Shawn Wilsher :sdwilsh 2009-05-20 08:31:17 PDT
(In reply to comment #8)
> Did you forget to increment gCheckExistsAttempts somewhere?
Bah!  How did I miss that?!  Thanks for catching that!
Comment 11 User image Benjamin Stover (:stechz) 2010-07-29 10:20:10 PDT
I just saw this on tryserver:
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280370935.1280371818.10867.gz

Does this look like it is the same problem?  Reopening for now.
Comment 12 User image Benjamin Stover (:stechz) 2010-07-29 10:22:05 PDT
Also saw this on the try build right after mine, so I don't believe it is my patch:
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280372958.1280373826.17793.gz
Comment 13 User image Treeherder Robot 2010-08-01 20:27:45 PDT
dolske
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280714049.1280714726.4179.gz
Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test xpcshell on 2010/08/01 18:54:09

s: talos-r3-snow-041
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-debug-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-debug-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | Expected File /Users/cltbld/talos-slave/tryserver-snowleopard-debug-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/result.txt does not exist after 30 seconds - See following stack:
Comment 14 User image Treeherder Robot 2010-08-01 20:28:00 PDT
dolske
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280714582.1280714971.5092.gz
Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test xpcshell on 2010/08/01 19:03:02

s: talos-r3-snow-054
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | Expected File /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/result.txt does not exist after 30 seconds - See following stack:
Comment 15 User image Treeherder Robot 2010-08-02 10:52:17 PDT
jmathies%mozilla.com
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280770619.1280771139.24626.gz
Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test xpcshell on 2010/08/02 10:36:59

s: talos-r3-snow-041
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | Expected File /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/result.txt does not exist after 30 seconds - See following stack:
Comment 16 User image Treeherder Robot 2010-08-02 11:31:16 PDT
honzab.moz%firemni.cz
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280767052.1280767481.10313.gz
Rev3 MacOSX Snow Leopard 10.6.2 tryserver opt test xpcshell on 2010/08/02 09:37:32

s: talos-r3-snow-012
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | Expected File /Users/cltbld/talos-slave/tryserver-snowleopard-opt-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/result.txt does not exist after 30 seconds - See following stack:
Comment 17 User image Treeherder Robot 2010-08-02 11:34:01 PDT
honzab.moz%firemni.cz
http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1280767209.1280767972.12094.gz
Rev3 MacOSX Snow Leopard 10.6.2 tryserver debug test xpcshell on 2010/08/02 09:40:09

s: talos-r3-snow-044
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-debug-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | /Users/cltbld/talos-slave/tryserver-snowleopard-debug-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/test_punycodeURIs.js | Expected File /Users/cltbld/talos-slave/tryserver-snowleopard-debug-u-xpcshell/build/xpcshell/tests/test_uriloader_exthandler/unit/result.txt does not exist after 30 seconds - See following stack:
Comment 18 User image Mark Banner (:standard8) 2010-08-02 12:31:02 PDT
The 64-bit Snow Leopard 10.6.2 failures are NOT this bug, they are persistent failures, see bug 561350.
Comment 19 User image Siddharth Agarwal [:sid0] (inactive) 2011-06-17 15:27:59 PDT
So I think the patch is missing a return after the do_timeout, and is therefore useless right now.
Comment 20 User image Siddharth Agarwal [:sid0] (inactive) 2011-06-17 15:32:44 PDT
OK, we already have bug 598794 about this problem. Closing this and using that.

Note You need to log in before you can comment on or make changes to this bug.