in reply to Exclusive locks on CentOS 5.5

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 don't think your problem have anything to do with flock(2), as it does not create any lockfiles.