lkml.org 
[lkml]   [1996]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: unprecise report: lockups when using loopback
dicks@tasking.nl (Dick Streefland) writes:
> I also encountered some strange problems with the loop device. I played
> with an encrypted loopback mount, but on several occasions I got a
> corrupted file system, eventually leading to a system crash. For
> instance, I got pieces of C source code in an object file and files with
> invalid modes. It has nothing to do with the encryption, because it also
> occurs with a plain loopback mount. I tried very hard to get a
> reproducible scenario showing the problem, but failed until now.
> Therefor, I thing there is some race condition in the kernel concerning
> the loopback device. I will continue to investigate the problem, but if
> anyone has suggestions, please come forward.

I'm following up on my own posting because I now have a script to
reproduce the problem. It sets up a loopback mount and extracts a large
..tar.gz archive there. The archive has to be large for the errors to
show up. I'm using a file of 1Mb which expands to about 4Mb. As you can
see in the log file, the filesystem gets totally corrupted.

--
Dick Streefland //// Tasking Software BV
dicks@tasking.nl (@ @) The Netherlands
------------------------oOO--(_)--OOo------------------------
::::::::::::::
loopbug
::::::::::::::
#!/bin/sh

dev=/dev/loop0
img=/tmp/image
mnt=/mnt
taz=/usr/local/sources/nvi.ALPHA.1.66.tar.gz # 1027870 bytes

dd bs=1k count=8192 if=/dev/zero of=$img
losetup $dev $img
mke2fs -m0 -q $dev
mount $dev $mnt
cd $mnt
tar xfz $taz
cd /
umount $mnt
fsck -f -y $dev
losetup -d $dev
rm -f $img
::::::::::::::
loopbug.log
::::::::::::::
8192+0 records in
8192+0 records out
mke2fs 0.5b, 11-Mar-95 for EXT2 FS 0.5b, 95/08/09
tar: Could not create file nvi.1.66/docs/ev: No such file or directory
tar: Could not create file nvi.1.66/docs/features: No such file or directory
tar: Could not create directory nvi.1.66/docs/interp: No such file or directory
tar: Could not create file nvi.1.66/docs/interp/interp: No such file or directory
tar: Could not create file nvi.1.66/docs/interp/spell.ok: No such file or directory
tar: Could not create file nvi.1.66/docs/spell.ok: No such file or directory
tar: Could not create file nvi.1.66/docs/TODO: No such file or directory
tar: Could not create directory nvi.1.66/docs/internals: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/gdb.script: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/structures: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/autowrite: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/quoting: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/input: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/context: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/openmode: No such file or directory
tar: Could not create file nvi.1.66/docs/internals/cscope.NOTES: No such file or directory
tar: Could not create file nvi.1.66/docs/changelog: No such file or directory
tar: Could not create directory nvi.1.66/docs/tutorial: No such file or directory
tar: Could not create file nvi.1.66/docs/tutorial/vi.advanced: No such file or directory
tar: Could not create file nvi.1.66/docs/tutorial/vi.beginner: No such file or directory
tar: Could not create file nvi.1.66/docs/tutorial/vi.tut.csh: No such file or directory
tar: Could not change access and modification times of nvi.1.66/docs/USD.doc/exref: No such file or directory
tar: Cannot chown file nvi.1.66/docs/USD.doc/exref to uid 3 gid 9: No such file or directory
tar: Cannot change mode of file nvi.1.66/docs/USD.doc/exref to 755: No such file or directory
tar: Could not change access and modification times of nvi.1.66/docs/USD.doc/vitut: No such file or directory
tar: Cannot chown file nvi.1.66/docs/USD.doc/vitut to uid 3 gid 9: No such file or directory
tar: Cannot change mode of file nvi.1.66/docs/USD.doc/vitut to 755: No such file or directory
tar: Could not change access and modification times of nvi.1.66/docs/USD.doc/vi.man: No such file or directory
tar: Cannot chown file nvi.1.66/docs/USD.doc/vi.man to uid 3 gid 9: No such file or directory
tar: Cannot change mode of file nvi.1.66/docs/USD.doc/vi.man to 755: No such file or directory
tar: Could not change access and modification times of nvi.1.66/docs/USD.doc/vi.ref: No such file or directory
tar: Cannot chown file nvi.1.66/docs/USD.doc/vi.ref to uid 3 gid 9: No such file or directory
tar: Cannot change mode of file nvi.1.66/docs/USD.doc/vi.ref to 755: No such file or directory
tar: Could not change access and modification times of nvi.1.66/docs/USD.doc/edit: No such file or directory
tar: Cannot chown file nvi.1.66/docs/USD.doc/edit to uid 3 gid 9: No such file or directory
tar: Cannot change mode of file nvi.1.66/docs/USD.doc/edit to 755: No such file or directory
tar: Could not change access and modification times of nvi.1.66/docs/USD.doc: No such file or directory
tar: Cannot chown file nvi.1.66/docs/USD.doc to uid 3 gid 9: No such file or directory
tar: Cannot change mode of file nvi.1.66/docs/USD.doc to 755: No such file or directory
Parallelizing fsck version 0.5b (11-Mar-95)
e2fsck 0.5b, 11-Mar-95 for EXT2 FS 0.5b, 95/08/09
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Directory inode 200, block 0, offset 0: directory corrupted
Salvage? yes

Missing '.' in directory inode 200.
Fix? yes

Missing '..' in directory inode 200.
Fix? yes

Pass 3: Checking directory connectivity
'..' in /nvi.1.66/docs (200) is . (0), should be /nvi.1.66 (12).
Fix? yes

Unconnected directory inode 201 (/nvi.1.66/docs/???)
Connect to /lost+found? yes

Pass 4: Checking reference counts
Inode 2 has ref count 3, expecting 4.
Set i_nlinks to count? yes

Inode 12 has ref count 21, expecting 20.
Set i_nlinks to count? yes

Inode 201 has ref count 8, expecting 7.
Set i_nlinks to count? yes

Pass 5: Checking group summary information

/dev/loop0: ***** FILE SYSTEM WAS MODIFIED *****
/dev/loop0: 389/2048 files, 4057/8192 blocks


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.069 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site