Closed Bug 896093 Opened 7 years ago Closed 7 years ago

Intermittent test_errorhandler.js | test failed (followed by: "TypeError: invalid 'in' operand error") due to NS_ERROR_NOT_AVAILABLE when starting httpd.js on Windows XP

Categories

(Testing :: General, defect)

x86
Windows XP
defect
Not set

Tracking

(firefox24 unaffected, firefox25 fixed)

RESOLVED FIXED
mozilla25
Tracking Status
firefox24 --- unaffected
firefox25 --- fixed

People

(Reporter: KWierso, Assigned: gps)

References

Details

(Keywords: intermittent-failure, regression)

gps, please may you take a look at this? :-)
Blocks: 884421
Flags: needinfo?(gps)
When I first saw this error in fx-team, I hypothesized that it would magically go away when bug 895542 landed. Unless the fx-team merge was done improperly, I'm kinda surprised we're still seeing this. I'll investigate.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Flags: needinfo?(gps)
The errors occur in separate tests inside test_errorhandler.js. They all have the following signature:

03:32:52     INFO -  TEST-INFO | (xpcshell/head.js) | test test_login_non_network_error pending (2)
03:32:52     INFO -  ==========================================
03:32:52     INFO -  Got exception starting HTTP server on port -1
03:32:52     INFO -  Error: 2147746065 No traceback available
03:32:52     INFO -  Is there a process already listening on port -1?
03:32:52     INFO -  ==========================================

00:18:15     INFO -  TEST-INFO | (xpcshell/head.js) | test test_sync_prolonged_non_network_error pending (2)
00:18:15     INFO -  ==========================================
00:18:15     INFO -  Got exception starting HTTP server on port -1
00:18:15     INFO -  Error: 2147746065 No traceback available
00:18:15     INFO -  Is there a process already listening on port -1?
00:18:15     INFO -  ==========================================

17:45:44     INFO -  TEST-INFO | (xpcshell/head.js) | test test_login_prolonged_non_network_error pending (2)
17:45:44     INFO -  ==========================================
17:45:44     INFO -  Got exception starting HTTP server on port -1
17:45:44     INFO -  Error: 2147746065 No traceback available
17:45:44     INFO -  Is there a process already listening on port -1?
17:45:44     INFO -  ==========================================

03:48:01     INFO -  TEST-INFO | C:/slave/test/build/tests/xpcshell/tests/services/sync/tests/unit/test_errorhandler.js | Starting test_401_logout
03:48:01     INFO -  TEST-INFO | (xpcshell/head.js) | test test_401_logout pending (2)
03:48:01     INFO -  ==========================================
03:48:01     INFO -  Got exception starting HTTP server on port -1
03:48:01     INFO -  Error: 2147746065 No traceback available
03:48:01     INFO -  Is there a process already listening on port -1?
03:48:01     INFO -  ==========================================

05:18:01     INFO -  TEST-INFO | C:/slave/test/build/tests/xpcshell/tests/services/sync/tests/unit/test_errorhandler.js | Starting test_sync_non_network_error
05:18:01     INFO -  TEST-INFO | (xpcshell/head.js) | test test_sync_non_network_error pending (2)
05:18:01     INFO -  ==========================================
05:18:01     INFO -  Got exception starting HTTP server on port -1
05:18:01     INFO -  Error: 2147746065 No traceback available
05:18:01     INFO -  Is there a process already listening on port -1?
05:18:01     INFO -  ==========================================

This error is coming from inside httpd.js. This is possibly a regression from bug 895542. It's also possibly we're triggering a previously-existing bug in httpd.js or Necko around automatic port selection (using -1 as the port number). Sync starts a *ton* of httpd.js server instances. test_errorhandler.js probably generates more than any other test.

Be on the lookout for other intermittent errors around automatic port selection.
I suspect this is a bug with automatic port selection in httpd.js or a Necko bug.

Sync's tests ask for a server on an available port and httpd.js fails to deliver it. The "Got exception starting HTTP server on port -1" is the catch-all exception handler in httpd.js:nsHttpServer._start(). I suspect "new ServerSocket()" (nsIServerSocket::init) is throwing somehow.

It kinda sucks that Sync isn't exposing a decent failure message in the logs. But, the test fails: that's the important big.
Component: Firefox Sync: Backend → httpd.js
Product: Mozilla Services → Testing
The underlying error is 2147746065 == 0x80040111 == NS_ERROR_NOT_AVAILABLE.

I may have to dive into Necko code again...
Summary: Intermittent TEST-UNEXPECTED-FAIL | sync test_errorhandler.js | test failed (with xpcshell return code: 0), see following log: | TypeError: invalid 'in' operand error - See following stack | return code: 1 → Intermittent NS_ERROR_NOT_AVAILABLE when starting httpd.js on Windows XP
Blocks: parxpc
https://tbpl.mozilla.org/?tree=Try&rev=3d9ace5ac5af has httpd.js logging enabled. Will trigger a bunch of xpcshell jobs until this reproduces. Hopefully it will shine some light on the underlying error.
The summary broke TBPL starring, restoring part of previous.
Summary: Intermittent NS_ERROR_NOT_AVAILABLE when starting httpd.js on Windows XP → Intermittent test_errorhandler.js | test failed (followed by: "TypeError: invalid 'in' operand error") due to NS_ERROR_NOT_AVAILABLE when starting httpd.js on Windows XP
This was a regression from bug 895542. A log message was referencing "socket" instead of "temp." The error was obvious and trivial to fix, so I just pushed a change without review:

https://hg.mozilla.org/integration/mozilla-inbound/rev/980b06d9c66f
Depends on: 895542
Keywords: regression
Target Milestone: --- → mozilla25
(In reply to Gregory Szorc [:gps] from comment #39)
> so I just pushed a change without review:

Thank you :-)
https://hg.mozilla.org/mozilla-central/rev/980b06d9c66f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: httpd.js → General
You need to log in before you can comment on or make changes to this bug.