[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
ConcurrentModificationException  XML
Forum Index -> Terracotta Platform
Author Message
Shake

master

Joined: 01/05/2008 07:27:49
Messages: 84
Offline

Hi,

I got an ConcurrentModificationException. But since there are no own classes involved, I don't have an idea what the problem is and how I could/should solve it...

I use 2.6-stabel4. Any ideas?

Code:
java.util.ConcurrentModificationException
 	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
 	at java.util.HashMap$EntryIterator.next(HashMap.java:834)
 	at java.util.HashMap$EntryIterator.next(HashMap.java:832)
 	at java.util.HashMap$EntriesIterator.nextEntry(HashMap/java:696)
 	at java.util.HashMap$EntriesIterator.next(HashMap/java:687)
 	at java.util.HashMap$ValuesIterator.next(HashMap/java:732)
 	at com.tc.management.lock.stats.LockStatElement.serializeTo(LockStatElement.java:319)
 	at com.tc.management.lock.stats.TCStackTraceElement.serializeTo(TCStackTraceElement.java:65)
 	at com.tc.net.protocol.tcm.TCMessageImpl.putNVPair(TCMessageImpl.java:288)
 	at com.tc.management.lock.stats.LockStatisticsResponseMessage.put(LockStatisticsResponseMessage.java:52)
 	at com.tc.management.lock.stats.LockStatisticsResponseMessage.dehydrateValues(LockStatisticsResponseMessage.java:45)
 	at com.tc.net.protocol.tcm.TCMessageImpl.dehydrate(TCMessageImpl.java:102)
 	at com.tc.net.protocol.tcm.TCMessageImpl.send(TCMessageImpl.java:319)
 	at com.tc.object.handler.LockStatisticsResponseHandler.handleEvent(LockStatisticsResponseHandler.java:14)
 	at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:142)
 java.util.ConcurrentModificationException
 	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
 	at java.util.HashMap$EntryIterator.next(HashMap.java:834)
 	at java.util.HashMap$EntryIterator.next(HashMap.java:832)
 	at java.util.HashMap$EntriesIterator.nextEntry(HashMap/java:696)
 	at java.util.HashMap$EntriesIterator.next(HashMap/java:687)
 	at java.util.HashMap$ValuesIterator.next(HashMap/java:732)
 	at com.tc.management.lock.stats.LockStatElement.serializeTo(LockStatElement.java:319)
 	at com.tc.management.lock.stats.TCStackTraceElement.serializeTo(TCStackTraceElement.java:65)
 	at com.tc.net.protocol.tcm.TCMessageImpl.putNVPair(TCMessageImpl.java:288)
 	at com.tc.management.lock.stats.LockStatisticsResponseMessage.put(LockStatisticsResponseMessage.java:52)
 	at com.tc.management.lock.stats.LockStatisticsResponseMessage.dehydrateValues(LockStatisticsResponseMessage.java:45)
 	at com.tc.net.protocol.tcm.TCMessageImpl.dehydrate(TCMessageImpl.java:102)
 	at com.tc.net.protocol.tcm.TCMessageImpl.send(TCMessageImpl.java:319)
 	at com.tc.object.handler.LockStatisticsResponseHandler.handleEvent(LockStatisticsResponseHandler.java:14)
 	at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:142)
 
ari

seraphim

Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline

Just because Terracotta is in the stack trace does not make this Terracotta software's fault. This is a classic "iterator on a map" race condition where one thread is iterating and another is mutating the map via put() or remove() calls. In other words, the iterator thinks it has to go thru, for example, 10 map entries, but all of a sudden 11 are there, or 9.

Your code is likely the culprit here.

--Ari
[WWW]
ari

seraphim

Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline

Actually, I am not so sure of my previous post. Looking at the stack trace, something is suspicious to me. It looks like our own map regarding lock stats that we are packing up to ship to the TC server. Someone else should chime in here.

Sorry for the confusion.

--Ari
[WWW]
ssubbiah

jedi

Joined: 05/24/2006 14:25:22
Messages: 117
Location: Saravanan Subbiah
Offline

This is being tracked here.

http://jira.terracotta.org/jira/browse/CDV-761

Saravanan Subbiah
Terracotta Engineer
teck

seraphim
[Avatar]
Joined: 05/24/2006 15:03:25
Messages: 1128
Offline

Just to be official, this is definitely bug in terracotta. Until the issue is resolved, I think the only way to avoid this exception would be not use the "Lock Profiler" in terracotta admin console

Tim Eck (terracotta engineer)
gbevin

praetor

Joined: 07/04/2007 09:09:42
Messages: 210
Offline

Little heads-up, this issue should be resolved as of revision 8656

Want to post to this forum? Join the Terracotta Community
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team