Bug 1198

Summary: loop deadlock on block-backed writes
Product: IO/Storage Reporter: Fruhwirth Clemens (clemens)
Component: Block LayerAssignee: Jens Axboe (axboe)
Status: REJECTED UNREPRODUCIBLE    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.0-test4 Subsystem:
Regression: --- Bisected commit-id:

Description Fruhwirth Clemens 2003-09-08 03:05:58 UTC
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.

This is likely because blockbased writes take a different way through loop.c,
just have a look.
Comment 1 Dominik Brodowski 2005-11-16 14:29:18 UTC
Is this still a bug in recent kernels, like 2.6.14?
Comment 2 Fruhwirth Clemens 2005-11-17 00:09:56 UTC
I'm not interested to test (the initial report was in 2003). I switched over to
dm-crypt long time ago. Linux kernel bug tracking is a total mess and below all
standard seen elsewhere.

However, thanks for asking.