repeatable ext2 FS deadlock in 2.2.2

David Mansfield (
Wed, 24 Feb 1999 10:46:56 -0500 (EST)

I have deadlocked 2.2.2 a dozen times since yesterday (intentionaly).
Kernels are both 2.2.2 SMP on a Dual PII, and UP with a PPro200 (two
different machines :-). Both compiled with gcc Deadlock appears
to happen in __wait_on_super. FS is on a DAC960 Raid in the SMP case, and
on a simple IDE disk in the second.

I have been corresponding with Andrea Arcangeli and he has given me two
'oopser' patches which I have run to cause the process to oops out of the
deadlock to get a stack trace. Unfortunately, this info has been a bit
questionable so far. If anyone wants the traces or the patch, let
me know. Here's my technique:

in VC #1: (note /usr/src and /tmp are on the same ext2 FS)
cd /usr/src; while true; do tar cf - linux/ | (cd /tmp; tar xvf -); done

in VC #2:
cd /tmp; while true; do rm -rvf linux/; done

in VC #3:
cd /tmp; while true; do rm -rvf linux/; done

in VC #4:
cd /tmp; while true; do (cd linux && rm -rvf `ls`); done

in VC #5: ***without this I can't deadlock***
Run n copies of a 10mb mem-eater. My mem-eater loops picking a location
inside it's 10mb malloc and writing to it. It also receives an alarm
signal every second so it can print out how many accesses per second it
gets. Run enough copies so that your box is heavily swapping. For me this
is 32 on a 256mb (SMP) machine and 10 on a 96mb (UP) machine.

Grind...Grind...grind...deadlock. Happens within 2 minutes every time for

Results: a bunch of processes end up in __wait_on_super, in the minimum
case, the only two processes blocked were 'tar' and 'update' (until I ran
anything else). In other cases a bunch more, plus a bunch in

At one point during a run rm gave this lovely error:

rm: WARNING: Circular directory structure.
This almost certainly means that you have a corrupted file system.
Cycle detected:

Anything else I can do, let me know.

| David Mansfield              |
|             |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at