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: return epoll_ctl errors from Read/Write instead of panic #3590

Closed
bradfitz opened this issue May 4, 2012 · 6 comments

Comments

Projects
None yet
4 participants
@bradfitz
Copy link
Member

commented May 4, 2012

My HTTP reverse proxy in front of a bunch of my domains got wedged (didn't fully crash,
but stopped serving).  The last thing in its logs is:

2012/05/02 06:06:49 Error dialing websocket backend 127.0.0.1:8082: dial tcp
127.0.0.1:8082: connection refused
2012/05/02 06:06:49 Error dialing websocket backend 127.0.0.1:8082: dial tcp
127.0.0.1:8082: connection refused
2012/05/02 19:38:22 cgi: copy error: http: response status code does not allow body
2012/05/03 08:01:58 cgi: copy error: http: response status code does not allow body
2012/05/04 03:41:50 CGI error: fork/exec
/home/bradfitz/var/bradfitz.com/cgi-bin/bmlp.pl: too many open files
2012/05/04 03:41:56 http: panic serving 220.181.51.219:59729: pollServer AddFD
epoll_ctl: no such file or directory
/home/bradfitz/go/src/pkg/net/http/server.go:576 (0x436828)
_func_003: buf.Write(debug.Stack())
/home/bradfitz/go/src/pkg/runtime/proc.c:1443 (0x4148f6)
panic: reflect·call(d->fn, d->args, d->siz);
/home/bradfitz/go/src/pkg/net/fd.go:121 (0x462bd8)
(*pollServer).AddFD: panic("pollServer AddFD " + err.Error())
/home/bradfitz/go/src/pkg/net/fd.go:266 (0x463526)
(*pollServer).WaitRead: err := s.AddFD(fd, 'r')
/home/bradfitz/go/src/pkg/net/fd.go:428 (0x4642bb)
(*netFD).Read: if err = pollserver.WaitRead(fd); err == nil {
/home/bradfitz/go/src/pkg/net/tcpsock_posix.go:87 (0x472415)
(*TCPConn).Read: return c.fd.Read(b)
/home/bradfitz/go/src/pkg/io/io.go:394 (0x459cd9)
(*LimitedReader).Read: n, err = l.R.Read(p)
/home/bradfitz/go/src/pkg/bufio/bufio.go:77 (0x49d57d)
(*Reader).fill: n, e := b.rd.Read(b.buf[b.w:])
/home/bradfitz/go/src/pkg/bufio/bufio.go:257 (0x49dfbf)
(*Reader).ReadSlice: b.fill()
/home/bradfitz/go/src/pkg/bufio/bufio.go:283 (0x49e124)
(*Reader).ReadLine: line, err = b.ReadSlice('\n')
/home/bradfitz/go/src/pkg/net/textproto/reader.go:55 (0x4a7169)
(*Reader).readLineSlice: l, more, err := r.R.ReadLine()
/home/bradfitz/go/src/pkg/net/textproto/reader.go:36 (0x4a6f91)
(*Reader).ReadLine: line, err := r.readLineSlice()
/home/bradfitz/go/src/pkg/net/http/request.go:457 (0x42509b)
ReadRequest: if s, err = tp.ReadLine(); err != nil {
/home/bradfitz/go/src/pkg/net/http/server.go:240 (0x428200)
(*conn).readRequest: if req, err = ReadRequest(c.buf.Reader); err != nil {
/home/bradfitz/go/src/pkg/net/http/server.go:594 (0x42a293)
(*conn).serve: w, err := c.readRequest()
/home/bradfitz/go/src/pkg/runtime/proc.c:271 (0x4129fc)
goexit: runtime·goexit(void)
@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 1:

Is the suggestion that you want to get this error returned from Read? Sounds reasonable
to me.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 2:

Is the suggestion that you want to get this error returned from Read? Sounds reasonable
to me.
@rsc

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2012

Comment 3:

Labels changed: added go1.1.

@davecheney

This comment has been minimized.

Copy link
Contributor

commented Oct 15, 2012

Comment 4:

Owner changed to @davecheney.

Status changed to Started.

@davecheney

This comment has been minimized.

Copy link
Contributor

commented Oct 15, 2012

@davecheney

This comment has been minimized.

Copy link
Contributor

commented Oct 16, 2012

Comment 6:

This issue was closed by revision 8c2b131.

Status changed to Fixed.

@bradfitz bradfitz added fixed labels Oct 16, 2012

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015

@rsc rsc removed the go1.1 label Apr 14, 2015

@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.
You can’t perform that action at this time.