Hi and Happy Holidays to everbody!

I'ld be happy to get some input on a problem raising it's head once in a while though I know in theory it shouldn't be a problem at all.

The short question is:
Is there any known issue with Perls flock() implementation on CentOS 5.5 regarding exclusive locks?

The long version:
My webapplication utilizes exclusive locks whenever a file is read or written. I'm aware that in some environments this approach won't work as expected (e.g. BSDlike operating systems / network mounted file systems). For those cases the application can switch to a semaphore locking mechanism.
The approach seems to work fine for several years now on various servers.

However, during the past months I stumbled across 2 servers where once in a while exclusive locks are granted but never released. Only solution is to remove the lockfile (it's a separate lockfile while accessing a DBM database via DB_File).

I came across such a behaviour on Solaris with network mounted filesystem, so it's not absolutely new to me. Surprisingly these two servers are both CentOS 5.5 with Perl 5.8.8.
Searched the net and CentOS website but couldn't even find anybody raising the issue anywhere.

Regarding the application I'm not aware of any issue which could cause the scripts to hang and not release the lock. ... of course this doesn't mean there is no unknown bug.

Currently I'm a bit at a loss where to look. Maybe someone here has experienced a similar issue and is willing to share some thoughts and guide me into the right direction.

Thanks a lot
RL


In reply to Exclusive locks on CentOS 5.5 by RL

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.