[socket-proc] Connection stickiness handling for upgrade observers
Categories
(Core :: Networking: HTTP, enhancement, P2)
Tracking
()
People
(Reporter: mayhemer, Assigned: kershaw)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file, 3 obsolete files)
https://hg.mozilla.org/projects/larch/file/322a2074e4f0/netwerk/protocol/http/nsHttpChannel.cpp#l7648 https://hg.mozilla.org/projects/larch/file/322a2074e4f0/netwerk/protocol/http/nsHttpChannel.cpp#l7743
Reporter | ||
Comment 1•6 years ago
|
||
Priority and also implementation of this bug depends on how we are going to handle websocket upgrades. This is related to listening sockets as well - how are we going to deal with it.
Updated•6 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
To complete websocket upgrade, it means that the ownership of socket transport should be transfered [1] to websocket channel.
I am not sure how to do this since parent process can't access the socket transport in socket process. Maybe we have to provide IPC version of nsISocketTransport, nsIAsyncInputStream and nsIAsyncOutputStream [2].
[1] https://searchfox.org/mozilla-central/rev/89414a1df52d06cfc35529afb9a5a8542a6e4270/netwerk/protocol/http/nsHttpConnectionMgr.cpp#2875-2885
[2] https://searchfox.org/mozilla-central/rev/89414a1df52d06cfc35529afb9a5a8542a6e4270/media/mtransport/ipc/WebrtcProxyChannel.cpp#289
Assignee | ||
Comment 3•5 years ago
|
||
Hi Michal,
Could you take a look at comment2? I think adding IPC interface for nsISocketTransport and nsIAsync(Input/Output)Stream might be too complicated. Could you provide your insight here?
Thanks.
Comment 4•5 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #3)
Hi Michal,
Could you take a look at comment2? I think adding IPC interface for nsISocketTransport and nsIAsync(Input/Output)Stream might be too complicated. Could you provide your insight here?
Thanks.
I'm not sure I understand the problem here because I'm not familiar with socket process changes. Websocket channel needs the socket to read/write data from/to it.
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #4)
(In reply to Kershaw Chang [:kershaw] from comment #3)
Hi Michal,
Could you take a look at comment2? I think adding IPC interface for nsISocketTransport and nsIAsync(Input/Output)Stream might be too complicated. Could you provide your insight here?
Thanks.
I'm not sure I understand the problem here because I'm not familiar with socket process changes. Websocket channel needs the socket to read/write data from/to it.
Sorry that I didn't explain how socket process works first.
The current architecture is keeping http channel in parent process and others under http channel (e.g. http transaction and http connection) in socket process. The thing is that the socket transport that Websocket channel needs is only accessible in socket process.
A possible solution is to implement IPC interface for nsISocketTransport, nsIAsyncInputStream and nsIAsyncOutputStream, but it seems this is a bit too complicated.
Comment 6•5 years ago
|
||
(In reply to Kershaw Chang [:kershaw] from comment #5)
A possible solution is to implement IPC interface for nsISocketTransport, nsIAsyncInputStream and nsIAsyncOutputStream, but it seems this is a bit too complicated.
I guess the other possible solution is to separate socket manipulation from the WebSocketChannel and let it run in the socket process. I'm not sure what is less complicated. Also, the generic solution could be used by other code, not just websocket channel.
Comment 7•5 years ago
|
||
Should be done before landing back to central with pref off
Comment 8•5 years ago
|
||
Simple patch for enable upgrade again. Only without socket process.
Comment 9•5 years ago
|
||
https://hg.mozilla.org/projects/larch/rev/1a8cf90422a3a378bda9123dec8d8b8eebfc8220
leave open intentionally since we only deal with non-socket-process case
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Assignee | ||
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•4 years ago
|
||
Ping for review https://phabricator.services.mozilla.com/D30624.
Thanks.
Comment 14•4 years ago
|
||
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/74bb3c2ab767 P1: Introduce nsWebSocketConnection interface for separating socket manipulation r=michal,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/f7b6aac1b58b P2: ipdl for nsIWebSocketConnection r=michal
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/74bb3c2ab767
https://hg.mozilla.org/mozilla-central/rev/f7b6aac1b58b
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Backed out 3 changesets (bug 1653642, bug 1497249) for causing Bug 1654282.
Backed out changesets f7b6aac1b58b, 74bb3c2ab767.
Link: https://hg.mozilla.org/integration/autoland/rev/d72591a16d42a6cefcffe3df901fa9d0db440193
Comment 17•4 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/d72591a16d42
Assignee | ||
Comment 18•4 years ago
|
||
Depends on D30624
Assignee | ||
Comment 19•4 years ago
|
||
Michal, it would be great if you can review D30624 and D85735 within this week, so we have more time to test theses patches in this cycle.
Thank you!
Comment 20•4 years ago
|
||
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/432c7e9dc19f P1: Introduce nsWebSocketConnection interface for separating socket manipulation r=michal,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/2502449c2e24 P2: ipdl for nsIWebSocketConnection r=michal https://hg.mozilla.org/integration/autoland/rev/1cd6d2f9a603 Don't release WebSocketChannel in nsWebSocketConnection::Close, r=michal,necko-reviewers
Comment 21•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/432c7e9dc19f
https://hg.mozilla.org/mozilla-central/rev/2502449c2e24
https://hg.mozilla.org/mozilla-central/rev/1cd6d2f9a603
Updated•4 years ago
|
Updated•4 years ago
|
Comment 22•4 years ago
|
||
backout |
This was backed out from Beta81 for causing bug 1663718. It remains landed for 82+.
https://hg.mozilla.org/releases/mozilla-beta/rev/0218c1751126fd28df953d37fb611a82362f9e56
Comment 23•4 years ago
|
||
This looks like it was backed out of 82 and later in bug 1673340. Should this bug be reopened?
Assignee | ||
Comment 24•4 years ago
|
||
(In reply to Mathew Hodson from comment #23)
This looks like it was backed out of 82 and later in bug 1673340. Should this bug be reopened?
Yes, let's reopen this.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 25•2 years ago
|
||
This bug was fixed by bug 1716566.
Description
•