You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2010/10/29 09:58:00 UTC

[jira] Assigned: (AMQ-3007) Kahadb LockFile.lock() leaks file descriptors if tryLock() returns an IOException

     [ https://issues.apache.org/activemq/browse/AMQ-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-3007:
-------------------------------

    Assignee: Gary Tully

> 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.3.2, 5.4.0, 5.4.1
>         Environment: Ubuntu Linux, activemq 5.3.2, master slave configuration with kahadb configured directory on a smb mount.
>            Reporter: Marcus Smith
>            Assignee: Gary Tully
>
> 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.