activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Yu (JIRA)" <>
Subject [jira] [Created] (AMQ-5016) BitArrayBin doesn't work well with index larger than Integer.MAX_VALUE
Date Mon, 03 Feb 2014 16:42:09 GMT
Dan Yu created AMQ-5016:

             Summary: BitArrayBin doesn't work well with index larger than Integer.MAX_VALUE
                 Key: AMQ-5016
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMS client
    Affects Versions: 5.9.0
            Reporter: Dan Yu

In the BitArrayBin, the index's unit type is long. It also has a variable called firstIndex,
which store where the window starts. And that firstindex's unit is int. If the index is bigger
than Integer.MAX_VALUE, setBit() and getBit() starts to return bad value.

The defect will cause activemq client to perform badly when receiving message that sequence
id is bigger than max interger. Below is the jstack log that shows the problem.
"ActiveMQ Session Task-869879" prio=10 tid=0x00007f412d6ee000 nid=0x3cbe runnable [0x00007f405b7b6000]
   java.lang.Thread.State: RUNNABLE
        at java.util.LinkedList.linkLast(
        at java.util.LinkedList.add(
        at org.apache.activemq.util.BitArrayBin.getBitArray(
        at org.apache.activemq.util.BitArrayBin.setBit(
        at org.apache.activemq.ActiveMQMessage AuditNoSync.isDuplicate(ActiveMQMessageAuditNoSyn
        at org.apache.activemq.ActiveMQMessageAudit.isDuplicate(
        - locked <0x00007f46a0138ab0> (a org.apache.activemq.ActiveMQMessageAudit)
        at org.apache.activemq.ActiveMQMessage AuditNoSync.isDuplicate(ActiveMQMessageAuditNoSyn
        at org.apache.activemq.ConnectionAudit.isDuplicate(
        - locked <0x00007f4881e6b968> (a org.apache.activemq.ConnectionAudit)
        at org.apache.activemq.ActiveMQConnection.isDuplicate(
        at org.apache.activemq.ActiveMQMessageConsumer.dispatch(
        - locked <0x00007f45db222fb8> (a java.lang.Object)
        at org.apache.activemq.ActiveMQSessionExecutor.dispatch(
        at org.apache.activemq.ActiveMQSessionExecutor.iterate(
        at org.apache.activemq.thread.PooledTaskRunner.runTask(
        at org.apache.activemq.thread.PooledTaskRunner$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$

This message was sent by Atlassian JIRA

View raw message