From owner-freebsd-current Tue Jan 6 18:57:49 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA27491 for current-outgoing; Tue, 6 Jan 1998 18:57:49 -0800 (PST) (envelope-from owner-freebsd-current) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA27459 for ; Tue, 6 Jan 1998 18:57:14 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id NAA20779; Wed, 7 Jan 1998 13:50:21 +1100 Date: Wed, 7 Jan 1998 13:50:21 +1100 From: Bruce Evans Message-Id: <199801070250.NAA20779@godzilla.zeta.org.au> To: freebsd-current@FreeBSD.ORG, pb@fasterix.freenix.org Subject: Re: funny ETXTBSY problem Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >$ cp /bin/sh /tmp >$ echo echo hello there | /tmp/sh >hello there >$ cp /bin/sh /tmp >cp: /tmp/sh: Text file busy > >I noticed this after applying the patches John Dyson committed >today but that's apparently not where the problem comes from, as >this works with yesterday's kernel too... I can't say if it >works with a kernel older than last 20 December. It was broken by the Dec 28 vm/vnode changes. The VTEXT flag was cleared in vnode_object_deallocate() and vnode_pager_dealloc(), but the changes stopped the vnode's object being from being deallocated when the last references to the vnode went away, so it didn't go away until the object cache thrashed enough. I reported this to John, so it should be fixed now. Hmmm, it wasn't quite right before either. A reference not related to exec keeps the VTEXT flag set after the exec image is no longer in use: # od /usr/bin/gdb | more ^Z # gdb