You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Arthur Naseef (JIRA)" <ji...@apache.org> on 2011/04/29 19:47:03 UTC

[jira] [Created] (AMQ-3301) LockFile in-jvm check is not thread-safe

LockFile in-jvm check is not thread-safe
----------------------------------------

                 Key: AMQ-3301
                 URL: https://issues.apache.org/jira/browse/AMQ-3301
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.4.2
            Reporter: Arthur Naseef
            Priority: Minor


kahadb/src/main/java/org/apache/kahadb/util/LockFile.java adds in-JVM locking to Channel.tryLock() using system properties.  However, there is time between the read-and-check for an existing lock and setting a new lock.

I found this problem while running multiple brokers in a single JVM for diagnostic purposes with two brokers using a shared directory to simlute a production H/A environment.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (AMQ-3301) LockFile in-jvm check is not thread-safe

Posted by "Rob Davies (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-3301.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 5.6.0
         Assignee: Rob Davies

Patch applied in SVN revision 1326252
                
> LockFile in-jvm check is not thread-safe
> ----------------------------------------
>
>                 Key: AMQ-3301
>                 URL: https://issues.apache.org/jira/browse/AMQ-3301
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>            Reporter: Arthur Naseef
>            Assignee: Rob Davies
>            Priority: Minor
>             Fix For: 5.6.0
>
>         Attachments: amq-3301.patch
>
>
> kahadb/src/main/java/org/apache/kahadb/util/LockFile.java adds in-JVM locking to Channel.tryLock() using system properties.  However, there is time between the read-and-check for an existing lock and setting a new lock.
> I found this problem while running multiple brokers in a single JVM for diagnostic purposes with two brokers using a shared directory to simlute a production H/A environment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3301) LockFile in-jvm check is not thread-safe

Posted by "Arthur Naseef (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arthur Naseef updated AMQ-3301:
-------------------------------

    Attachment: amq-3301.patch

Patch which eliminates the race condition on the in-JVM lock test.

> LockFile in-jvm check is not thread-safe
> ----------------------------------------
>
>                 Key: AMQ-3301
>                 URL: https://issues.apache.org/jira/browse/AMQ-3301
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.2
>            Reporter: Arthur Naseef
>            Priority: Minor
>         Attachments: amq-3301.patch
>
>
> kahadb/src/main/java/org/apache/kahadb/util/LockFile.java adds in-JVM locking to Channel.tryLock() using system properties.  However, there is time between the read-and-check for an existing lock and setting a new lock.
> I found this problem while running multiple brokers in a single JVM for diagnostic purposes with two brokers using a shared directory to simlute a production H/A environment.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira