netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Max Neunhoeffer <max@arangodb.com>
Cc: netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: epoll_wait misses edge-triggered eventfd events: bug in Linux 5.3 and 5.4
Date: Sat, 1 Feb 2020 12:16:47 -0800	[thread overview]
Message-ID: <20200201121647.62914697@cakuba.hsd1.ca.comcast.net> (raw)
In-Reply-To: <20200131135730.ezwtgxddjpuczpwy@tux>

On Fri, 31 Jan 2020 14:57:30 +0100, Max Neunhoeffer wrote:
> Dear All,
> 
> I believe I have found a bug in Linux 5.3 and 5.4 in epoll_wait/epoll_ctl
> when an eventfd together with edge-triggered or the EPOLLONESHOT policy
> is used. If an epoll_ctl call to rearm the eventfd happens approximately
> at the same time as the epoll_wait goes to sleep, the event can be lost, 
> even though proper protection through a mutex is employed.
> 
> The details together with two programs showing the problem can be found
> here:
> 
>   https://bugzilla.kernel.org/show_bug.cgi?id=205933
> 
> Older kernels seem not to have this problem, although I did not test all
> versions. I know that 4.15 and 5.0 do not show the problem.
> 
> Note that this method of using epoll_wait/eventfd is used by
> boost::asio to wake up event loops in case a new completion handler
> is posted to an io_service, so this is probably relevant for many
> applications.
> 
> Any help with this would be appreciated.

Could be networking related but let's CC FS folks just in case.

Would you be able to perform bisection to narrow down the search 
for a buggy change?

  reply	other threads:[~2020-02-01 20:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31 13:57 epoll_wait misses edge-triggered eventfd events: bug in Linux 5.3 and 5.4 Max Neunhoeffer
2020-02-01 20:16 ` Jakub Kicinski [this message]
2020-02-03 15:15   ` Max Neunhoeffer
2020-02-03 16:48     ` Jakub Kicinski
2020-02-03 17:33     ` Roman Penyaev
2020-02-03 21:03       ` Max Neunhöffer
2020-02-04 10:35         ` Roman Penyaev

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=20200201121647.62914697@cakuba.hsd1.ca.comcast.net \
    --to=kuba@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@arangodb.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).