[Q] Paranoid lock checking

Berend Reitsma (berend@united-info.com)
Fri, 27 Feb 1998 13:59:59 +0000 (WET)


Hello to all,

Just a question. Are there patches available with which I can do some
paranoid checking on the file/inode/lock structures in the kernel
(2.0.33).

Some checks I would like:
- check valid device: file_lock->fl_file->f_inode->i_dev
- check valid inode: file_lock->fl_file->f_inode->i_ino

The reason for this is the following:

cat /proc/locks
1: FLOCK ADVISORY READ 0 00:01:-268374161 0 2147483647 0174b1d8
00000000 00ea9918 00000000 0174b218
1: -> FLOCK ADVISORY WRITE 0 03:03:1135115 0 2147483647 0174b218
00000000 00000000 00000000 0174b1d8

and in another run (after reboot):

1: FLOCK ADVISORY READ 0 03:03:743182 0 2147483647 00b9d198 00000000
00b9d358 00000000 00000000
2: FLOCK ADVISORY WRITE 0 03:03:620683 0 2147483647 00b9d358 00b9d198
00e47518 00000000 00000000
3: FLOCK ADVISORY READ 0 00:01:-268374161 0 2147483647 00e47518
00b9d358 01f1aa98 00000000 00e47418
3: -> FLOCK ADVISORY WRITE 0 00:01:-268374161 0 2147483647 00e47418
00000000 00000000 00000000 00e47518

My config:
kernel 2.0.33 (UP)
libc 5.4.38
linuxthreads 0.7

This problem arises when within one (server)program more than 2 threads
are locking and writing files. With 2 threads I can let the program run
for hours without any problems. With 3 threads or more I can get dangling
locks within a 5-15 minutes.

However, the lockup in the second run was with 2 threads in one server
program, and with another program only locking and reading the same set of
files.

Maybe it has something to do with the ext2fs problems mentioned earlier in
this list?

Any pointers or comments are welcome.

Kind regards,
Berend.

--

Berend Reitsma

United Info B.V. | Phone: +31 (0)513 469100 P.O. Box 10 | Fax: +31 (0)513 461588 8408 ZH Lippenhuizen | Email: berend@united-info.com The Netherlands | URL: http://www.asset-control.com/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu