POSIX signal queue overflow bug

From: Chuck Lever (cel@monkey.org)
Date: Tue Jun 06 2000 - 15:22:59 EST


hi all-

i've been playing with zab's web server, and discovered that when the
Posix RT signal queue overflows, no signal is raised. the kernel is
supposed to raise SIGIO when the queue overflows.

looking at kernel/signal.c, it appears that an overflow signal will only
happen if si_code is one of the kernel-generated signals. unfortunately
for applications like zab's server, even though these are
"kernel-generated" signals, si_code is positive for all the signals it
queues (POLL_IN, and so on, are all positive).

here's a suggested patch to 2.4.0-pre that fixes the bug. can anyone see
a problem with this? there is no MAINTAINER listed for this specific area
of the kernel, so i'm posting here.

--- kernel/signal.c.orig Fri May 26 15:46:55 2000
+++ kernel/signal.c Tue Jun 6 16:09:38 2000
@@ -375,7 +375,7 @@
                                 break;
                 }
         } else if (sig >= SIGRTMIN && info && (unsigned long)info != 1
- && info->si_code < 0) {
+ && info->si_code != SI_USER) {
                 /*
                  * Queue overflow, abort. We may abort if the signal was rt
                  * and sent by user using something other than kill().

        - Chuck Lever

--
corporate:	<chuckl@netscape.com>
personal:	<chucklever@bigfoot.com>

The Linux Scalability project: http://www.citi.umich.edu/projects/linux-scalability/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:26 EST