Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-8051

PersistentCache: error during open can lead to incomplete initialization and subsequent NPEs

    XMLWordPrintableJSON

    Details

      Description

      Seen in the wild (in 1.6.6):

      22.01.2019 08:45:13.153 *WARN* [http-/0.0.0.0:80-3] org.apache.jackrabbit.oak.plugins.document.persistentCache.MapFactory Could not open the store _path_/cache-4.data
      java.lang.IllegalStateException: The file is locked: nio:_path_/cache-4.data [1.4.193/7]
      	at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765)
      	at org.h2.mvstore.FileStore.open(FileStore.java:168)
      	at org.h2.mvstore.MVStore.<init>(MVStore.java:348)
      	at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2923)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache$1.openStore(PersistentCache.java:288)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.createMapFactory(PersistentCache.java:361)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.<init>(PersistentCache.java:210)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.getPersistentCache(DocumentMK.java:1232)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.buildCache(DocumentMK.java:1211)
      

      Later on:

      22.01.2019 08:45:13.155 *WARN* [http-/0.0.0.0:80-3] org.apache.jackrabbit.oak.plugins.document.persistentCache.MapFactory Could not open the map
      java.lang.NullPointerException: null
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache$1.openMap(PersistentCache.java:335)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.CacheMap.openMap(CacheMap.java:135)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.CacheMap.<init>(CacheMap.java:48)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.openMap(PersistentCache.java:468)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.NodeCache.addGeneration(NodeCache.java:115)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.initGenerationCache(PersistentCache.java:452)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.PersistentCache.wrap(PersistentCache.java:443)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.buildCache(DocumentMK.java:1214)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.buildPrevDocumentsCache(DocumentMK.java:1182)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.buildNodeDocumentCache(DocumentMK.java:1189)
      	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.initialize(RDBDocumentStore.java:798)
      	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.<init>(RDBDocumentStore.java:212)
      	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.<init>(RDBDocumentStore.java:224)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.setRDBConnection(DocumentMK.java:757)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStore(DocumentNodeStoreService.java:508)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStoreIfPossible(DocumentNodeStoreService.java:430)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.activate(DocumentNodeStoreService.java:414)
      

      and then

      22.01.2019 08:45:16.808 *WARN* [http-/0.0.0.0:80-3] org.apache.jackrabbit.oak.plugins.document.persistentCache.CacheMap Re-opening map PREV_DOCUMENT
      java.lang.NullPointerException: null
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.CacheMap.get(CacheMap.java:87)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.MultiGenerationMap.readValue(MultiGenerationMap.java:71)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.NodeCache.asyncReadIfPresent(NodeCache.java:147)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.NodeCache.readIfPresent(NodeCache.java:130)
      	at org.apache.jackrabbit.oak.plugins.document.persistentCache.NodeCache.getIfPresent(NodeCache.java:213)
      	at org.apache.jackrabbit.oak.plugins.document.cache.NodeDocumentCache.getIfPresent(NodeDocumentCache.java:155)
      	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.readDocumentCached(RDBDocumentStore.java:1130)
      	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.find(RDBDocumentStore.java:234)
      	at org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.find(RDBDocumentStore.java:229)
      	at org.apache.jackrabbit.oak.plugins.document.NodeDocument.getPreviousDocument(NodeDocument.java:1338)
      	at org.apache.jackrabbit.oak.plugins.document.NodeDocument.getPreviousDocs(NodeDocument.java:1307)
      	at org.apache.jackrabbit.oak.plugins.document.ValueMap$2.containsKey(ValueMap.java:170)
      	at org.apache.jackrabbit.oak.plugins.document.NodeDocument.getPreviousDocs(NodeDocument.java:1309)
      	at org.apache.jackrabbit.oak.plugins.document.ValueMap$2.containsKey(ValueMap.java:170)
      	at org.apache.jackrabbit.oak.plugins.document.NodeDocument.getPreviousDocs(NodeDocument.java:1309)
      	at org.apache.jackrabbit.oak.plugins.document.NodeDocument.isCommitted(NodeDocument.java:547)
      	at org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.determineLastModification(LastRevRecoveryAgent.java:402)
      	at org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.recover(LastRevRecoveryAgent.java:191)
      	at org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.recover(LastRevRecoveryAgent.java:156)
      	at org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.recoverCandidates(LastRevRecoveryAgent.java:369)
      	at org.apache.jackrabbit.oak.plugins.document.LastRevRecoveryAgent.recover(LastRevRecoveryAgent.java:128)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.checkLastRevRecovery(DocumentNodeStore.java:646)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.<init>(DocumentNodeStore.java:564)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.getNodeStore(DocumentMK.java:856)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStore(DocumentNodeStoreService.java:551)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStoreIfPossible(DocumentNodeStoreService.java:430)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.activate(DocumentNodeStoreService.java:414)
      

        Attachments

        1. OAK-8051.diff
          5 kB
          Julian Reschke
        2. OAK-8051.diff
          4 kB
          Julian Reschke

          Activity

            People

            • Assignee:
              reschke Julian Reschke
              Reporter:
              reschke Julian Reschke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: