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: bug in new pollserver code #3030

Closed
rsc opened this issue Feb 15, 2012 · 4 comments
Closed

net: bug in new pollserver code #3030

rsc opened this issue Feb 15, 2012 · 4 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 15, 2012

---------- Forwarded message ----------
From: Brad Fitzpatrick <bradfitz@golang.org>
Date: Wed, Feb 15, 2012 at 00:09
Subject: unexpected wakeup
To: Russ Cox <rsc@golang.org>


New bug?

$ go test -short
Epoll unexpected fd=73
pollServer: unexpected wakeup for fd=73 mode=r
PASS
ok      net/http        2.105s
@davecheney
Copy link
Contributor

Comment 1:

I can reproduce this on darwin (10.7.3) and linux (amd64), sometimes. 
The warning appears to occur during this test
=== RUN TestRequestBodyLimit
pollServer: unexpected wakeup for fd=73 mode=r
If that is of any help.

@mikioh
Copy link
Contributor

mikioh commented Feb 22, 2012

Comment 2:

I just had a look at fd.go and fd_darwin.go behavior using print.
--- PASS: TestRequestLimit (0.26 seconds)
=== RUN TestRequestBodyLimit
put fd:4    key:8   depth:47
put fd:73   key:147 depth:48
get-lookupfd    fd:73   key:147 depth:47
get-lookupfd    fd:4    key:8   depth:46
put fd:73   key:146 depth:47
put fd:4    key:8   depth:48
(snip)
get-evict-r fd:73   key:146 depth:47
get-evict-r fd:4    key:8   depth:46
panic: pollServer: unexpected wakeup for fd=73 mode=r
Looks like:
- New pollServer.Evict calls pollster.DelFD
- pollster.DelFD deletes existing events
- But a kernel sometimes notifies ex-pending fd's event (in this case fd:73)
Perhaps we can drop a print line just after LookFD in pollServer.Run.

@rsc
Copy link
Contributor Author

rsc commented Feb 22, 2012

Comment 3:

Thanks for this trace.  I believe now that the print is harmless.
I'll take it out.

@rsc
Copy link
Contributor Author

rsc commented Feb 22, 2012

Comment 4:

This issue was closed by revision 213997a.

Status changed to Fixed.

@rsc rsc added fixed labels Feb 22, 2012
@rsc rsc self-assigned this Feb 22, 2012
@rsc rsc added this to the Go1 milestone Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
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

4 participants