Have to close the transaction if HttpConnectionUDP::Init() failed
Categories
(Core :: Networking: HTTP, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: kershaw, Assigned: kershaw)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
I accidentally found that if we don't close the transaction when HttpConnectionUDP::Init
returns an error, the transaction will be always stayed in the pending queue.
In details:
- A transaction is going to be dispatched to a h3 connection, so a new half open is created.
0:06.58 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp Creating nsHalfOpenSocket [this=0x110750580 trans=0x110717800 ent=test.h3.com key=.S......[tlsflags0x00000000]test.h3.com:443 <ROUTE-via www.h3.com:54168> {NPN-TOKEN h3-27}]
0:06.58 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp nsHalfOpenSocket::SetupStreams [this=0x110750580 ent=.S......[tlsflags0x00000000]test.h3.com:443 <ROUTE-via www.h3.com:54168> {NPN-TOKEN h3-27}] setup routed transport to origin test.h3.com:443 via www.h3.com:54168
- When
HttpConnectionUDP::Init
is failed, we returns an error code here. However, this error code is not handled innsHttpConnectionMgr::nsHalfOpenSocket::OnOutputStreamReady
.
0:06.58 pid:53507 [(null) 53507: Socket Thread]: E/nsHttp HttpConnectionUDP::Init this=0x10aaaafc0 sockettransport=0x1106da818
0:06.58 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp Http3Session::Http3Session [this=0x1106db000]
0:06.58 pid:53507 [(null) 53507: Socket Thread]: I/nsHttp Http3Session::Init 0x1106db000
0:06.58 pid:53507 [(null) 53507: Socket Thread]: D/nsSocketTransport nsSocketTransport::GetSelfAddr [this=0x1106da800 state=0] NOT_AVAILABLE because not yet connected.
0:06.58 pid:53507 [(null) 53507: Socket Thread]: I/nsHttp Http3Session::Init GetSelfAddr failed [this=0x1106db000]
0:06.58 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp HttpConnectionUDP::Init mHttp3Session->Init failed [this=0x10aaaafc0 rv=80004005]
0:06.58 pid:53507 [(null) 53507: Socket Thread]: D/nsSocketTransport nsSocketTransport::GetPeerAddr [this=0x1106da800 state=0] NOT_AVAILABLE because not yet connected.
0:06.58 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp nsHalfOpenSocket::SetupConn conn->init (0x10aaaafc0) failed 80004005
- The transaction is still in the pending queue and the half open is released.
0:06.58 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp Destroying nsHalfOpenSocket [this=0x110750580]
- The transaction is dispatched again and a new half open created.
0:06.72 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp Creating nsHalfOpenSocket [this=0x110750820 trans=0x110717800 ent=test.h3.com key=.S......[tlsflags0x00000000]test.h3.com:443 <ROUTE-via www.h3.com:54168> {NPN-TOKEN h3-27}]
0:06.72 pid:53507 [(null) 53507: Socket Thread]: V/nsHttp nsHalfOpenSocket::SetupStreams [this=0x110750820 ent=.S......[tlsflags0x00000000]test.h3.com:443 <ROUTE-via www.h3.com:54168> {NPN-TOKEN h3-27}] setup routed transport to origin test.h3.com:443 via www.h3.com:54168
HttpConnectionUDP::Init
failed and we go to (1) again.
Comment 1•4 years ago
|
||
We should disable HTTP3 for the transaction and also add the domain to exclusion list by calling this function.
Assignee | ||
Comment 2•4 years ago
|
||
Comment 4•4 years ago
|
||
Backed out 5 changesets (bug 1652717, bug 1665878, bug 1666620, bug 1652713) for XPCshell failures in components/migration/tests/unit/xpcshell.ini. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=317794277&repo=autoland&lineNumber=3802
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=6322b86e1df42a2d468a134d6580b4a5db746a9f&selectedTaskRun=SQF6HSGCTWOZovkxOvQIrg.0
Backout:
https://hg.mozilla.org/integration/autoland/rev/04e0cdc282c235224d89ec00908c6af2e7341032
Assignee | ||
Updated•4 years ago
|
Comment 6•4 years ago
|
||
bugherder |
Description
•