Closed
Description
What version of Go are you using (go version
)?
go1.15.3
Does this issue reproduce with the latest release?
Not sure. Only happened once in our PROD env.
What operating system and processor architecture are you using (go env
)?
PROD runtime env, there is no go.
$ uname -a Linux ashads097.fwmrm.net 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
What did you do?
Sending an HTTPS request, and Got crashed.
fatal error: fault [signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x74f58d] goroutine 40123707 [running]: runtime.throw(0xe8844d, 0x5) /usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc00deb3330 sp=0xc00deb3300 pc=0x43a432 runtime.sigpanic() /usr/local/go/src/runtime/signal_unix.go:727 +0x405 fp=0xc00deb3360 sp=0xc00deb3330 pc=0x450be5 net/http.(*persistConn).isBroken(0x7c736d3838313537, 0xc00616f650) /usr/local/go/src/net/http/transport.go:1897 +0x2d fp=0xc00deb3390 sp=0xc00deb3360 pc=0x74f58d net/http.(*Transport).queueForIdleConn(0xc00028c000, 0xc0131f9080, 0xc00cb96a00) /usr/local/go/src/net/http/transport.go:1021 +0x1e5 fp=0xc00deb3478 sp=0xc00deb3390 pc=0x749845 net/http.(*Transport).getConn(0xc00028c000, 0xc00f51dbc0, 0x0, 0xc006086500, 0x5, 0xc00e9184c0, 0x16, 0x0, 0x0, 0x0, ...) /usr/local/go/src/net/http/transport.go:1326 +0x297 fp=0xc00deb3718 sp=0xc00deb3478 pc=0x74b257 net/http.(*Transport).roundTrip(0xc00028c000, 0xc004784200, 0x30, 0x7f7f604ade90, 0x150) /usr/local/go/src/net/http/transport.go:569 +0x77c fp=0xc00deb3960 sp=0xc00deb3718 pc=0x746c7c net/http.(*Transport).RoundTrip(0xc00028c000, 0xc004784200, 0xc00028c000, 0x0, 0x0) /usr/local/go/src/net/http/roundtrip.go:17 +0x35 fp=0xc00deb3998 sp=0xc00deb3960 pc=0x72ccb5 net/http.send(0xc004784200, 0xfb5860, 0xc00028c000, 0x0, 0x0, 0x0, 0xc012b706a0, 0x203001, 0x1, 0x0) /usr/local/go/src/net/http/client.go:252 +0x453 fp=0xc00deb3b40 sp=0xc00deb3998 pc=0x6e8b93 net/http.(*Client).send(0xc000a36750, 0xc004784200, 0x0, 0x0, 0x0, 0xc012b706a0, 0x0, 0x1, 0x203003) /usr/local/go/src/net/http/client.go:176 +0xff fp=0xc00deb3bc0 sp=0xc00deb3b40 pc=0x6e857f net/http.(*Client).do(0xc000a36750, 0xc004784200, 0x0, 0x0, 0x0) /usr/local/go/src/net/http/client.go:718 +0x45f fp=0xc00deb3d98 sp=0xc00deb3bc0 pc=0x6ea59f net/http.(*Client).Do(...) /usr/local/go/src/net/http/client.go:586 (dlv) frame 6 > runtime.raise() /usr/local/go/src/runtime/sys_linux_amd64.s:165 (PC: 0x4749e1) Warning: debugging optimized function Frame 6: /usr/local/go/src/net/http/transport.go:1021 (PC: 749845) (dlv) locals oldTime = time.Time {wall: 0, ext: 0, loc: *time.Location nil} list = []*net/http.persistConn len: 7, cap: 64, [...] stop = false delivered = false pconn = ("*net/http.persistConn")(0x7c736d3838313537) tooOld = false (dlv) p list []*net/http.persistConn len: 7, cap: 64, [ *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x71655265746f7257: EOF), cacheKey: (*"net/http.connectMethodKey")(0x71655265746f726f), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x71655265746f7257: EOF), br: *(unreadable error while reading spliced memory at 0x71655265746f7257: EOF), bw: *(unreadable error while reading spliced memory at 0x71655265746f7257: EOF), nwrite: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), sawEOF: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), readLimit: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x71655265746f730f), idleTimer: *(unreadable error while reading spliced memory at 0x71655265746f7257: EOF), mu: (*sync.Mutex)(0x71655265746f732f), numExpectedResponses: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), reused: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x71655265746f7257: EOF),}, *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x2e33322074736575: EOF), cacheKey: (*"net/http.connectMethodKey")(0x2e3332207473658d), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x2e33322074736575: EOF), br: *(unreadable error while reading spliced memory at 0x2e33322074736575: EOF), bw: *(unreadable error while reading spliced memory at 0x2e33322074736575: EOF), nwrite: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), sawEOF: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), readLimit: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x2e3332207473662d), idleTimer: *(unreadable error while reading spliced memory at 0x2e33322074736575: EOF), mu: (*sync.Mutex)(0x2e3332207473664d), numExpectedResponses: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), reused: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x2e33322074736575: EOF),}, *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), cacheKey: (*"net/http.connectMethodKey")(0x6f477c73b5c2374f), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), br: *(unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), bw: *(unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), nwrite: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), sawEOF: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), readLimit: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x6f477c73b5c237ef), idleTimer: *(unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), mu: (*sync.Mutex)(0x6f477c73b5c2380f), numExpectedResponses: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), reused: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x6f477c73b5c23737: EOF),}, *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x6552747372694674: EOF), cacheKey: (*"net/http.connectMethodKey")(0x655274737269468c), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x6552747372694674: EOF), br: *(unreadable error while reading spliced memory at 0x6552747372694674: EOF), bw: *(unreadable error while reading spliced memory at 0x6552747372694674: EOF), nwrite: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), sawEOF: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), readLimit: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x655274737269472c), idleTimer: *(unreadable error while reading spliced memory at 0x6552747372694674: EOF), mu: (*sync.Mutex)(0x655274737269474c), numExpectedResponses: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), reused: (unreadable error while reading spliced memory at 0x6552747372694674: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x6552747372694674: EOF),}, *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), cacheKey: (*"net/http.connectMethodKey")(0x794265736e6f708b), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), br: *(unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), bw: *(unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), nwrite: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), sawEOF: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), readLimit: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x794265736e6f712b), idleTimer: *(unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), mu: (*sync.Mutex)(0x794265736e6f714b), numExpectedResponses: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), reused: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x794265736e6f7073: EOF),}, *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x382e353031206574: EOF), cacheKey: (*"net/http.connectMethodKey")(0x382e35303120658c), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x382e353031206574: EOF), br: *(unreadable error while reading spliced memory at 0x382e353031206574: EOF), bw: *(unreadable error while reading spliced memory at 0x382e353031206574: EOF), nwrite: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), sawEOF: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), readLimit: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x382e35303120662c), idleTimer: *(unreadable error while reading spliced memory at 0x382e353031206574: EOF), mu: (*sync.Mutex)(0x382e35303120664c), numExpectedResponses: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), reused: (unreadable error while reading spliced memory at 0x382e353031206574: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x382e353031206574: EOF),}, *{ alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), cacheKey: (*"net/http.connectMethodKey")(0x7c736d383831354f), conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), br: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), bw: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), nwrite: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), sawEOF: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), readLimit: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: (*time.Time)(0x7c736d38383135ef), idleTimer: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), mu: (*sync.Mutex)(0x7c736d383831360f), numExpectedResponses: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), reused: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF),}, ] (dlv) p pconn *net/http.persistConn { alt: net/http.RoundTripper nil, t: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), cacheKey: net/http.connectMethodKey {proxy: (unreadable could not read string len error while reading spliced memory at 0x7c736d3838313537: EOF), scheme: (unreadable could not read string len error while reading spliced memory at 0x7c736d3838313537: EOF), addr: (unreadable could not read string len error while reading spliced memory at 0x7c736d3838313537: EOF), onlyH1: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF)}, conn: net.Conn nil, tlsState: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), br: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), bw: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), nwrite: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), reqch: chan net/http.requestAndChan {}, writech: chan net/http.writeRequest {}, closech: chan struct {} {}, isProxy: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), sawEOF: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), readLimit: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), writeErrCh: chan error {}, writeLoopDone: chan struct {} {}, idleAt: time.Time { wall: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), ext: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), loc: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF),}, idleTimer: *(unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), mu: sync.Mutex {state: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), sema: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF)}, numExpectedResponses: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), closed: error nil, canceledErr: error nil, broken: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), reused: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF), mutateHeaderFunc: (unreadable error while reading spliced memory at 0x7c736d3838313537: EOF),}
What did you expect to see?
Successfully sending out HTTPS request
What did you see instead?
The memory of idle connections list seems corrupted
func (t *Transport) queueForIdleConn(w *wantConn) (delivered bool) { // ... // Look for most recently-used idle connection. if list, ok := t.idleConn[w.key]; ok { stop := false delivered := false for len(list) > 0 && !stop { pconn := list[len(list)-1]