linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Wed, 29 Oct 2003 11:23:53 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.56.0310291121560.973@bigblue.dev.mdolabs.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0310291729310.2982@stones.cam.zeus.com>

On Wed, 29 Oct 2003, Ben Mansell wrote:

> UP machine - x86_64 however, if that makes any difference (sorry, my
> initial message didn't contain much information, as I wasn't sure what
> was relevant and what was not). The descriptor is passed over the unix
> domain socket between the two processes.
>
> I'm willing to try any debug patch that might help track down the
> problem.

Can you try the patch below and show me a dmesg when this happen?
Also, it shouldn't change a whit, but are you able to try on a x86 UP?



- Davide



diff -Nru linux-2.6.0-test9.vanilla/fs/eventpoll.c linux-2.6.0-test9.mod/fs/eventpoll.c
--- linux-2.6.0-test9.vanilla/fs/eventpoll.c	2003-10-25 11:43:26.000000000 -0700
+++ linux-2.6.0-test9.mod/fs/eventpoll.c	2003-10-29 11:21:27.849490320 -0800
@@ -75,7 +75,7 @@

 #define EVENTPOLLFS_MAGIC 0x03111965 /* My birthday should work for this :) */

-#define DEBUG_EPOLL 0
+#define DEBUG_EPOLL 1

 #if DEBUG_EPOLL > 0
 #define DPRINTK(x) printk x
@@ -462,6 +462,9 @@
 	struct eventpoll *ep;
 	struct epitem *epi;

+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: eventpoll_release_file(%p)\n",
+		     current, file));
+
 	/*
 	 * We don't want to get "file->f_ep_lock" because it is not
 	 * necessary. It is not necessary because we're in the "struct file"
@@ -478,6 +481,10 @@

 		ep = epi->ep;
 		EP_LIST_DEL(&epi->fllink);
+
+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: remove ep=%p epi=%p\n",
+			     current, ep, epi));
+
 		down_write(&ep->sem);
 		ep_remove(ep, epi);
 		up_write(&ep->sem);
@@ -1432,6 +1439,9 @@
 	list_for_each(lnk, txlist) {
 		epi = list_entry(lnk, struct epitem, txlink);

+		DNPRINTK(3, (KERN_INFO "[%p] eventpoll: polling file=%p ep=%p epi=%p\n",
+			     current, epi->file, ep, epi));
+
 		/*
 		 * Get the ready file event set. We can safely use the file
 		 * because we are holding the "sem" in read and this will
@@ -1447,6 +1457,9 @@
 		epi->revents = revents & epi->event.events;

 		if (epi->revents) {
+			DNPRINTK(3, (KERN_INFO "[%p] eventpoll: pollres file=%p ep=%p epi=%p events=%u\n",
+				     current, epi->file, ep, epi, epi->revents));
+
 			event[eventbuf] = epi->event;
 			event[eventbuf].events &= revents;
 			eventbuf++;

  reply	other threads:[~2003-10-29 19:24 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 [this message]
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

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.0310291121560.973@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).