[daip] aips problem

Patrick P. Murphy pmurphy at NRAO.EDU
Mon Mar 27 13:09:54 EST 2000


On Mon, 27 Mar 2000 10:13:05 +0100 (BST), Hardip Sanghera
   <hss at ast.cam.ac.uk> said: 

> Hi, we have been running aips quite happily on a machine, and then
> yesterday when you start up aips it hangs and says repeatedly:

> AIPS 1: ZOPEN: STILL WAITING FOR FILE DA00:ACD000000;

> However, the file ACD000000; is there on the aips server:

Yes, but it's waiting for it to become unlocked.  Some other process has
it tied up.

There is a (soon to be in $SYSUNIX) utility program I wrote years ago for
precisely this situation.  It allows you to find the process ID of the
locker, or tells you if the file is really locked or not.  It's in:

  ftp://ftp.cv.nrao.edu/NRAO-staff/pmurphy/aips/file-locking/

and is called wholocked.  I've got binaries there for most systems, and
the C source as well.  Basically, you'd run it like so:

   wholocked /data/Aips/classic/DA00/CASS60/ACD000000\;

If it can, it'll lock the file; just press RETURN then to exit.  If it
can't lock it, it will report the process ID (PID) of the locker, and you
can in principle do:

    ps auxww | grep NNN         (Linux, OSF1, *BSD, SunOS 4, AIX)
or  ps -ef   | grep NNN         (Solaris, HP-UX, SG-Irix)

where NNN is the PID in question.  Unfortunately, if the filesystem is NFS
served, the process ID could be on some other host that also has that
filesystem mounted, or on the server.  But this is a start.

Now for the workaround.  If you cannot chase down the locking process, the
best way to get out of this stale lock situation is:

     cd /data/Aips/classic/DA00/CASS60
     cp ACD000000\; foo
     rm ACD000000\;
     mv foo ACD000000\;

In other words, create a new instance of the file (with a new inode).  But
it's far better to track down the errant process and kill it, if you can.

				- Pat



More information about the Daip mailing list