Kahadb LockFile.lock() leaks file descriptors if tryLock() returns an
IOException
---------------------------------------------------------------------------------
Key: AMQ-3007
URL: https://issues.apache.org/activemq/browse/AMQ-3007
Project: ActiveMQ
Issue Type: Bug
Components: Message Store
Affects Versions: 5.4.1, 5.4.0, 5.3.2
Environment: Ubuntu Linux, activemq 5.3.2, master slave configuration
with kahadb configured directory on a smb mount.
Reporter: Marcus Smith
The slave will output these messages:
INFO | Database /mnt/activemqdata/lock is locked... waiting 10 seconds for the
database to be unlocked ......
After awhile, the messages change to:
INFO | Database /mnt/activemqdata/lock is locked... waiting 10 seconds for the
database to be unlocked. Reason: java.io.FileNotFoundException:
/mnt/activemq/lock (Too many open files) ....
Upon inspection of LockFile.lock(), OverlappingFileLockException is the only
exception caught. In the event tryLock() throws IOException, as it does in
my case, the readFile isn't cleaned up and the caller (which catches
IOExceptions), just iterates again.
Since javadoc says FileChannel.tryLock() throws an IOException, and the caller
in this case, and MessageDatabase expects to catch IOExceptions, it
would seem like adding this to the code in LockFile.lock() should fix this
issue.
catch (IOException e)
{
reason = e;
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.