From: kyle@pbx.org
To: Davide Libenzi <davidel@xmailserver.org>
Cc: linux-kernel@vger.kernel.org
Subject: accept()ing socket connections with level triggered epoll
Date: Wed, 26 Apr 2006 14:55:57 -0600 [thread overview]
Message-ID: <20060426205557.GA5483@www.t3inc.us> (raw)
Hello,
I think I may have found a bug in Linux's implementation of epoll. My
program creates a server socket that listens for incoming SOCK_STREAM
connections. It uses epoll to wait for notification of a new connection
(and also to handle the client sockets). While the client sockets use edge
triggered epoll, for performance reasons, the server socket uses level
triggered epoll.
I have found that when I open connections to my program very quickly, it is
sometimes possible to call accept more than once before reaching the point
where no more connections are available and EAGAIN is returned. If I return
to epoll_wait without accepting all of the available connections, I should
immediately be notified that a read is still available on the server socket,
since I am using level triggered epoll for that descriptor (at least that is
my understanding of how all of this is supposed to work ;). However, epoll
does not make this notification. Even if the program accepts further
incoming connections, the missed connection is never accepted, and
eventually times out on the client side.
Kernel version is 2.6.9. I can provide test code if needed.
Thanks,
Kyle Cronan
<kyle@pbx.org>
next reply other threads:[~2006-04-26 20:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-26 20:55 kyle [this message]
2006-04-26 21:11 ` Heikki Orsila
2006-04-26 21:14 ` Davide Libenzi
2006-04-27 0:05 ` kyle
2006-04-27 4:07 ` Willy Tarreau
2006-04-26 21:20 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060426205557.GA5483@www.t3inc.us \
--to=kyle@pbx.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®