All of lore.kernel.org
 help / color / mirror / Atom feed
* epoll and closed file descriptors
@ 2009-09-16 23:22 Gilad Benjamini
  2009-09-17  0:07 ` Davide Libenzi
  0 siblings, 1 reply; 10+ messages in thread
From: Gilad Benjamini @ 2009-09-16 23:22 UTC (permalink / raw)
  To: linux-kernel

I am running repeatedly into a scenario  where epoll notifies userland of
events on a closed file descriptor.
I am running a single thread application, on a single CPU machine so
multiple threads isn't the issue. 

A sample set of events that I have seen
- File descriptor (13) for a socket is closed
- epoll_wait returns with no events.
- Several epoll related calls happen
- More than 20 seconds after the "close", epoll_wait finds an event on fd 13
with EPOLLIN|EPOLLERR|EPOLLHUP.
- epoll_wait continues to report this event

Running kernel 2.6.24. Some technical problems are preventing me from trying
a newer kernel at the moment.

One more thing worth mentioning: the application uses libcurl, leading to a
situation where the file is closed before the descriptor was removed from
the epoll descriptor. The code should be able to handle that AFAIK.

Any ideas would be appreciated.
Gilad



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-17  0:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 23:22 epoll and closed file descriptors Gilad Benjamini
2009-09-17  0:07 ` Davide Libenzi
2009-09-17  0:23   ` Gilad Benjamini
2009-09-17  0:28     ` Bryan Donlan
2009-09-17  0:30     ` Davide Libenzi
2009-09-17  0:40       ` Gilad Benjamini
2009-09-17  0:45         ` Bryan Donlan
2009-09-17  0:53           ` Gilad Benjamini
2009-09-17  0:57             ` Bryan Donlan
2009-09-17  0:55         ` Davide Libenzi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.