From owner-freebsd-hackers Tue Apr 24 9:16:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 4C99A37B422; Tue, 24 Apr 2001 09:16:50 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3OGGoi07288; Tue, 24 Apr 2001 09:16:50 -0700 (PDT) Date: Tue, 24 Apr 2001 09:16:50 -0700 From: Alfred Perlstein To: "Brian F. Feldman" Cc: hackers@FreeBSD.ORG Subject: Re: Anyone know of RFMEM vm/sysv_shm.c-related races? Message-ID: <20010424091650.L1790@fw.wintelcom.net> References: <200104241207.f3OC7F159738@green.bikeshed.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104241207.f3OC7F159738@green.bikeshed.org>; from green@FreeBSD.ORG on Tue, Apr 24, 2001 at 08:07:14AM -0400 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Brian F. Feldman [010424 05:07] wrote: > In some way, using Linux LinuxThreads programs that use shared memory, I've > ended up with dozens of shared memory segments that reportedly still have 1 > attachment (which I'm really darn certain is impossible since I've killed > _everything_ in sight). I think something must have happened that for some > reason shmexit() was not called on process exit, vm_shm refcnt was increased > too many times, vm_shm refcnt was not decreased enough times... whatever the > case, there may be an old vmspace just floating around stranded, or just a > simple bug with vm_shm... > > Does anyone have any clues about races or weird issues in this area? It's > pretty exasperating to not be able to figure this one out. I don't > immediately see any obvious races after half an hour of searching (since it > appears all calls that can modify vmspace directly require Giant being held). sysv_shm registers atexit and atfork handlers, perhaps you can stick some debugging code in there? -- -Alfred Perlstein - [alfred@freebsd.org] Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message