WebSocketChannel can hang waiting for OnTransportAvailable when HTTP request isn't upgraded

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P1
normal
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: michal, Assigned: michal)

Tracking

Trunk
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 attachment, 1 obsolete attachment)

7.86 KB, patch
valentin.gosu
: review+
Details | Diff | Splinter Review

One specific case was fixed in bug 1527005, but there are still other potential cases when HTTP request isn't upgraded and WebSocketChannel waits for OnTransportAvailable(). Open timer is canceled in OnStartRequest(), so if OnTransportAvailable() isn't called the channel never times out.

Posted patch fix (obsolete) — Splinter Review
Attachment #9043881 - Flags: review?(valentin.gosu)
Attachment #9043881 - Flags: review?(valentin.gosu) → review+
Keywords: checkin-needed

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e586fc7af16
WebSocketChannel can hang waiting for OnTransportAvailable when HTTP request isn't upgraded, r=valentin

Keywords: checkin-needed
Flags: needinfo?(michal.novotny)

For convenience, here's a sample log showing some leaks (involving websocket stuff):
https://treeherder.mozilla.org/logviewer.html#?job_id=228453128&repo=mozilla-inbound

Backed out changeset 5e586fc7af16 (bug 1527890) for causing leaks

Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/d196b4646822fe7e71bd495516611b1d9a51b2b3

Failure push: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&selectedJob=228435234&revision=5e586fc7af16e4349d104b54d1ccc58cb0264720

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=228435234&repo=mozilla-inbound&lineNumber=11320

task 2019-02-14T17:08:26.240Z] 17:08:26 INFO - TEST-UNEXPECTED-FAIL | leakcheck | default 19548 bytes leaked (ChannelWrapper::ChannelWrapperStub, CondVar, ConsoleReportCollector, Dashboard, DataStorage, ...)
[task 2019-02-14T17:08:26.241Z] 17:08:26 INFO -
[task 2019-02-14T17:08:26.241Z] 17:08:26 INFO - runtests.py | Running tests: end.
[task 2019-02-14T17:08:26.258Z] 17:08:26 INFO - Buffered messages finished
[task 2019-02-14T17:08:26.259Z] 17:08:26 INFO - Running manifest: dom/tests/mochitest/general/chrome.ini
[task 2019-02-14T17:08:26.296Z] 17:08:26 INFO - Setting pipeline to PAUSED ...
[task 2019-02-14T17:08:26.297Z] 17:08:26 INFO - Pipeline is PREROLLING ...
[task 2019-02-14T17:08:26.298Z] 17:08:26 INFO - Pipeline is PREROLLED ...
[task 2019-02-14T17:08:26.298Z] 17:08:26 INFO - Setting pipeline to PLAYING ...
[task 2019-02-14T17:08:26.299Z] 17:08:26 INFO - New clock: GstSystemClock
[task 2019-02-14T17:08:26.327Z] 17:08:26 INFO - Got EOS from element "pipeline0".
[task 2019-02-14T17:08:26.327Z] 17:08:26 INFO - Execution ended after 0:00:00.033518036
[task 2019-02-14T17:08:26.329Z] 17:08:26 INFO - Setting pipeline to PAUSED ...
[task 2019-02-14T17:08:26.332Z] 17:08:26 INFO - Setting pipeline to READY ...
[task 2019-02-14T17:08:26.332Z] 17:08:26 INFO - (gst-launch-1.0:5411): GStreamer-CRITICAL **: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed
[task 2019-02-14T17:08:26.332Z] 17:08:26 INFO - Setting pipeline to NULL ...
[task 2019-02-14T17:08:26.332Z] 17:08:26 INFO - Freeing pipeline ...
[task 2019-02-14T17:08:26.529Z] 17:08:26 INFO - pk12util: PKCS12 IMPORT SUCCESSFUL
[task 2019-02-14T17:08:26.614Z] 17:08:26 INFO - MochitestServer : launching [u'/builds/worker/workspace/build/tests/bin/xpcshell', '-g', '/builds/worker/workspace/build/application/firefox', '-f', '/builds/worker/workspace/build/tests/bin/components/httpd.js', '-e', "const _PROFILE_PATH = '/tmp/tmpYcMXIY.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = false;", '-f', '/builds/worker/workspace/build/tests/mochitest/server.js']
[task 2019-02-14T17:08:26.616Z] 17:08:26 INFO - runtests.py | Server pid: 5433
[task 2019-02-14T17:08:26.637Z] 17:08:26 INFO - runtests.py | Websocket server pid: 5436
[task 2019-02-14T17:08:26.666Z] 17:08:26 INFO - runtests.py | SSL tunnel pid: 5439
[task 2019-02-14T17:08:26.950Z] 17:08:26 INFO - Couldn't convert chrome URL: chrome://branding/locale/brand.properties
[task 2019-02-14T17:08:26.951Z] 17:08:26 INFO - [5433, Main Thread] WARNING: Could not get the program name for a cubeb stream.: 'NS_SUCCEEDED(rv)', file /builds/worker/workspace/build/src/dom/media/CubebUtils.cpp, line 358
[task 2019-02-14T17:08:26.968Z] 17:08:26 INFO - runtests.py | Running with scheme: http
[task 2019-02-14T17:08:26.969Z] 17:08:26 INFO - runtests.py | Running with e10s: False
[task 2019-02-14T17:08:26.970Z] 17:08:26 INFO - runtests.py | Running with serviceworker_e10s: False
[task 2019-02-14T17:08:26.971Z] 17:08:26 INFO - runtests.py | Running tests: start.
[task 2019-02-14T17:08:26.973Z] 17:08:26 INFO -
[task 2019-02-14T17:08:26.988Z] 17:08:26 INFO - Application command: /builds/worker/workspace/build/application/firefox/firefox -marionette -foreground -profile /tmp/tmpYcMXIY.mozrunner
[task 2019-02-14T17:08:27.005Z] 17:08:27 INFO - runtests.py | Application pid: 5458
[task 2019-02-14T17:08:27.006Z] 17:08:27 INFO - TEST-INFO | started process GECKO(5458)

Posted patch patch v2Splinter Review
Attachment #9043881 - Attachment is obsolete: true
Flags: needinfo?(michal.novotny)
Attachment #9044101 - Flags: review?(valentin.gosu)
Attachment #9044101 - Flags: review?(valentin.gosu) → review+
Keywords: checkin-needed

Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f188359a08c
WebSocketChannel can hang waiting for OnTransportAvailable when HTTP request isn't upgraded, r=valentin

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.