Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2001 13:04:52 -0800 (PST)
From:      Archie Cobbs <archie@dellroad.org>
To:        Trond Davidsen <trond.davidsen@ii.uib.no>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Mpd with a large number, 200+ , of bundles
Message-ID:  <200111142104.fAEL4qd63013@arch20m.dellroad.org>
In-Reply-To: <3BF299DB.2080607@ii.uib.no> "from Trond Davidsen at Nov 14, 2001 05:20:43 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Trond Davidsen writes:
> > If you can get mpd into a state where "kill -9" doesn't kill it,
> > then that seems like a kernel bug to me, and so we should probably
> > hone in on that first..  maybe we can come up with a simple test
> > case, e.g. using the event library debug output, write a program
> > that opens the same number of file descriptors, pipes, etc. and
> > registers the same event handlers, etc..
> 
> I think I've got a solution, insert '#define FD_SETSIZE 2048' at the top 
> of 'event.c', over '#include <sys/types.h>'.  This seems to solve the 
> problem for me, for now :)

Ah, good sleuthing!

You might also want to apply the patch below as a safety measure.

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

Index: event.c
===================================================================
RCS file: /home/cvs/archie/mpd/src/event.c,v
retrieving revision 1.2
diff -u -r1.2 event.c
--- event.c	2001/06/16 05:07:55	1.2
+++ event.c	2001/11/14 21:04:24
@@ -444,6 +444,8 @@
     case EVENT_READ:
     case EVENT_WRITE:
     case EVENT_EXCEPTION:
+      bad = (val < 0) || val >= FD_SETSIZE;
+      break;
     case EVENT_TIMEOUT:
       bad = (val < 0);
       break;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111142104.fAEL4qd63013>