Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Text file busy" error - AIX 4.1.4

1,195 views
Skip to first unread message

Bob Dushok

unread,
Jan 27, 1997, 3:00:00 AM1/27/97
to

I'm using AIX 4.1.4 on an RS/6000 43P. Some users of the system
complain that they regularly get the message "text file busy" when
attempting to access files within their account, expecially when
attempting to delete a file.

Yesterday, I encountered the same error when attempting to copy a file
that I owned, no one else had the permissions to access this file.

Does anyone know what causes this error or how I may fix it?

Thank you,
Bob

Mirco Zanutto

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to
I think you're trying to delete a file containing a running program or
shared library; try to run /etc/slibclean to remove unused shared
libraries and obiects from the shared library region.

Anton Dischner

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

Hi Bob,

i get this message if i try to delete/overwrite a programm that is in
use/running. Double check with ps -efl|grep <filename>.
Maybe the file is opened with an editor.
The PD program lsof which lists open files maybe helpful.
On my systems there was no condition with a message like this without cause.

Hope that helps,

Toni

PS: I use AIX 3.2.x

In article <32ED55...@luzerne.edu>, Bob Dushok <ro...@luzerne.edu> wrote:

> I'm using AIX 4.1.4 on an RS/6000 43P. Some users of the system
> complain that they regularly get the message "text file busy" when
> attempting to access files within their account, expecially when
> attempting to delete a file.
>
> Yesterday, I encountered the same error when attempting to copy a file
> that I owned, no one else had the permissions to access this file.
>
> Does anyone know what causes this error or how I may fix it?
>
> Thank you,
> Bob

--
A. Dischner, SGI&AIX sysadmin, Oracle DBA | Don't let friends
Institut fuer Klinische Chemie | use WinDose
Klinikum Grosshadern | Just say NO.
Ludwig Maximilians Universitaet Muenchen, GER |
Marchioninistr.15 81366 Muenchen 49-89-70953202 |

Jack Gostl

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

>Does anyone know what causes this error or how I may fix it?

Try using the fuser command. This will tell you who has the file open.
You can work you way forward from there.

--

Jack Gostl go...@argoscomp.com


Graham Reed

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

"G. Andrew Kephart" <akep...@austin.ibm.com> writes:

> This occurs when the file has been loaded into process memory,
> e.g. has been executed and is currently running. To remove the file,
> kill the process.
>
> For example, if you wanted to replace ftpd, you'd have to make sure
> there were no ftpd's running (at least from the path of the one you'd
> like to remove/replace).

This only matters if you try to open a loaded file for writing. (This
also includes ar libraries containing shared objects and so on.)

If you want to replace the file, you can delete it before trying to
write it, and that should work. The space on disk won't be reclaimed
until all processes close the file, but the directory entry will be
removed.

Problems can occur with shared libraries--the old, loaded version can
be used in preference to the new, unloaded version.
/usr/sbin/slibclean usually fixes up this sort of problem (and as a
result frees the disk space if it hasn't happened yet).

--
Graham Reed Workstation C/C++ mailto:gr...@torolab.vnet.ibm.com
"Will hack the ODM for food."
-- Me (and very few others)
IBM Wide Web: http://w3.torolab.ibm.com/~greed

Matthew Moody

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

Bob Dushok wrote:
>
> I'm using AIX 4.1.4 on an RS/6000 43P. Some users of the system
> complain that they regularly get the message "text file busy" when
> attempting to access files within their account, expecially when
> attempting to delete a file.
>
> Yesterday, I encountered the same error when attempting to copy a file
> that I owned, no one else had the permissions to access this file.
>
> Does anyone know what causes this error or how I may fix it?
>
> Thank you,
> Bob

Sounds like some process was accessing the file while you were trying to
move it. When this happens again, use the fuser command to determine if
the file is indeed in use by another process.
--
______________________________________________________________
Matthew Moody
Romac/PCS
UNIX Sys. Admin. (Contract HP/UX, DG/UX, AIX)
*All opinions are my own and do not necessarily reflect
the opinions of my employers..........................

email:
Work: matthe...@providian.com
Personal: moo...@audtatious.win.net
_____________________________________________________________

G. Andrew Kephart

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

Bob,

This occurs when the file has been loaded into process memory,
e.g. has been executed and is currently running. To remove the file,
kill the process.

For example, if you wanted to replace ftpd, you'd have to make sure
there
were no ftpd's running (at least from the path of the one you'd like to
remove/replace).

