Closed Bug 936181 Opened 11 years ago Closed 9 years ago

Intermittent test_bug561042.js,test_well-known.js | test failed (with xpcshell return code: 0) | xpcshell/head.js | 2147746065 from "Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE)"

Categories

(Testing :: XPCShell Harness, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: RyanVM, Unassigned)

Details

(Keywords: intermittent-failure)

https://tbpl.mozilla.org/php/getParsedLog.php?id=30280585&tree=Mozilla-Aurora Ubuntu VM 12.04 x64 mozilla-aurora pgo test xpcshell on 2013-11-07 09:45:28 PST for push 11b4854b7cdf slave: tst-linux64-ec2-341 10:05:51 INFO - Retrying tests that failed when run in parallel. 10:05:51 INFO - TEST-INFO | /builds/slave/test/build/tests/xpcshell/tests/netwerk/test/unit/test_bug561042.js | running test ... 10:05:51 WARNING - TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/xpcshell/tests/netwerk/test/unit/test_bug561042.js | test failed (with xpcshell return code: 0), see following log: 10:05:51 INFO - >>>>>>> 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test MAIN run_test pending (1) 10:05:51 INFO - !!! could not start server on port 8080: [Exception... "Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.init]" nsresult: "0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE)" location: "JS frame :: resource://testing-common/httpd.js :: nsHttpServer.prototype._start :: line 552" data: no] 10:05:51 WARNING - TEST-UNEXPECTED-FAIL | xpcshell/head.js | 2147746065 10:05:51 INFO - <<<<<<< 10:05:51 INFO - TEST-INFO | /builds/slave/test/build/tests/xpcshell/tests/toolkit/identity/tests/unit/test_well-known.js | running test ... 10:05:51 WARNING - TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/xpcshell/tests/toolkit/identity/tests/unit/test_well-known.js | test failed (with xpcshell return code: 0), see following log: 10:05:51 INFO - >>>>>>> 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test MAIN run_test pending (1) 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test run_next_test 0 pending (2) 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test MAIN run_test finished (2) 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | running event loop 10:05:51 INFO - TEST-INFO | /builds/slave/test/build/tests/xpcshell/tests/toolkit/identity/tests/unit/test_well-known.js | Starting test_well_known_1 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test test_well_known_1 pending (2) 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test pending (3) 10:05:51 INFO - !!! could not start server on port 8080: [Exception... "Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.init]" nsresult: "0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE)" location: "JS frame :: resource://testing-common/httpd.js :: nsHttpServer.prototype._start :: line 552" data: no] 10:05:51 WARNING - TEST-UNEXPECTED-FAIL | /builds/slave/test/build/tests/xpcshell/head.js | 2147746065 - See following stack: 10:05:51 INFO - JS frame :: /builds/slave/test/build/tests/xpcshell/head.js :: _run_next_test :: line 1301 10:05:51 INFO - JS frame :: /builds/slave/test/build/tests/xpcshell/head.js :: do_execute_soon/<.run :: line 474 10:05:51 INFO - native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | exiting test 10:05:51 INFO - TEST-INFO | (xpcshell/head.js) | test run_next_test 0 finished (3) 10:05:51 INFO - Identity core: shutdown 10:05:51 INFO - <<<<<<< 10:05:51 INFO - Node SPDY server shutting down ... 10:05:51 INFO - INFO | Result summary: 10:05:51 INFO - INFO | Passed: 1816 10:05:51 WARNING - INFO | Failed: 2 10:05:51 WARNING - One or more unittests failed. 10:05:51 INFO - INFO | Todo: 4 10:05:51 INFO - INFO | Retried: 2 10:05:52 ERROR - Return code: 256
test_bug561042.js is using a hardcoded server port. :)
I wonder if we can make httpd.js error out when called with a hardcoded server port in xpcshell tests?
Good idea. I'm sure we can check for some var that gets initialized in the global head.js when the given port is != -1. Sounds good?
Yeah, we should do that.
I'll squeeze in a patch for this over the weekend.
BTW - error out or just warn?
Error out, warnings will just get ignored.
Makes sense. One more thing - what about tests that are marked "run-sequentially" but have hardcoded ports? (Not sure if/how many they are, will check, but seems like a plausible situation.)
Forgot about this. What should we do about the tests like in comment #8?
Flags: needinfo?(ahalberstadt)
Can't remember, were they in run-sequentially because it was hard to fix them? If not, then I guess we should land your patch on Cedar (or just use try) and iteratively fix them. If so, then I'm not really sure.. maybe we could change the _IS_XPCSHELL variable back to false before running them? Would that require restarting the server? Also I would call that variable _ALLOW_HARDCODED_PORTS or something so that other harnesses can set it too if they want.
Flags: needinfo?(ahalberstadt)
Yes, there were tests that were too hard to fix or somehow "had" to use hardcoded ports. I guess what you suggest makes sense, we'll just error out and condition on an _ALLOW_HARDCODED_PORTS var. Be back soon with a patch.
Inactive; closing (see bug 1180138).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.