Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-1189

Integer overflow while sizing scratch files building indexes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.6
    • Fix Version/s: 3.0.0, 2.8.0
    • Component/s: backends
    • Labels:
    • Environment:
      16GB JVM heap
    • Support Ticket IDs:

      Description

      Attempting an index build fails after a while with this exception:

      [18/Oct/2013:19:19:54 +0100] category=JEB severity=SEVERE_ERROR msgID=8650964 msg=The following error was received while processing the rebuild index task: java.lang.IllegalArgumentException: Negative initial size: -1096668502 
      

      After some additional diagnostic logging, we see:

      [24/Oct/2013:16:24:40 +0100] 4912 caught error thread={pool-3-thread-1(277)} method={call(Importer.java:3338)} caught={java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Negative initial size: -1096668502} 
      Stack Trace: 
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) 
      at java.util.concurrent.FutureTask.get(FutureTask.java:83) 
      at org.opends.server.backends.jeb.importLDIF.Importer$ImportTask.flushIndexBuffers(Importer.java:1819) 
      at org.opends.server.backends.jeb.importLDIF.Importer$RebuildIndexManager.call(Importer.java:3331) 
      at org.opends.server.backends.jeb.importLDIF.Importer$RebuildIndexManager.call(Importer.java:3178) 
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
      at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 
      at java.lang.Thread.run(Thread.java:662) 
      Caused by: java.lang.IllegalArgumentException: Negative initial size: -1096668502 
      at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:57) 
      at org.opends.server.backends.jeb.importLDIF.Importer$ScratchFileWriterTask.<init>(Importer.java:2638) 
      at org.opends.server.backends.jeb.importLDIF.Importer$SortTask.createIndexWriterTask(Importer.java:3019) 
      at org.opends.server.backends.jeb.importLDIF.Importer$SortTask.call(Importer.java:2985) 
      at org.opends.server.backends.jeb.importLDIF.Importer$SortTask.call(Importer.java:2955) 
      ... 5 more
      

      It looks like a bufferSize of 1599149397 is triggering this.

        Attachments

          Activity

            People

            • Assignee:
              cjr Chris Ridd
              Reporter:
              cjr Chris Ridd
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: