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: Thu, 30 Oct 2003 15:36:20 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.56.0310301534330.1136@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
>
> I've added the debug to the end of this message.
>
> If I modify the code so there are several 'child' processes, all
> monitoring the same sockets with their own epolls, they all seem to get
> the same results from epoll_wait().
>
> > > Also, it shouldn't change a whit, but are you able to try on a x86 UP?
>
> On a UP x86, 2.6.0-test9, I can't reproduce the problem at all.
Could you try to poison the event buffer before an epoll_wait() to see how
many bytes are effectively written by the function?
memset(events, 'e', num * sizeof(epoll_event));
- Davide
next prev parent reply other threads:[~2003-10-30 23:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-29 15:00 epoll gives broken results when interrupted with a signal 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 [this message]
2003-11-03 11:07 ` Ben Mansell
2003-10-31 23:00 ` Davide Libenzi
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.0310301534330.1136@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;
as well as URLs for NNTP newsgroup(s).