From owner-freebsd-current@FreeBSD.ORG Wed Sep 1 23:56:58 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 28FD316A4CE for ; Wed, 1 Sep 2004 23:56:58 +0000 (GMT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF66843D45 for ; Wed, 1 Sep 2004 23:56:57 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 30548 invoked from network); 1 Sep 2004 23:56:57 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 1 Sep 2004 23:56:57 -0000 Received: from hydrogen.funkthat.com (vkbczg@localhost.funkthat.com [127.0.0.1])i81NutuU087783; Wed, 1 Sep 2004 16:56:56 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i81Nusi7087782; Wed, 1 Sep 2004 16:56:54 -0700 (PDT) Date: Wed, 1 Sep 2004 16:56:54 -0700 From: John-Mark Gurney To: Igor Sysoev Message-ID: <20040901235654.GG29902@funkthat.com> Mail-Followup-To: Igor Sysoev , freebsd-current@freebsd.org References: <20040901144705.K97970@is.park.rambler.ru> <20040901155304.GD29902@funkthat.com> <20040901173757.GF29902@funkthat.com> <20040901224828.Q97970@is.park.rambler.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040901224828.Q97970@is.park.rambler.ru> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-current@freebsd.org Subject: Re: panic caused by EVFILT_SIGNAL detaching in rfork()ed thread X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 23:56:58 -0000 Igor Sysoev wrote this message on Wed, Sep 01, 2004 at 23:07 +0400: > On Wed, 1 Sep 2004, John-Mark Gurney wrote: > > > > > The problem is some how that the knote is being removed from the list > > > > (or was never on the list), but not being marked detached... > > > > > > > > Hmmm. what are the options you are using for rfork? > > > > > > The worker process starts two worker threads created by > > > rfork(RFPROC|RFTHREAD|RFMEM). Each thread opens kqueue and > > > adds the EVFILT_SIGNAL event. > > > > > > If you like I can send to you the source tarball (I do not distribute > > > the server right now, because it has not the documentation). The build > > > process is simple. Then you need to press ^C and you will get the panic. > > > > I believe this panic may be possible w/o rfork, but I'm not possitive.. > > It's probably an artifact of the fact that the kq was living longer > > than the proc that had the signal kevent associated with it, which > > normally does not happen... > > > > Attached is a patch.. And let me know if it fixes your panic... > > The patch fixed the panic (I tested on 5.3-BETA2, GENERIC, SMP, HTT, > SCHED_ULE). Thank you. Could you make the similar patch for 4.x ? I'm not familar enough with kqueue in 4.x, so I would just add a similar if (kn->kn_status & KN_DETACHED) return; to the filt_sigdetach function like the other detach functions... > And one more, could you rename http://people.freebsd.org/~jmg/kqueue.man.html > into kqueue_preliminary.man.html and place a modern (or at least from > 4.1-RELEASE) kqueue man page in kqueue.man.html ? Google shows your > man page at first position and it confuses people. I saw several times > when people said that kqueue has the incompatible interface between BSDs > and even between various FreeBSD verisons referring to this man page. I've renamed it, but I will send admins an email to try to add a redirect so that broken links won't plauge the net... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."