Closed Bug 1329245 Opened 7 years ago Closed 7 years ago

Intermittent dom/network/tests/test_tcpsocket_jsm.html | Test timed out.

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: asuth)

References

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell fixed:obsolete])

Attachments

(3 files)

this has been failing frequently on osx debug and opt for the last 5 weeks.

here is a debug log:
https://treeherder.mozilla.org/logviewer.html#?repo=mozilla-central&job_id=102847179&lineNumber=2266

and the corresponding screenshot:
http://mozilla-releng-blobs.s3.amazonaws.com/blobs/mozilla-central/sha512/d6c75e3e52f123fe2d6e7d5d6705fd000aaf357a79e28f7fcb042200be97233c10852c0e000c917e7fa139d880803dd42d3223687bcf90fa8b897eadaf62e134

here is data from the log:
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | got open event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | client readyState is open 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Listening server accepted socket 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | server readyState is open 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending less than 64k, buffer should not be full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server received/client sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending less than 64k, buffer should not be full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client received/server sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending less than 64k, buffer should not be full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending less than 64k, buffer should not be full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server received/client sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending less than 64k, buffer should not be full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending less than 64k, buffer should not be full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - Buffered messages logged at 08:48:45
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client received/server sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The drain event should fire after a large send that indicated full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | server received/client sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The drain event should fire after a large send that indicated full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | client received/server sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The drain event should fire after a large send that indicated full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | server received/client sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The drain event should fire after a large send that indicated full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - Buffered messages logged at 08:48:46
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | client received/server sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | readyState should be closing immediately after calling close 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The client should get a close event when the server closes. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | client readyState should be closed after close event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The server should get a close event when it closes itself. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | server readyState should be closed after close event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | got open event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Listening server accepted socket 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | client readyState should be losing immediately after calling close 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The client should get a close event when it closes itself. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | client readyState should be closed after the close event is received 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The server should get a close event when the client closes. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | server readyState should be closed after the close event is received 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Listening server accepted socket 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | got open event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The drain event should fire after a large send that returned true. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The close event should fire after the drain event. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | server received/client sent arrays were equivalent. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The drain event should fire after a large send that returned true. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | got open event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Listening server accepted socket 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Client sending a large non-string should only send a small string. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | The close event should fire after the drain event. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | got open event 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Listening server accepted socket 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Server sending more than 64k should result in the buffer being full. 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | payload is ArrayBuffer 
08:54:11     INFO - TEST-PASS | dom/network/tests/test_tcpsocket_jsm.html | Received array length less than sent array length 
08:54:11     INFO - Buffered messages finished
08:54:11     INFO - TEST-UNEXPECTED-FAIL | dom/network/tests/test_tcpsocket_jsm.html | Test timed out.
Component: DOM → Networking
Whiteboard: [stockwell needswork]
:mcmanus, I see you as the triage owner for the networking component, could you find someone on the networking team to help look at this issue and help get to a resolution sometime in the next 2 weeks?
Flags: needinfo?(mcmanus)
that's a dom test
Component: Networking → DOM
Flags: needinfo?(mcmanus)
I'll take a look at this.

Pre-investigation note: This test is known to break in a different way (near?-) deterministically as part of :smaug's pending overhaul of our Promise microtask implementation in bug 1193394.  From IRC:

21:27	smaug	asuth: by any chance, is it somehow obvious to you why fixing Promise handling makes https://searchfox.org/mozilla-central/rev/d66b9f27d5630a90b2fce4d70d4e9050f43df9b4/dom/network/tests/test_tcpsocket_client_and_server_basics.js#316-317 to fail because we get "error" and not "close"
21:31	smaug	there is https://searchfox.org/mozilla-central/rev/d66b9f27d5630a90b2fce4d70d4e9050f43df9b4/dom/network/tests/test_tcpsocket_client_and_server_basics.js#90-91 which is bogus
Assignee: nobody → bugmail
Status: NEW → ASSIGNED
thanks :asuth for picking this up!

:mcmanus- apologies, I think we did a blanket dom/networking/* -> Core::Networking:
https://dxr.mozilla.org/mozilla-central/source/dom/network/moz.build#7

could you help me sort out the files to be more accurate in that file?  There are only a few tests in the tests/ directory:
https://dxr.mozilla.org/mozilla-central/source/dom/network/tests
Flags: needinfo?(mcmanus)
This is a resurgence of the same problem in bug 788960 where we found that attempting to connect to a closed/non-listening port would fail to generate the error that we expected.  I reintroduced it with my test cleanup in bug 1087145.  Although that was quite some time ago, this signature should have existed since bug 1207090 introduced test_tcpsocket_jsm.html, so the delay before being a tracked intermittent and the failure ramp-up are a little surprising.

Specifically, we're hanging waiting for the error event (or really, any type of event), in this code block:
```
  // -- Close the listening server (and try to connect)
  // We want to verify that the server actually closes / stops listening when
  // we tell it to.
  listeningServer.close();

  // - try and connect, get an error
  clientSocket = createSocket('127.0.0.1', serverPort,
                              { binaryType: 'arraybuffer' });
  clientQueue = listenForEventsOnSocket(clientSocket, 'client');
  is((yield clientQueue.waitForEvent()).type, 'error', 'fail to connect');
  is(clientSocket.readyState, 'closed',
     'client readyState should be closed after the failure to connect');
```

Since this problem exclusively happens on OSX, investigation was somewhat fruitless last time, and we do like the error test because connection errors are important for domain reasons and I think we screwed it up once (and TCPSocket is still relevant and may become more relevant if bug 1247628 exposes it to WebExtensions)... I'm going to just have us skip this check on OSX again.
See Also: → 1087145
The use of add_task.js was ever only intended to be temporary until
bug 1078657 landed.
Attachment #8874314 - Flags: review?(bkelly)
Bug 1286530 made TCPSocket ChromeOnly, eliminating both the
dom.mozTCPSocket.enabled preference check as well as the "tcp-socket"
permission check.  The API is now always exposed in chrome contexts.
This patch removes the leftover (and confusing) dead code.

Renamed and why:
- test_tcpsocket_enabled_no_perm.html renamed to
  test_tcpsocket_not_exposed_to_content.html because it's now just a
  question of content never seeing the API.

Removed tests and why:
- test_tcpsocket_enabled_with_perm.html used to be a standalone
  verification of our permission check.  We have no permission check
  now and both test_tcpsocket_jsm.html and
  test_tcpsocket_client_and_server_basics.html serve as tests that we
  affirmatively expose the API and there are no "late" failure (such
  as a secondary check in the parent).

- test_tcpsocket_default_permissions.html duplicated what (now)
  test_tcpsocket_not_exposed_to_content.html accomplishes.  It tried to
  use the API and expect an exception.  This is just superstition in a
  WebIDL.  (TCPSocket was not originally WebIDL-y.)
Attachment #8874315 - Flags: review?(bkelly)
Attachment #8874314 - Flags: review?(bkelly) → review+
Comment on attachment 8874315 [details] [diff] [review]
Part 2: finish removal of pref/permission pieces begun in bug 1286530

Review of attachment 8874315 [details] [diff] [review]:
-----------------------------------------------------------------

Mostly a rs+.
Attachment #8874315 - Flags: review?(bkelly) → review+
Attachment #8874317 - Flags: review?(bkelly) → review+
Whiteboard: [stockwell needswork] → [stockwell fixed:obsolete]
Flags: needinfo?(mcmanus)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: