Re: setlock oddity - stale lock file?

Charles Cazabon <[email protected]> Mon, 18 Jun 2007 10:11:48 -0600
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
Followup.  I wrote:
>
> So it  appears setlock thought the  lock file was locked,  even though
> there was  no process with  it open, etc.  I didn't think  setlock was
> susceptible to this type of problem.


Andy Bradford <[email protected]> wrote:
> The source for setlock is extremely small  and easy to read. From what I
> can  tell, it  looks  like it  shouldn't have  this  problem unless  the
> operating system  tells it  that the  file is locked.  Is it  possibly a
> problem with the operating system? Does setlock make any guarantees when
> the operating system dies (or power fails)?
>
> It may also be useful to look at the man page for flock/lockf on your OS
> to see what it does. I suspect at  this point only the OS can answer the
> question as to why it still considers that file locked...

It's flock on this system.  Yes, unfortunately I deleted the file -- I wasn't
sure it was related to the locking until I removed the stale lockfile and the
problem resolved itself.


clemens fischer <[email protected]> wrote:
>
> what filesystem was used, and how does it keep its metadata?

ext3.  metadata is always journalled on ext3.


Daryl Tester <[email protected]> wrote:
>
> According to the source, it also suppresses the error message.  Try
> running it without the -x option to see what it reports.

I have removed the option.  Of course, until the problem repeats itself, I
can't collect any more data about it.


Thanks to all -- I will wait and see if the problem occurs again.

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                              <[email protected]>
GPL'ed software available at:               http://pyropus.ca/software/
-----------------------------------------------------------------------