Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: send on closed channel #3793

Closed
gopherbot opened this issue Jul 2, 2012 · 11 comments
Closed

net/http: send on closed channel #3793

gopherbot opened this issue Jul 2, 2012 · 11 comments

Comments

@gopherbot
Copy link

by dvyukov@chromium.org:

Run
$ GOMAXPROCS=16 go test net/http
several times on linux/amd64 13687:042bac4d6b6e (current tip):

panic: runtime error: send on closed channel
goroutine 409 [running]:
net/http.(*persistConn).roundTrip(0xf84058f850, 0xf84019c240, 0xf84058f850, 0x0, 0x0,
...)
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/transport.go:689 +0x23a
net/http.(*Transport).RoundTrip(0xf8400ada40, 0xf840db2180, 0x100000000, 0x0, 0x0, ...)
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/transport.go:160 +0x32f
net/http.send(0xf840db2180, 0xf8400008d0, 0xf8400ada40, 0x0, 0x0, ...)
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/client.go:140 +0x3ca
net/http.(*Client).doFollowingRedirects(0xf84050cc90, 0xf840db2180, 0x0, 0x0, 0x0, ...)
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/client.go:251 +0x68a
net/http.(*Client).Get(0xf84050cc90, 0xf8405fe2a0, 0x3a00000016, 0xf841bc6000, 0x0, ...)
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/client.go:200 +0xb8
net/http_test.func·081(0xf84062c818, 0xf84062c490, 0xf84062c820, 0x0, 0x0, ...)
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/transport_test.go:420 +0x4a
created by net/http_test.TestStressSurpriseServerCloses
    /usr/local/google/home/dvyukov/go_vanilla/src/pkg/net/http/transport_test.go:432 +0x1ee
@dvyukov
Copy link
Member

dvyukov commented Jul 2, 2012

Comment 1:

Owner changed to @bradfitz.

@bradfitz
Copy link
Contributor

bradfitz commented Jul 2, 2012

Comment 2:

Status changed to Accepted.

@bradfitz
Copy link
Contributor

bradfitz commented Jul 9, 2012

Comment 3:

Fix at http://golang.org/cl/6347061

Labels changed: removed priority-triage.

Status changed to Started.

@bradfitz
Copy link
Contributor

Comment 4:

This issue was closed by revision 8a2a501.

Status changed to Fixed.

@alberts
Copy link
Contributor

alberts commented Jul 25, 2012

Comment 5:

I'm back with a 32 core SB machine. This doesn't seem fixed at tip...
go version weekly.2012-03-27 +6eb7e61b5286
GOMAXPROCS=20

Attachments:

  1. panic.txt (245275 bytes)

@bradfitz
Copy link
Contributor

Comment 6:

Sigh. I can reproduce.
Note to self: maybe fixed by http://golang.org/cl/6430056/ (currently
unreviewed)

Status changed to Accepted.

@davecheney
Copy link
Contributor

Comment 7:

I can trigger this bug within a few iterations with the following procedure, on a core i5
cd $GOROOT/src/net/http
export GOMAXPROCS=81 
go test -c
while ./http.test ; do true; done
Albert, can you please try http://golang.org/cl/6445069 ?

@alberts
Copy link
Contributor

alberts commented Aug 6, 2012

Comment 8:

Ran into fun with this test running in a loop:
=== RUN TestStressSurpriseServerCloses-81
--- FAIL: TestStressSurpriseServerCloses-81 (40.28 seconds)
transport_test.go:440:  presumed deadlock; no HTTP client activity seen in awhile
lots of this in dmesg:
[597413.388285] net_ratelimit: 16 callbacks suppressed
[597413.388359] nf_conntrack: table full, dropping packet.
[597413.661436] nf_conntrack: table full, dropping packet.
[597414.161433] nf_conntrack: table full, dropping packet.
This is on a relatively standard Fedora 16 machine with basic iptables rules.
No sends on closed channels though.
It seems that maybe the conntrack stuff should be disabled on busy systems.
http://blog.sam-pointer.com/tag/nf_conntrack:tablefull,droppingpacket

@davecheney
Copy link
Contributor

Comment 9:

I'm assigning this bug to myself. http://golang.org/cl/6445069 fixes the issue
but may require an additional test before submitting.

Owner changed to @davecheney.

@davecheney
Copy link
Contributor

Comment 10:

This issue was closed by revision 2bdc60f.

Status changed to Fixed.

@davecheney
Copy link
Contributor

Comment 11:

Issue #3861 has been merged into this issue.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants