profile
viewpoint

Ask questionsnet/http: TestTransportMaxConnsPerHost flakes

I've seen this a few times now. @fraenkel, could you take a look?

https://storage.googleapis.com/go-build-log/b6c795d5/android-amd64-emu_95c3cb1f.log

--- FAIL: TestTransportMaxConnsPerHost (0.05s)
    transport_test.go:638: request failed: Get https://127.0.0.1:34180: write tcp 127.0.0.1:37680->127.0.0.1:34180: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45068: read tcp 127.0.0.1:36221->127.0.0.1:45068: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45070: read tcp 127.0.0.1:36221->127.0.0.1:45070: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45074: read tcp 127.0.0.1:36221->127.0.0.1:45074: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45066: read tcp 127.0.0.1:36221->127.0.0.1:45066: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45072: read tcp 127.0.0.1:36221->127.0.0.1:45072: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45069: read tcp 127.0.0.1:36221->127.0.0.1:45069: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45071: read tcp 127.0.0.1:36221->127.0.0.1:45071: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45073: read tcp 127.0.0.1:36221->127.0.0.1:45073: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45067: write tcp 127.0.0.1:36221->127.0.0.1:45067: use of closed network connection
2019/05/01 16:13:25 http: TLS handshake error from 127.0.0.1:45080: write tcp 127.0.0.1:36221->127.0.0.1:45080: use of closed network connection
FAIL
exitcode=1go_android_exec: adb exec-out rm -rf /data/local/tmp/go_android_exec/http.test-20892
golang/go

Answer questions fraenkel

I don't see how to fix the CloseIdleConnections which would have fixed the testcase. The transport tracks host connection counts. When we close idle connections, the counts are not corrected for http2. We don't know the connect method key, nor do we know which connections are being closed on the http2 side.

useful!
source:https://uonfu.com/
Github User Rank List