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

Import failure: cursors left open due to RuntimeException in failed attribute indexing thread

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.6.0
    • Component/s: backends
    • Labels:
      None

      Description

      Offline import failed on one node with following error:

      [ERROR] [08/Apr/2011:15:54:05 +0100] category=JEB severity=NOTICE msgID=8847569 msg=Total import time was 4382 seconds. Phase one processing completed in 3668 seconds, phase two processing completed in 713 seconds
      [ERROR] [08/Apr/2011:15:54:05 +0100] category=JEB severity=NOTICE msgID=8847454 msg=Processed 13734663 entries, imported 13734662, skipped 0, rejected 1 and migrated 0 in 4382 seconds (average rate 3134.0/sec)
      [ERROR] [08/Apr/2011:15:54:11 +0100] category=TOOLS severity=SEVERE_ERROR msgID=10748000 msg=An error occurred while attempting to process the LDIF import: IllegalStateException(Database still has 1 open cursors while trying to close.)
      [ERROR] err = java.lang.RuntimeException
      [ERROR] at org.opends.server.backends.jeb.Index.deleteKey(Index.java:332)
      [ERROR] at org.opends.server.backends.jeb.Index.delete(Index.java:401)
      [ERROR] at org.opends.server.backends.jeb.importLDIF.Importer$IndexDBWriteTask.addToDB(Importer.java:2281)
      [ERROR] at org.opends.server.backends.jeb.importLDIF.Importer$IndexDBWriteTask.call(Importer.java:2247)
      [ERROR] at org.opends.server.backends.jeb.importLDIF.Importer$IndexDBWriteTask.call(Importer.java:1901)
      [ERROR] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      [ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      [ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      [ERROR] at java.lang.Thread.run(Thread.java:619)
      [ERROR] java.lang.IllegalStateException: Database still has 1 open cursors while trying to close.
      [ERROR] at com.sleepycat.je.Database.closeInternal(Database.java:462)
      [ERROR] at com.sleepycat.je.Database.close(Database.java:314)
      [ERROR] at org.opends.server.backends.jeb.DatabaseContainer.close(DatabaseContainer.java:153)
      [ERROR] at org.opends.server.backends.jeb.AttributeIndex.close(AttributeIndex.java:391)
      [ERROR] at org.opends.server.backends.jeb.EntryContainer.close(EntryContainer.java:642)
      [ERROR] at org.opends.server.backends.jeb.RootContainer.close(RootContainer.java:566)
      [ERROR] at org.opends.server.backends.jeb.BackendImpl.importLDIF(BackendImpl.java:1212)
      [ERROR] at org.opends.server.tools.ImportLDIF.processLocal(ImportLDIF.java:1515)
      [ERROR] at org.opends.server.tools.tasks.TaskTool.process(TaskTool.java:390)
      [ERROR] at org.opends.server.tools.ImportLDIF.process(ImportLDIF.java:509)
      [ERROR] at org.opends.server.tools.ImportLDIF.mainImportLDIF(ImportLDIF.java:142)
      [ERROR] at org.opends.server.tools.ImportLDIF.main(ImportLDIF.java:104)

      Command run:

      export OPENDS_JAVA_ARGS="-server -Xms3G -Xmx3G"; import-ldif -b "dc=example,dc=com" --append --replaceExisting -n userRoot -l ~/mydata.ldif -R /tmp/rejects.txt

      Note that the reporter is using apeend/replace mode. The runtime exception is triggered in Index.deleteKey(DatabaseEntry, ImportIDSet, DatabaseEntry), so it looks like the import has got into an illegal state. Since the worker thread crashes its thread local cursor, which was allocated in Index.delete(DatabaseEntry, ImportIDSet, DatabaseEntry), is not closed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                matthew Matthew Swift
                Dev Assignee:
                Matthew Swift
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: