Re: [documancer] Failed to lock the lock file
Status: Beta
Brought to you by:
vaclavslavik
From: Arnd B. <arn...@we...> - 2004-02-05 11:16:07
|
On Thu, 5 Feb 2004, Vaclav Slavik wrote: > Hi, > > [I'm CC'ing this to wx-users because it's a wxWindows question and > hopefully somebody will be able to give better answer than me] > > arn...@we... wrote: > > I managed to compile > > Python/wxPython/mozilla/wxMozilla/swish-e/documancer on a SUSE > > Athlon based machine in our PC-Pool. > > Everything looks pretty fine, however, when trying to start > > documancer I get: > > "Failed to lock the lock file > > '/home/baecker/.documancer/documancer-baecker' > > (error 37: Keine Sperren verfuegbar) > > ((I think this error 37 should roughly translate to "no locks > > available" - hmm, internationalization can be a pain ;-)). > > And does it continue running after that? Failure to make the lock is > not fatal for Documancer (you only risk some damage if running two > instances of the app at the same time by the same user). After "OK" for the "Failed to lock the lock file" window, another pops up with the message "Another Documancer instance is running, exiting." and on the command line the final words are "OnInit returned FALSE, exiting...". > > I have no idea why this happens (the .documancer directory > > is created and also writable by the user). > > If it is of any importance here: the home-directories > > are NFS mounted and the access can be pretty slow sometimes. > > Yes, it is, locking may not work over NFS. First thing to check is if > your wxWindows' copy setup.h has HAVE_FCNTL defined. In /opt/python/wxWindows/lib/wx/include/gtk-2.4/wx/setup.h I found # define HAVE_FCNTL 1 > If not, then it > won't work (see man flock). The same (Linux) manpage says that > fcntl() does work over NFS, "given a sufficiently recent version of > Linux and a server which supports locking." This is sufficiently vague ;-) - I think it is SUSE 8.1 (the kernel is 2.4.21), but this doesn't really specify how recent the Linux is. I don't know about the server. What would be the precise question to ask the system administrator (or the system itself)? > I could create the lock file in $TMPDIR instead of in $HOME, but I > don't what what the current best practise is, security-wise. Maybe one could do this in case the "normal" variant fails. Regards, Arnd |