From owner-freebsd-stable@FreeBSD.ORG Mon Apr 3 04:24:09 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6045F16A41F; Mon, 3 Apr 2006 04:24:09 +0000 (UTC) (envelope-from scrappy@postgresql.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id D146443D46; Mon, 3 Apr 2006 04:24:08 +0000 (GMT) (envelope-from scrappy@postgresql.org) Received: from localhost (av.hub.org [200.46.204.144]) by hub.org (Postfix) with ESMTP id 6E62D823A65; Mon, 3 Apr 2006 01:24:07 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15915-08; Mon, 3 Apr 2006 01:24:08 -0300 (ADT) Received: from ganymede.hub.org (blk-222-82-85.eastlink.ca [24.222.82.85]) by hub.org (Postfix) with ESMTP id 6CB05823A6B; Mon, 3 Apr 2006 01:24:06 -0300 (ADT) Received: by ganymede.hub.org (Postfix, from userid 1000) id CA4063BDBA; Mon, 3 Apr 2006 01:23:59 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id C65533A43F; Mon, 3 Apr 2006 01:23:59 -0300 (ADT) Date: Mon, 3 Apr 2006 01:23:59 -0300 (ADT) From: "Marc G. Fournier" X-X-Sender: scrappy@ganymede.hub.org To: Andrew Thompson In-Reply-To: <20060403035911.GA76193@heff.fud.org.nz> Message-ID: <20060403011401.I947@ganymede.hub.org> References: <20060402231232.C947@ganymede.hub.org> <27148.1144030940@sss.pgh.pa.us> <20060402232832.M947@ganymede.hub.org> <20060402234459.Y947@ganymede.hub.org> <27417.1144033691@sss.pgh.pa.us> <20060403031157.GA57914@xor.obsecurity.org> <27515.1144034269@sss.pgh.pa.us> <20060403032130.GA58053@xor.obsecurity.org> <20060403002830.W947@ganymede.hub.org> <20060403034101.GA58429@xor.obsecurity.org> <20060403035911.GA76193@heff.fud.org.nz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org Cc: freebsd-stable@freebsd.org, Kris Kennaway Subject: Re: [HACKERS] semaphore usage "port based"? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Apr 2006 04:24:09 -0000 taking it off of pgsql-hackers, so that we don't annoy them unnecessarily ... 'k, looking at the code, not that most of it doesn't go over my head ... but ... in kern/kern_jail.c, I can see the prison_check() call ... wouldn't one want to make the change a bit further up? say in kern_prot.c? wouldn't you want to change just cr_cansignal() to allow *just* for 'case 0', when someone is just checking to see if a process is already running? I wouldn't want to be able to SIGKILL the process from a different jail, mind you ... maybe move the check for SIG0 to just before the prison_check, since, unless I'm missing something, other then determining that a process is, in fact, running, SIG0 is a benign signal? On Mon, 3 Apr 2006, Andrew Thompson wrote: > On Sun, Apr 02, 2006 at 11:41:01PM -0400, Kris Kennaway wrote: >> On Mon, Apr 03, 2006 at 12:30:58AM -0300, Marc G. Fournier wrote: >>> 'k, but how do I fix kill so that it has the proper behaviour if SysV is >>> enabled? >> >> Check the source, perhaps there's already a way. If not, talk to >> whoever made the change. >> >>> Maybe a mount option for procfs that allows for pre-5.x >>> behaviour? >> >> procfs has nothing to do with this though. >> >>> I'm not the first one to point out that this is a problem, just >>> the first to follow it through to the cause ;( And I believe there is >>> more then just PostgreSQL that is affected by shared memory (ie. apache2 >>> needs SysV IPC enabled, so anyone doing that in a jail has it enabled >>> also) ... >> >> Also note that SysV IPC is not the problem here, it's the change in >> the behaviour of kill() that is causing postgresql to become confused. >> That's what you should investigate. > > The ESRCH error is being returned from prison_check(), that would be a > good starting place. > > > Andrew > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > > ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664