Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14361

Failed permission check during PersistenceManager.start()

XMLWordPrintable

    • Undefined
    • ---
    • ---

      To workaround ISPN-11121, we currently perform Cache.start() as a privileged action. However, while Infinispan normally starts the persistence manager during Cache.start(), this is not guaranteed, as individual components can restart without the cache itself restarting. By overriding the persistence manager component with a decorator, we can be more precise with our workaround.
      While this issue is unlikely to occur in the wild, it has been observed in our CI environment:

      https://ci.wildfly.org/viewLog.html?buildId=239281&buildTypeId=WF_PullRequest22x_LinuxSm

      &amp#27;[0m&amp#27;[31m17:48:28,241 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 93) MSC000001: Failed to start service org.wildfly.clustering.infinispan.cache.web."FineNonTransactionalSessionActivationTestCase.war": org.jboss.msc.service.StartException in service org.wildfly.clustering.infinispan.cache.web."FineNonTransactionalSessionActivationTestCase.war": org.infinispan.commons.CacheConfigurationException: Error starting component org.infinispan.persistence.manager.PersistenceManager
      	at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:66)
      	at org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.lang.Thread.run(Thread.java:748)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:513)
      Caused by: org.infinispan.commons.CacheConfigurationException: Error starting component org.infinispan.persistence.manager.PersistenceManager
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:560)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:775)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:610)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:574)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:552)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.access$700(BasicComponentRegistryImpl.java:30)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:775)
      	at org.infinispan.factories.ComponentRegistry.getLocalComponent(ComponentRegistry.java:174)
      	at org.infinispan.factories.ComponentRegistry.getLocalComponent(ComponentRegistry.java:180)
      	at org.wildfly.clustering.infinispan.spi.WildFlyInfinispanModuleLifecycle.cacheStarting(WildFlyInfinispanModuleLifecycle.java:44)
      	at org.infinispan.factories.ComponentRegistry.notifyCacheStarting(ComponentRegistry.java:230)
      	at org.infinispan.factories.ComponentRegistry.preStart(ComponentRegistry.java:220)
      	at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:235)
      	at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:210)
      	at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1008)
      	at org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:512)
      	at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:697)
      	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:643)
      	at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:532)
      	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:510)
      	at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:92)
      	at org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:77)
      	at org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:55)
      	at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:63)
      	... 7 more
      Caused by: java.util.concurrent.CompletionException: org.infinispan.persistence.spi.PersistenceException: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/store/work/tc-work/aefe2f90bf7646ab/testsuite/integration/clustering/target/wildfly-1/standalone/data/infinispan/web/FineNonTransactionalSessionActivationTestCase.war.dat" "read")" in code source "(vfs:/content/ExternalizerTestCase.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ExternalizerTestCase.war" from Service Module Loader")
      	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
      	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
      	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1643)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at org.jboss.as.clustering.context.ContextReferenceExecutor.execute(ContextReferenceExecutor.java:49)
      	at org.jboss.as.clustering.context.ContextualExecutor$1.run(ContextualExecutor.java:70)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.infinispan.persistence.spi.PersistenceException: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/store/work/tc-work/aefe2f90bf7646ab/testsuite/integration/clustering/target/wildfly-1/standalone/data/infinispan/web/FineNonTransactionalSessionActivationTestCase.war.dat" "read")" in code source "(vfs:/content/ExternalizerTestCase.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ExternalizerTestCase.war" from Service Module Loader")
      	at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:174)
      	at org.infinispan.persistence.support.NonBlockingStoreAdapter.lambda$start$0(NonBlockingStoreAdapter.java:108)
      	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640)
      	... 7 more
      Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/store/work/tc-work/aefe2f90bf7646ab/testsuite/integration/clustering/target/wildfly-1/standalone/data/infinispan/web/FineNonTransactionalSessionActivationTestCase.war.dat" "read")" in code source "(vfs:/content/ExternalizerTestCase.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.ExternalizerTestCase.war" from Service Module Loader")
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:309)
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:201)
      	at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
      	at org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:374)
      	at java.io.File.exists(File.java:816)
      	at org.infinispan.persistence.file.SingleFileStore.start(SingleFileStore.java:138)
      	... 9 more
      

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: