Skip to contentSkip to conversation

test4: loop deadlock

DISCUSSION Fruhwirth Clemens 1 participant 1 message Sep 5, 2003

lore
Share & tools
lore
#0 lore raw

Block-backed loop devices can cause a deadlock.

How to reproduce:

You need ~100mb partition.
Boot with mem=32m (otherwise the cache will be to big in the most cases)

swapoff -a
losetup /dev/loop0 /dev/hdXX
for i in seq 1 10; do
dd if=/dev/zero of=/dev/loop0 &
done

Now the box "should" freeze. This doesn't happen with filebased read/write or blockbased read. Jari's loop survives this stress test without problems. So probably we should continue with merging his loop changes. Andries, are you still interested in that?

(As long term solution for the indisputable ugliness of loop.c: just throw away block-backend support and move the cryptostuff to device mapper:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105967481007242&w=2
The patch is working great, btw, much more stable than loop+cryptoloop. I'd really like to see it merged)

Regards, Clemens