Date: Sun, 05 Mar 1995 13:43:13 -0800 From: David Greenman <davidg@Root.COM> To: Mark Murray <mark@grondar.za> Cc: Poul-Henning Kamp <phk@ref.tfs.com>, jhay@mikom.csir.co.za, current@FreeBSD.org Subject: Re: "Text file busy" with program not running anymore? Message-ID: <199503052143.NAA00266@corbin.Root.COM> In-Reply-To: Your message of "Sun, 05 Mar 95 22:20:23 %2B0200." <199503052020.WAA07809@grunt.grondar.za>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503052143.NAA00266>