[net.unix-wizards] Simultaneous mv's cause crash

steve@dartvax.UUCP (Steve Campbell) (06/27/84)

Well, folks, here's one that's so simple that it's hard to belive it
could happen.  One of our users (while using learn) did the following:

mv file1 file2 & ; mv file3 file1

and guess what happened.  The system crashed with:

panic: ifree: freeing free inode

and so forth.  The damage had to be repaired with a manual fsck run.  Now
no real harm was done (other than inconveniencing some users), and granted
that the command issued might be said to tempt fate, but still, aren't
there some lockout mechanisms that should at least prevent file system
damage under these circumstances?  We run 4.2 on a 750, BTW.

Steve Campbell

	UUCP: {decvax|linus|cornell|astrovax}!dartvax!steve
	CSNET: steve@dartmouth     ARPA: steve%dartmouth@csnet-relay

obrien@CSNET-SH.ARPA (06/28/84)

From:  Mike O'Brien <obrien@CSNET-SH.ARPA>

	I saw this once at Rand, and just last night here at BBN.  Now,
at Rand, we put in a whole bunch of fixes from the Usenet, including some
having to do with reference counts.  We never saw one after that, but then,
we weren't exactly trying to cause them, either!

	Does anyone out there know specifically which glitch it is that
causes this one?  I've always seen it as due to the same operation: two
processes unlinking the same file at the 'same' time.