[Samba] Dangling MS Access DB Lock Files *.ldb
Dragan Krnic
dkrnic at lycos.com
Mon Oct 10 15:21:15 GMT 2005
I have an intermittent problem with dangling MS Access DB lock files.
In a productive environment with N batch queus (each on a separate
Windows XP Professional) a scheduler PC dispatches the work load to
a free queue by means of modifying a simple MS Access DB file
called "PRIM.mdb", which resides on a Samba 3.0.20 share. Each free
queue PC polls the same MS Access DB file every 60 seconds to see
if there is a work packet to be executed by it. If there is a work
package for it it modifies a state value of the respective work packet
in this DB when it starts executing it as well as after the job has
been done so that the scheduler knows what's going on.
As I understand the MS Access API a client creates a lock file
"PRIM.ldb" whenever it wishes to modify the DB file "PRIM.mdb".
>From time to time, but generally not very often, a lock file is
dropped by either a queue PC or by scheduler. Therefore no one
can modify the DB file until the lock file is removed.
The linux utility "lsof" can't see that the lock file is opened
by any process but the status page of SWAT always lists it under
"Open Files" with the smbd PID of the client which last opened
it, with "Sharing" declared "DENY_NONE", "R/W" as "RDWR", "Oplock"
is "NONE" (oplocks=no), full path name under "File" and the
timestamp of the last access under "Date".
The lock file can only be removed by super user root but if the
smbd process which holds it open is killed, then the problem is
also solved sometimes even without removing the lock file itself.
I have inspected the samba log files and identified the point at
which this happens recently. To make things simpler I've removed
much of the samba verbosity in the following overview of the
offending client's actions (mdb is the MS Access DB file and
ldb is the respective lock file):
23:55:53 close mdb 1
close ldb 0
23:55:54 open ldb ro 1
open mdb rw 2
open ldb rw 3
23:55:55 close mdb 1
Share violation on PRIM.mdb, flags=2
open mdb rw 2
No other client was active at the time so there is no racing
here. Only the offending client loses track of the lock file
and forgets about it.
Has anyone had a similar problem and lived to talk about it?
Any hints?
More information about the samba
mailing list