java.lang.IllegalArgumentException: Illegal initial capacity: -29933

DataStax JIRA | thisvieira | 4 years ago
  1. 0

    An overflow bug exists in PhysicalStateClassLoader#createGetObjectReferencesMethod (line 551). When the number of fields in a managed object is sufficiently large, the generated getObjectReferences() method attempts to invoke the HashSet constructor with an overflowed byte value. This results in a server crash when retrieval of the managed object is attempted. java.lang.IllegalArgumentException: Illegal initial capacity: -128 at java.util.HashMap.<init>(HashMap.java:172) at java.util.HashMap.<init>(HashMap.java:199) at java.util.HashSet.<init>(HashSet.java:125) at com.tc.state.idx1.ObjectWithFields_V1.getObjectReferences(Unknown Source) at com.tc.objectserver.managedobject.PhysicalManagedObjectState.addObjectReferencesTo(PhysicalManagedObjectState.java:112) at com.tc.objectserver.managedobject.ManagedObjectImpl.addObjectReferencesTo(ManagedObjectImpl.java:146) at com.tc.objectserver.managedobject.ManagedObjectTraverser.markProcessed(ManagedObjectTraverser.java:42) at com.tc.objectserver.managedobject.ManagedObjectTraverser.traverse(ManagedObjectTraverser.java:33) at com.tc.objectserver.impl.ObjectManagerImpl.addReachableObjectsIfNecessary(ObjectManagerImpl.java:521) at com.tc.objectserver.impl.ObjectManagerImpl.basicLookupObjectsFor(ObjectManagerImpl.java:497) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsForOptionallyCreate(ObjectManagerImpl.java:196) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsAndSubObjectsFor(ObjectManagerImpl.java:180) at com.tc.objectserver.impl.ObjectRequestManagerImpl.basicRequestObjects(ObjectRequestManagerImpl.java:119) at com.tc.objectserver.impl.ObjectRequestManagerImpl.splitAndRequestObjects(ObjectRequestManagerImpl.java:98) at com.tc.objectserver.impl.ObjectRequestManagerImpl.requestObjects(ObjectRequestManagerImpl.java:85) at com.tc.objectserver.impl.ObjectRequestManagerRestartImpl.requestObjects(ObjectRequestManagerRestartImpl.java:118) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEventFromClient(ManagedObjectRequestHandler.java:93) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEvent(ManagedObjectRequestHandler.java:52) at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:142)

    Terracotta Project Issue Tracker | 7 years ago | Jeffrey Samarziya
    java.lang.IllegalArgumentException: Illegal initial capacity: -128
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Sending garbage data will raise weird exception

    GitHub | 5 months ago | ph
    io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: Illegal initial capacity: -1982301064
  4. 0

    An overflow bug exists in PhysicalStateClassLoader#createGetObjectReferencesMethod (line 551). When the number of fields in a managed object is sufficiently large, the generated getObjectReferences() method attempts to invoke the HashSet constructor with an overflowed byte value. This results in a server crash when retrieval of the managed object is attempted. java.lang.IllegalArgumentException: Illegal initial capacity: -128 at java.util.HashMap.<init>(HashMap.java:172) at java.util.HashMap.<init>(HashMap.java:199) at java.util.HashSet.<init>(HashSet.java:125) at com.tc.state.idx1.ObjectWithFields_V1.getObjectReferences(Unknown Source) at com.tc.objectserver.managedobject.PhysicalManagedObjectState.addObjectReferencesTo(PhysicalManagedObjectState.java:112) at com.tc.objectserver.managedobject.ManagedObjectImpl.addObjectReferencesTo(ManagedObjectImpl.java:146) at com.tc.objectserver.managedobject.ManagedObjectTraverser.markProcessed(ManagedObjectTraverser.java:42) at com.tc.objectserver.managedobject.ManagedObjectTraverser.traverse(ManagedObjectTraverser.java:33) at com.tc.objectserver.impl.ObjectManagerImpl.addReachableObjectsIfNecessary(ObjectManagerImpl.java:521) at com.tc.objectserver.impl.ObjectManagerImpl.basicLookupObjectsFor(ObjectManagerImpl.java:497) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsForOptionallyCreate(ObjectManagerImpl.java:196) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsAndSubObjectsFor(ObjectManagerImpl.java:180) at com.tc.objectserver.impl.ObjectRequestManagerImpl.basicRequestObjects(ObjectRequestManagerImpl.java:119) at com.tc.objectserver.impl.ObjectRequestManagerImpl.splitAndRequestObjects(ObjectRequestManagerImpl.java:98) at com.tc.objectserver.impl.ObjectRequestManagerImpl.requestObjects(ObjectRequestManagerImpl.java:85) at com.tc.objectserver.impl.ObjectRequestManagerRestartImpl.requestObjects(ObjectRequestManagerRestartImpl.java:118) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEventFromClient(ManagedObjectRequestHandler.java:93) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEvent(ManagedObjectRequestHandler.java:52) at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:142)

    Terracotta Project Issue Tracker | 7 years ago | Jeffrey Samarziya
    java.lang.IllegalArgumentException: Illegal initial capacity: -128

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Illegal initial capacity: -29933

      at java.util.HashMap.<init>()
    2. Java RT
      LinkedHashSet.<init>
      1. java.util.HashMap.<init>(HashMap.java:172)
      2. java.util.LinkedHashMap.<init>(LinkedHashMap.java:160)
      3. java.util.HashSet.<init>(HashSet.java:142)
      4. java.util.LinkedHashSet.<init>(LinkedHashSet.java:129)
      4 frames
    3. org.apache.cassandra
      SetType.compose
      1. org.apache.cassandra.db.marshal.SetType.compose(SetType.java:78)
      2. org.apache.cassandra.db.marshal.SetType.compose(SetType.java:29)
      2 frames
    4. DataStax Java Driver for Apache Cassandra - Core
      Row.getSet
      1. com.datastax.driver.core.Row.getSet(Row.java:624)
      2. com.datastax.driver.core.Row.getSet(Row.java:643)
      2 frames