You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was first reported at etcd-io/etcd#5275. I've been trying to reproduce in my local machine, but haven't been able to for the last two days. It often happens in the slow CI environment with go test -v -race -cpu 4 -run=ExampleLease_keepAliveOnce command.
What did you expect to see?
No race condition.
What did you see instead?
Too many goroutines running after all test(s).
1 instances of:
internal/race.Enable()
/usr/local/golang/1.6.1/go/src/internal/race/race.go:32
sync.(*WaitGroup).Add(...)
/usr/local/golang/1.6.1/go/src/sync/waitgroup.go:92 +0x27d
sync.(*WaitGroup).Done(...)
/usr/local/golang/1.6.1/go/src/sync/waitgroup.go:96 +0x38
net/http/httptest.(*Server).forgetConn(...)
/usr/local/golang/1.6.1/go/src/net/http/httptest/server.go:329 +0xe7
net/http/httptest.(*Server).wrap.func1(...)
/usr/local/golang/1.6.1/go/src/net/http/httptest/server.go:283 +0x654
net/http.(*conn).setState(...)
/usr/local/golang/1.6.1/go/src/net/http/server.go:1371 +0x7d
net/http.(*conn).serve.func1(...)
/usr/local/golang/1.6.1/go/src/net/http/server.go:1394 +0x35a
net/http.(*conn).serve(...)
/usr/local/golang/1.6.1/go/src/net/http/server.go:1452 +0x11ff
created by net/http.(*Server).Serve
/usr/local/golang/1.6.1/go/src/net/http/server.go:2137 +0x4d2
1 instances of:
net.runtime_pollWait(...)
/usr/local/golang/1.6.1/go/src/runtime/netpoll.go:160 +0x63
net.(*pollDesc).Wait(...)
/usr/local/golang/1.6.1/go/src/net/fd_poll_runtime.go:73 +0x56
net.(*pollDesc).WaitRead(...)
/usr/local/golang/1.6.1/go/src/net/fd_poll_runtime.go:78 +0x44
net.(*netFD).Read(...)
/usr/local/golang/1.6.1/go/src/net/fd_unix.go:250 +0x27b
net.(*conn).Read(...)
/usr/local/golang/1.6.1/go/src/net/net.go:172 +0x121
net.(*TCPConn).Read(...)
<autogenerated>:68 +0x7d
github.com/coreos/etcd/pkg/transport.timeoutConn.Read(...)
/home/runner/workspace/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/pkg/transport/timeout_conn.go:43 +0x1d6
github.com/coreos/etcd/pkg/transport.(*timeoutConn).Read(...)
<autogenerated>:42 +0xf0
net/http.noteEOFReader.Read(...)
/usr/local/golang/1.6.1/go/src/net/http/transport.go:1683 +0x75
net/http.(*noteEOFReader).Read(...)
<autogenerated>:284 +0xf8
bufio.(*Reader).fill(...)
/usr/local/golang/1.6.1/go/src/bufio/bufio.go:97 +0x365
bufio.(*Reader).Peek(...)
/usr/local/golang/1.6.1/go/src/bufio/bufio.go:132 +0x187
net/http.(*persistConn).readLoop(...)
/usr/local/golang/1.6.1/go/src/net/http/transport.go:1069 +0x223
created by net/http.(*Transport).dialConn
/usr/local/golang/1.6.1/go/src/net/http/transport.go:853 +0x16f0
1 instances of:
net/http.(*persistConn).writeLoop(...)
/usr/local/golang/1.6.1/go/src/net/http/transport.go:1273 +0x563
created by net/http.(*Transport).dialConn
/usr/local/golang/1.6.1/go/src/net/http/transport.go:854 +0x1715
It seems like the race condition is detected between net/http/httptest.(*Server).wrap and net/http/httptest.(*Server).forgetConn. I would very much appreciate it if somebody can point me to the Go code that I should investigate further.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
gyuho
changed the title
net/http/httptest: possible race condition
net/http/httptest: possible leaky goroutine
May 11, 2016
I would very much appreciate it if somebody can point me to the Go code that I should investigate further.
The code is in the src/net/http/httptest directory. Or are you looking for something more specific than that? You seem to have already started investigating?
@bradfitz Yes, I am still trying to reliably reproduce this issue. You are right. Think the logs give enough information. Will post updates here if I get it to reproduce.
I am still investigating this issue, but I would like to get some help to debug it.
go 1.6.1
Semaphore CI with Ubuntu 14.04 LTS
This was first reported at etcd-io/etcd#5275. I've been trying to reproduce in my local machine, but haven't been able to for the last two days. It often happens in the slow CI environment with
go test -v -race -cpu 4 -run=ExampleLease_keepAliveOnce
command.No race condition.
It seems like the race condition is detected between
net/http/httptest.(*Server).wrap
andnet/http/httptest.(*Server).forgetConn
. I would very much appreciate it if somebody can point me to the Go code that I should investigate further.Thanks in advance.
The text was updated successfully, but these errors were encountered: