AtomicLong/AtomicInteger (and types that depend on them) will be slow and 
concurrency bottlenecks in IBM JDK
------------------------------------------------------------------------------------------------------------

                 Key: CDV-694
                 URL: https://jira.terracotta.org/jira//browse/CDV-694
             Project: Community Development
          Issue Type: Bug
          Components: Byte Code Transform
    Affects Versions: 2.5.4, 2.6-stable0
            Reporter: Tim Eck
            Assignee: Issue Review Board


AtomicLong and AtomicInteger have special class adapters for use in the IBM 
JDK. From what I can gather, trying to add the Manageable interface (and/or the 
$__tc_managed field) causes seg faults in those classes. To work around the 
problem, these types end up using the client object manager to determine if 
they are managed -- that check is a bottleneck. 

This is an example stack trace coming though a Random (which uses AtomicLong):

"worker-100" prio=1 tid=0x0000002c302fc820 nid=0x345c waiting for monitor entry 
[0x0000000049243000..0x0000000049243bb0]
        at 
com.tc.object.ClientObjectManagerImpl.basicLookup(ClientObjectManagerImpl.java:852)
        - waiting to lock <0x0000002adf83ba38> (a 
com.tc.object.util.IdentityWeakHashMap)
        at 
com.tc.object.ClientObjectManagerImpl.lookupExistingOrNull(ClientObjectManagerImpl.java:394)
        at 
com.tc.object.ClientObjectManagerImpl.isManaged(ClientObjectManagerImpl.java:451)
        at com.tc.object.bytecode.ManagerImpl.isManaged(ManagerImpl.java:694)
        at com.tc.object.bytecode.ManagerUtil.isManaged(ManagerUtil.java:385)
        at com.tcclient.util.DSOUnsafe.compareAndSwapLong(DSOUnsafe.java)
        at 
java.util.concurrent.atomic.AtomicLong.compareAndSet(AtomicLong.java:110)
        at java.util.Random.next(Random.java:141)
        at java.util.Random.nextDouble(Random.java:380)
        at java.lang.Math.random(Math.java:694)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to