Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: bug in new pollserver code #3030
---------- Forwarded message ---------- From: Brad Fitzpatrick <email@example.com> Date: Wed, Feb 15, 2012 at 00:09 Subject: unexpected wakeup To: Russ Cox <firstname.lastname@example.org> New bug? $ go test -short Epoll unexpected fd=73 pollServer: unexpected wakeup for fd=73 mode=r PASS ok net/http 2.105s
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.