From owner-freebsd-current Sun Mar 5 13:43:43 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA01382 for current-outgoing; Sun, 5 Mar 1995 13:43:43 -0800 Received: from Root.COM (implode.Root.COM [198.145.90.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA01360 for ; Sun, 5 Mar 1995 13:43:35 -0800 Received: from corbin.Root.COM (corbin.Root.COM [198.145.90.18]) by Root.COM (8.6.8/8.6.5) with ESMTP id NAA01139; Sun, 5 Mar 1995 13:43:14 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.9/8.6.5) with SMTP id NAA00266; Sun, 5 Mar 1995 13:43:13 -0800 Message-Id: <199503052143.NAA00266@corbin.Root.COM> X-Authentication-Warning: corbin.Root.COM: Host localhost didn't use HELO protocol To: Mark Murray cc: Poul-Henning Kamp , jhay@mikom.csir.co.za, current@FreeBSD.org Subject: Re: "Text file busy" with program not running anymore? In-reply-to: Your message of "Sun, 05 Mar 95 22:20:23 +0200." <199503052020.WAA07809@grunt.grondar.za> From: David Greenman Reply-To: davidg@Root.COM Date: Sun, 05 Mar 1995 13:43:13 -0800 Sender: current-owner@FreeBSD.org Precedence: bulk >> It is expected. Whenever a file is executed, the VTEXT flag is set on the >> vnode to indicate that someone is executing it. The flag remains set until >> there are no references to it and it is no longer cached. In your case, it >> lingered in the cache. It never 'times out' - the cached vnodes are replacede >> with other cached vnodes - so it will only get out of the cache if there is >> activity on the system to flush it out. >> It's conceivable that there could be a count instead of a flag...but this >> complicates things quite a bit and I don't see the point in it. Just rm the >> file first. > >This smells like trouble to me. What happens during a "cd /usr/src; make all; >make install"? install unlinks the target first. > What will happen to the open shared libraries? They get unlinked. They stay around until the last process that has them open unmaps them. > In the last >couple of days I get panics at the library install phase of make world (sure >it may be something else, but I am as suspicious as hell). I doubt this is related. >> Wouldn't the right thing be to flush it if it is opened for write ? I just read Poul saying the same thing - you mean if the VTEXT flag is on and somebody attempts to open it for write? Actually, now that I think about it, the thing to do is to shut off the VTEXT flag when the object reference count goes to 0...I thought we already did that...but we don't. This should completely solve the problem. I'll add it to my whiteboard. >Again - what happens to shared libraries? The VTEXT flag is only set on exec()'d files. Shared libraries aren't exec()'d. If you clobber the data in a shared library file, any processes which are currently using them will likely die. ...but install unlinks the target first, so this should happen. -DG