From: Davide Libenzi <davidel@xmailserver.org>
To: Ben Mansell <ben@zeus.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: epoll gives broken results when interrupted with a signal
Date: Fri, 31 Oct 2003 15:00:15 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.56.0310311456180.1028@bigblue.dev.mdolabs.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0310301425090.1597@stones.cam.zeus.com>
On Thu, 30 Oct 2003, Ben Mansell wrote:
> On Thu, 30 Oct 2003, Ben Mansell wrote:
>
> > On Wed, 29 Oct 2003, Davide Libenzi wrote:
> >
> > > Can you try the patch below and show me a dmesg when this happen?
> >
> > Ok, patch applied. (I changed DEBUG_EPOLL to 10 however, otherwise
> > nothing would be printed). Now, epoll appears to behave perfectly and I
> > can't re-create the problem :(
>
> Got it! I was missing the problem because I had removed some debug
> messages in my own code. Here's another run, this time the
> final epoll_wait() call of the child process brings back 2 events:
> Event 0 fd: 7 events: 17
> Event 1 fd: -2095926561 events: 0
It is really strage. If you look what epoll sees:
> [0000010002ba7520] eventpoll: polling file=00000100099822c0 ep=000001001f928000 epi=000001000d9c6a80
> [0000010002ba7520] eventpoll: pollres file=00000100099822c0 ep=000001001f928000 epi=000001000d9c6a80 events=17
> [0000010002ba7520] eventpoll: polling file=000001000615d980 ep=000001001f928000 epi=000001000d9c69c0
> [0000010002ba7520] eventpoll: pollres file=000001000615d980 ep=000001001f928000 epi=000001000d9c69c0 events=16
> [0000010002ba7520] eventpoll: sys_epoll_wait(3, 000000000073e390, 32, 1000) = 2
> [0000010002ba7520] eventpoll: eventpoll_release_file(00000100099822c0)
> [0000010002ba7520] eventpoll: remove ep=000001001f928000 epi=000001000d9c6a80
> [0000010002ba7520] eventpoll: ep_unlink(000001001f928000, 00000100099822c0) = 0
> [0000010002ba7520] eventpoll: ep_remove(000001001f928000, 00000100099822c0) = 0
> [0000010002ba7520] eventpoll: eventpoll_release_file(000001000615d980)
> [0000010002ba7520] eventpoll: remove ep=000001001f928000 epi=000001000d9c69c0
> [0000010002ba7520] eventpoll: ep_unlink(000001001f928000, 000001000615d980) = 0
> [0000010002ba7520] eventpoll: ep_remove(000001001f928000, 000001000615d980) = 0
> [0000010002ba7520] eventpoll: close() ep=000001001f928000
It clearly sees two events with masks 16 and 17. And at this points events
are already inside a buffer ready to be pushed to usespace with a
copy_to_user().
- Davide
prev parent reply other threads:[~2003-10-31 23:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-29 15:00 Ben Mansell
2003-10-29 17:26 ` Davide Libenzi
2003-10-29 17:38 ` Ben Mansell
2003-10-29 19:23 ` Davide Libenzi
2003-10-30 11:22 ` Ben Mansell
2003-10-30 14:48 ` Ben Mansell
2003-10-30 23:36 ` Davide Libenzi
2003-11-03 11:07 ` Ben Mansell
2003-10-31 23:00 ` Davide Libenzi [this message]
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=Pine.LNX.4.56.0310311456180.1028@bigblue.dev.mdolabs.com \
--to=davidel@xmailserver.org \
--cc=ben@zeus.com \
--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®