-andrew
AIX TCP/IP

Andrew Pechenov

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

> I'm using AIX 4.1.4 on an RS/6000 43P. Some users of the system
> complain that they regularly get the message "text file busy" when
> attempting to access files within their account, expecially when
> attempting to delete a file.
>
> Yesterday, I encountered the same error when attempting to copy a file
> that I owned, no one else had the permissions to access this file.
>
> Does anyone know what causes this error or how I may fix it?
>
> Thank you,
> Bob
>
Hello!

This is executable file, that currently executes. AIX uses image on disk
to swap in pages to text segment while data segment swaps out to swap space.
You can safely delete this file, so system deletes only entry in the directory.
Inode and blocks still were allocated.
You cannot change this file while program that it represents is in the memory.

With best regards,

andy

---
Andrew Pechenov an...@bor.compnet.ru
PGP keyid:F3C47B41
fingerprint:A6 DF D1 30 09 2C 9B DE A0 50 DF 52 DD 7A FF 08


Vic Abell

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

Matthew Moody <Matthe...@Providian.com> writes:

>Bob Dushok wrote:
>>
>> I'm using AIX 4.1.4 on an RS/6000 43P. Some users of the system
>> complain that they regularly get the message "text file busy" when
>> attempting to access files within their account, expecially when
>> attempting to delete a file.
>>

>> ...

>Sounds like some process was accessing the file while you were trying to
>move it. When this happens again, use the fuser command to determine if
>the file is indeed in use by another process.

If the file in question is an executing file or shared library
file, fuser probably won't help. But lsof will. Consider these
examples from AIX 4.1.4:

cloud: 5 = fuser `which ksh`
/usr/local/bin/ksh:

cloud: 6 = lsof -X `which ksh`
COMMAND PID USER FD TYPE DEVICE SIZE/OFF INODE NAME
ksh 12876 root txt VREG 10, 6 230628 35051 /usr/bin/ksh
ksh 27510 bfp txt VREG 10, 6 230628 35051 /usr/bin/ksh
ksh 29642 abe txt VREG 10, 6 230628 35051 /usr/bin/ksh

Or:

cloud: 9 = fuser /usr/lib/libc.a
/usr/lib/libc.a:

cloud: 10 = lsof -X /usr/lib/libc.a
COMMAND PID USER FD TYPE DEVICE SIZE/OFF INODE NAME
init 1 root L00r VREG 10, 6 1642250 4346 /usr/ccs/lib/libc.a
...
csh 42042 chern L00r VREG 10, 6 1642250 4346 /usr/ccs/lib/libc.a
...
rlogind 44236 root L00r VREG 10, 6 1642250 4346 /usr/ccs/lib/libc.a

Lsof is available:

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof

Vic Abell <a...@purdue.edu>

Scott L. Fields

unread,
Jan 29, 1997, 3:00:00 AM1/29/97
to

First, find out what process has that file active. "fuser" will
usually suffice, but you may want to get the "lsof" public domain
program, just for future use.

Once you get the file to the point that it is no longer active, then
you should be able to work with these files as usual. I assume that
these are NOT data files, but actual applications/libraries/etc.

Bob Dushok wrote:
>
> I'm using AIX 4.1.4 on an RS/6000 43P. Some users of the system
> complain that they regularly get the message "text file busy" when
> attempting to access files within their account, expecially when
> attempting to delete a file.
>

0 new messages