Description
A thread looping in
"ActiveMQ Transport: tcp:///xxx:yyy@61616" daemon prio=10 tid=0x00007efff40a3000 nid=0x74f0 runnable [0x00007eff6f0f9000] java.lang.Thread.State: RUNNABLE at java.util.LinkedHashMap.transfer(LinkedHashMap.java:253) at java.util.HashMap.resize(HashMap.java:581) at java.util.HashMap.addEntry(HashMap.java:879) at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:427) at java.util.HashMap.put(HashMap.java:505) at org.apache.activemq.ActiveMQMessageAuditNoSync.isDuplicate(ActiveMQMessageAuditNoSync.java:133) at org.apache.activemq.store.kahadb.MessageDatabase.upadateIndex(MessageDatabase.java:1238) at org.apache.activemq.store.kahadb.MessageDatabase$AddOpperation.execute(MessageDatabase.java:2196) at org.apache.activemq.store.kahadb.MessageDatabase$15.execute(MessageDatabase.java:1141) at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779) at org.apache.activemq.store.kahadb.MessageDatabase.process(MessageDatabase.java:1137) at org.apache.activemq.store.kahadb.MessageDatabase$10.visit(MessageDatabase.java:1005) at org.apache.activemq.store.kahadb.data.KahaCommitCommand.visit(KahaCommitCommand.java:130)....
points to the need for a write lock on access to the LRUCache used for duplicate detection for failover producers.
The index lock protects modifications on put etc but clearly a get needs to have exclusive access. Tis in the javadoc in bold - "In access-ordered linked hash maps, merely querying the map with get is a structural modification"