From owner-freebsd-hackers Tue Apr 9 3:45:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from imr1.aus.deuba.com (bagheera.aus.deuba.com [203.0.62.7]) by hub.freebsd.org (Postfix) with ESMTP id 6177A37B400 for ; Tue, 9 Apr 2002 03:45:50 -0700 (PDT) Received: from imr1.aus.deuba.com by imr1.aus.deuba.com id g39AjmFm028678; Tue, 9 Apr 2002 20:45:48 +1000 (EST) Received: from merton.aus.deuba.com by imr1.aus.deuba.com id g39AjlU8028671; Tue, 9 Apr 2002 20:45:47 +1000 (EST) Received: (qmail 18635 invoked by uid 107); 9 Apr 2002 10:45:47 -0000 Message-ID: <20020409104547.18634.qmail@merton.aus.deuba.com> From: callum.gibson@db.com Subject: Re: ipcrm/shmctl failure To: tlambert2@mindspring.com Date: Tue, 9 Apr 2002 20:45:47 +1000 (EST) Cc: andrew@ugh.net.au, hackers@freebsd.org In-Reply-To: <3CB2A92E.CFABF7C9@mindspring.com> from "tlambert2@mindspring.com" at Apr 09, 2002 01:41:18 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG tlambert2@mindspring.com writes: }I believe this will give incorrect information, as it's pretty }obvious that any bug here has to be in the Linux ABI treatment }of the _exit() resource tracking cleanup of the segments when a }proce (or "Linux thread") exits. The information "-p" gives is }the last access. However, if what has happened is that all the }programs have been stopped, and the reference count was not }decremented by the Linux ABI code, then the last reference you }will see is the already exited X server. There are definitely no live processes accessing any shared memory when I try to ipcrm them. Your argument is convincing but... I'm surprised that "Invalid argument" is the error. I would have thought something like EBUSY would be more appropriate (remember this is happening with a shmctl(IPC_RMID) call as well). In fact, looking at the source EINVAL is only returned if the args to shmsys are invalid or the shmid can't be found. I can see them with ipcs -m, I can't remove them. I don't think EINVAL is the right error, even if the reference count is stuffed up by the Linux emulator. There has to be something else going on. I don't get EPERM or EACCES, nor does the operation appear to complete successfully but leave the shms behind (as you might expect with a bad reference count) - I get EINVAL. Hmmm.... Please don't make me use the kernel debugger... waahhhh C Callum Gibson callum.gibson@db.com Global Markets IT, Deutsche Bank, Australia 61 2 9258 1620 ### The opinions in this message are mine and not Deutsche's ### To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message