Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1281

StreamCorruptedException after brutal shutdown

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.4
    • Fix Version/s: 2.0.0-M11
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows XP

      Description

      Twice I deleted 300 entries from client on machine A and at the same time pressed the shut-down button on Machine B holding the ApacheDS instance.

      The service will not restart after a reboot, meaning I will have to delete the instance and refill t from an LDIF.

      The log:

      Error first time at service restart:
      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      [14:48:32] ERROR [org.apache.directory.daemon.Bootstrapper] - Failed on null.init(InstallationLayout, String[])
      java.io.StreamCorruptedException: invalid type code: 2E
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at jdbm.btree.BPage.deserialize(BPage.java:979)
      at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)
      at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)
      at jdbm.btree.BPage.loadBPage(BPage.java:826)
      at jdbm.btree.BPage.childBPage(BPage.java:816)
      at jdbm.btree.BPage.find(BPage.java:285)
      at jdbm.btree.BTree.find(BTree.java:407)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.get(JdbmTable.java:366)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex.forwardLookup(JdbmIndex.java:403)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getEntryId(JdbmStore.java:722)
      at org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine.cursor(DefaultSearchEngine.java:99)
      at org.apache.directory.server.core.partition.impl.btree.BTreePartition.search(BTreePartition.java:238)
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:965)
      at org.apache.directory.server.core.authz.TupleCache.initialize(TupleCache.java:138)
      at org.apache.directory.server.core.authz.TupleCache.<init>(TupleCache.java:111)
      at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init(AciAuthorizationInterceptor.java:210)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register0(InterceptorChain.java:439)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register(InterceptorChain.java:395)
      at org.apache.directory.server.core.interceptor.InterceptorChain.init(InterceptorChain.java:255)
      at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1385)
      at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:840)
      at org.apache.directory.server.configuration.ApacheDS.startup(ApacheDS.java:126)
      at org.apache.directory.server.Service.init(Service.java:86)
      at org.apache.directory.daemon.Bootstrapper.callInit(Bootstrapper.java:151)
      at org.apache.directory.daemon.TanukiBootstrapper.start(TanukiBootstrapper.java:51)
      at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
      [16:18:23] ERROR [org.apache.directory.daemon.Bootstrapper] - Failed on null.init(InstallationLayout, String[])
      java.io.StreamCorruptedException: invalid type code: 2E
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at jdbm.btree.BPage.deserialize(BPage.java:979)
      at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)
      at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)
      at jdbm.btree.BPage.loadBPage(BPage.java:826)
      at jdbm.btree.BPage.childBPage(BPage.java:816)
      at jdbm.btree.BPage.find(BPage.java:285)
      at jdbm.btree.BTree.find(BTree.java:407)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.get(JdbmTable.java:366)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex.forwardLookup(JdbmIndex.java:403)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getEntryId(JdbmStore.java:722)
      at org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine.cursor(DefaultSearchEngine.java:99)
      at org.apache.directory.server.core.partition.impl.btree.BTreePartition.search(BTreePartition.java:238)
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:965)
      at org.apache.directory.server.core.authz.TupleCache.initialize(TupleCache.java:138)
      at org.apache.directory.server.core.authz.TupleCache.<init>(TupleCache.java:111)
      at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init(AciAuthorizationInterceptor.java:210)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register0(InterceptorChain.java:439)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register(InterceptorChain.java:395)
      at org.apache.directory.server.core.interceptor.InterceptorChain.init(InterceptorChain.java:255)
      at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1385)
      at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:840)
      at org.apache.directory.server.configuration.ApacheDS.startup(ApacheDS.java:126)
      at org.apache.directory.server.Service.init(Service.java:86)
      at org.apache.directory.daemon.Bootstrapper.callInit(Bootstrapper.java:151)
      at org.apache.directory.daemon.TanukiBootstrapper.start(TanukiBootstrapper.java:51)
      at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      Error second time:
      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      [15:49:35] ERROR [org.apache.directory.daemon.Bootstrapper] - Failed on null.init(InstallationLayout, String[])
      java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
      at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
      at java.io.ObjectInputStream.<init>(Unknown Source)
      at jdbm.btree.BPage.deserialize(BPage.java:965)
      at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)
      at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)
      at jdbm.btree.BPage.loadBPage(BPage.java:826)
      at jdbm.btree.BPage.childBPage(BPage.java:816)
      at jdbm.btree.BPage.find(BPage.java:285)
      at jdbm.btree.BTree.find(BTree.java:407)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.get(JdbmTable.java:366)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex.forwardLookup(JdbmIndex.java:403)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getEntryId(JdbmStore.java:722)
      at org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine.cursor(DefaultSearchEngine.java:99)
      at org.apache.directory.server.core.partition.impl.btree.BTreePartition.search(BTreePartition.java:238)
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:965)
      at org.apache.directory.server.core.authz.TupleCache.initialize(TupleCache.java:138)
      at org.apache.directory.server.core.authz.TupleCache.<init>(TupleCache.java:111)
      at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init(AciAuthorizationInterceptor.java:210)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register0(InterceptorChain.java:439)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register(InterceptorChain.java:395)
      at org.apache.directory.server.core.interceptor.InterceptorChain.init(InterceptorChain.java:255)
      at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1385)
      at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:840)
      at org.apache.directory.server.configuration.ApacheDS.startup(ApacheDS.java:126)
      at org.apache.directory.server.Service.init(Service.java:86)
      at org.apache.directory.daemon.Bootstrapper.callInit(Bootstrapper.java:151)
      at org.apache.directory.daemon.TanukiBootstrapper.start(TanukiBootstrapper.java:51)
      at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
      [15:57:11] ERROR [org.apache.directory.daemon.Bootstrapper] - Failed on null.init(InstallationLayout, String[])
      java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
      at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
      at java.io.ObjectInputStream.<init>(Unknown Source)
      at jdbm.btree.BPage.deserialize(BPage.java:965)
      at jdbm.recman.BaseRecordManager.fetch(BaseRecordManager.java:341)
      at jdbm.recman.CacheRecordManager.fetch(CacheRecordManager.java:263)
      at jdbm.btree.BPage.loadBPage(BPage.java:826)
      at jdbm.btree.BPage.childBPage(BPage.java:816)
      at jdbm.btree.BPage.find(BPage.java:285)
      at jdbm.btree.BTree.find(BTree.java:407)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.get(JdbmTable.java:366)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex.forwardLookup(JdbmIndex.java:403)
      at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getEntryId(JdbmStore.java:722)
      at org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine.cursor(DefaultSearchEngine.java:99)
      at org.apache.directory.server.core.partition.impl.btree.BTreePartition.search(BTreePartition.java:238)
      at org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:965)
      at org.apache.directory.server.core.authz.TupleCache.initialize(TupleCache.java:138)
      at org.apache.directory.server.core.authz.TupleCache.<init>(TupleCache.java:111)
      at org.apache.directory.server.core.authz.AciAuthorizationInterceptor.init(AciAuthorizationInterceptor.java:210)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register0(InterceptorChain.java:439)
      at org.apache.directory.server.core.interceptor.InterceptorChain.register(InterceptorChain.java:395)
      at org.apache.directory.server.core.interceptor.InterceptorChain.init(InterceptorChain.java:255)
      at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1385)
      at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:840)
      at org.apache.directory.server.configuration.ApacheDS.startup(ApacheDS.java:126)
      at org.apache.directory.server.Service.init(Service.java:86)
      at org.apache.directory.daemon.Bootstrapper.callInit(Bootstrapper.java:151)
      at org.apache.directory.daemon.TanukiBootstrapper.start(TanukiBootstrapper.java:51)
      at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)

        Issue Links

          Activity

          Hide
          Emmanuel Lecharny added a comment -

          Once we will have written this tool, we will be able to fix corrupted databases

          Show
          Emmanuel Lecharny added a comment - Once we will have written this tool, we will be able to fix corrupted databases
          Hide
          Emmanuel Lecharny added a comment -

          Will be fixed with 1.5.5

          Show
          Emmanuel Lecharny added a comment - Will be fixed with 1.5.5
          Hide
          Emmanuel Lecharny added a comment -

          Postponed to 2.0.0-RC1

          Show
          Emmanuel Lecharny added a comment - Postponed to 2.0.0-RC1
          Hide
          Pierre-Arnaud Marcelot added a comment -

          Version 2.0.0-M1 has been released.
          Moving all related non-resolved issues to the next version.

          Show
          Pierre-Arnaud Marcelot added a comment - Version 2.0.0-M1 has been released. Moving all related non-resolved issues to the next version.
          Hide
          Pierre-Arnaud Marcelot added a comment -

          Version 2.0.0-M1 has been released.
          Moving all related non-resolved issues to the next version.

          Show
          Pierre-Arnaud Marcelot added a comment - Version 2.0.0-M1 has been released. Moving all related non-resolved issues to the next version.
          Hide
          Pierre-Arnaud Marcelot added a comment -

          Version 2.0.0-M3 has been released a couple months ago.

          Assigned the remaining opened JIRA to the next iteration (2.0.0-M4).

          Show
          Pierre-Arnaud Marcelot added a comment - Version 2.0.0-M3 has been released a couple months ago. Assigned the remaining opened JIRA to the next iteration (2.0.0-M4).
          Hide
          Emmanuel Lecharny added a comment -

          Should not be the case anymore : we have switched to a Transaction mode that write the changes in a Journal, and apply them at reboot, so the data are always up to date.

          Show
          Emmanuel Lecharny added a comment - Should not be the case anymore : we have switched to a Transaction mode that write the changes in a Journal, and apply them at reboot, so the data are always up to date.

            People

            • Assignee:
              Unassigned
              Reporter:
              Robert Mertens
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development