[comp.sys.hp] rmdir

arndt@zyx.ZYX.SE (Arndt Jonasson) (02/06/91)

It seems we found a bug in HP-UX yesterday. I'm not sure, because we
don't want to try it again.

Our configuration consists of one HP9000/350 with a few disks, and a
couple of diskless machines of the same kind. "uname -a" says:
	HP-UX coca 7.0P0826 B 9000/350 coca

For a certain reason, we wanted to know what error message the 'rmdir'
command would give us when told to remove a non-empty directory, so,
being non-root, and therefore not risking anything, logged in on one
of the diskless machines, we did

	rmdir /

The server panicked. And of course all the diskless ones followed it.
I know I should have written down the panic message, but I forgot.

(To increase the probability of this happening, if you try it yourself,
you may want to make sure someone is saving a whole day's valuable
work at the precise time you do this.)
-- 
Arndt Jonasson, ZYX AB, Styrmansgatan 6, 114 54 Stockholm, Sweden
email address:   arndt@zyx.SE   or      <backbone>!mcsun!sunic!zyx!arndt

robs@hpuamsa.neth.hp.com (Rob Slotemaker CRC) (02/07/91)

As far as I can see this occurred only once before, but it was with a 9000/800
running HP-UX 3.0. The document describing that problem says :

> There appears to be a race condition between reading a directory
> (a direct read such as through ls, not a pathname lookup)
> and removing a directory.  A directory being read is not locked
> during the read.  If, after it starts reading, someone does a rmdir
> on that directory, the panic can occur.  Another way for the panic
> to occur, is for someone to rename another directory to the name of
> the directory being read.\

Does your problem occur on every rmdir of a non-empty directory ?  Are you
sure you don't have a bad disk (run fsck !) ?

Shouldn't uname -a report "HP-UX coca 7.0 B 9000/350 coca" ?


Best regards,

Rob Slotemaker, Dutch CRC

franks@hpuamsa.neth.hp.com (Frank Slootweg CRC) (02/08/91)

Arndt Jonasson writes :

> "uname -a" says: HP-UX coca 7.0P0826 B 9000/350 coca

Rob Slotemaker writes :

> Shouldn't uname -a report "HP-UX coca 7.0 B 9000/350 coca" ?

  Indeed your system should *not* say "7.0P0826". This is an HP internal
prerelease ("P" for prerelease and "0826" for August 26 (1989). Rob was
still a customer at the time, so he probably did not know. And yes:
Smart customers can become HP employees :-)).
  The official 7.0 release came out over a year ago, so that is what you
should have and run.
  While your current problem might not be related to the use of
prerelease software, I strongly advise you to install the official 7.0
release.

  And just to make you feel better, I just did the following on my
diskless client :

franks$ rmdir /
rmdir: /: Is a directory
franks$ pwd
/users/franks
franks$ mkdir one
franks$ touch one/two
franks$ rmdir one
rmdir: one: Directory not empty

  Why the two messages are different? Beats me. They are both right. And
who said that UNIX will always give the same answer? :-)

Frank Slootweg, Dutch Customer Response Center.