lkml.org 
[lkml]   [1997]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: File locking problems?
On Mon, 3 Nov 1997, Richard Gooch wrote:

> Hi, all. I've had persistant problems with filesystems not being
> properly unmounted at shutdown. I've tracked it down to a corrupted
> /etc/mtab. Further fiddling has shown that the corruption is most
> likely to occur when I shut down the autofs-based automounter. I have
> 13 automounter maps, so when a killall is done on the automounter
> there is a brief flurry of activity.
> I've had these problems with 2.0.3x as well as 2.1.61, although I've
> been doing my testing on 2.1.61.
>
> I have been studying the code for mount 2.7f, which is supposed to
> lock the /etc/mtab file before modifications. This locking is clearly
> not working; however the locking code looks like it should do the
> right thing. I have even prevented the /etc/mtab~ lockfile from ever
> being removed, and the corruption of /etc/mtab still happens.
>
> These tests suggest that the fcntl(2) locking system is not working
> properly. Before I contemplate diving into the kernel code, is there
> anyone else out there who has experienced problems with fcntl(2), or
> knows about some bug? Alternatively, is there someone who knows of
> some subtle bug in the mount programme itself which I've overlooked?

I've seen systems here where fcntl(2) locking doesn't seem to work. Pine
and procmail love corrupting mailboxes on these systems. Procmail is
compiled with fcntl() locking and dot file locking. Elm uses both fcntl()
and dot locking (as we have it compiled) and worked fine. When procmail
was recompiled without dot file locking, Elm started failing too (failed
means it reported a corrupted mailbox if it checked the mailbox while mail
was coming in). All of this was on Linux 2.0.x systems using
libc-5.4.33/37.

-- mikeh
,,,,,
(o o)
------------------------------oOO---(_)---OOo------------------------------
| Michael Harrelson: Business Services Engineer, MindSpring Enterprises |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| System Administrator for GCNeXT, Happy, Puck, GC EduNET, and Aslan |
| Email: mikeh@mindspring.net http://gcedunet.peachnet.edu/~mikeh |
| "Eye has not seen, nor hear heard, nor has man conceived, what God has |
| prepared for those that love Him." -- I Corithians 2:9 |
---------------------------------------------------------------------------


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