Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-16614

NPE when statistics are enabled

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Obsolete
    • 11.0.2
    • Backlog
    • Infinispan
    • NEW
    • NEW
    • ---
    • ---

    Description

      Under heavy load, errors start to happen:

      [0m�[33m20:32:59,107 WARNING [com.github.benmanes.caffeine.cache.BoundedLocalCache] (default task-20) Exception thrown by removal listener: java.lang.NullPointerException
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.eviction.impl.EvictionManagerImpl.updateEvictionStatistics(EvictionManagerImpl.java:45)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.eviction.impl.EvictionManagerImpl.onEntryEviction(EvictionManagerImpl.java:39)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.container.impl.AbstractInternalDataContainer$DefaultEvictionListener.onEntryEviction(AbstractInternalDataContainer.java:521)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.container.impl.AbstractInternalDataContainer.lambda$applyListener$5(AbstractInternalDataContainer.java:484)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$notifyRemoval$1(BoundedLocalCache.java:286)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:20)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.notifyRemoval(BoundedLocalCache.java:292)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.evictEntry(BoundedLocalCache.java:821)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.evictFromMain(BoundedLocalCache.java:638)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.evictEntries(BoundedLocalCache.java:504)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.maintenance(BoundedLocalCache.java:1137)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.performCleanUp(BoundedLocalCache.java:1108)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache$PerformCleanupTask.run(BoundedLocalCache.java:2979)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:20)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.scheduleDrainBuffers(BoundedLocalCache.java:1080)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.scheduleAfterWrite(BoundedLocalCache.java:1047)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.afterWrite(BoundedLocalCache.java:1017)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.remap(BoundedLocalCache.java:2272)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.BoundedLocalCache.compute(BoundedLocalCache.java:2146)
      	at com.github.ben-manes.caffeine@2.6.2.redhat-1//com.github.benmanes.caffeine.cache.LocalCache.compute(LocalCache.java:100)
      	at org.infinispan.commons@9.4.19.Final-redhat-00001//org.infinispan.commons.util.AbstractDelegatingMap.compute(AbstractDelegatingMap.java:81)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.container.impl.AbstractInternalDataContainer.compute(AbstractInternalDataContainer.java:234)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.container.impl.AbstractInternalDataContainer.compute(AbstractInternalDataContainer.java:253)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.cache.impl.SimpleCacheImpl.putForExternalReadInternal(SimpleCacheImpl.java:207)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.cache.impl.StatsCollectingCache.putForExternalReadInternal(StatsCollectingCache.java:200)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.cache.impl.SimpleCacheImpl.putForExternalRead(SimpleCacheImpl.java:180)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.cache.impl.AbstractDelegatingCache.putForExternalRead(AbstractDelegatingCache.java:49)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.cache.impl.EncoderCache.putForExternalRead(EncoderCache.java:175)
      	at org.infinispan@9.4.19.Final-redhat-00001//org.infinispan.cache.impl.AbstractDelegatingCache.putForExternalRead(AbstractDelegatingCache.java:49)
      	at org.keycloak.keycloak-model-infinispan@9.0.10.redhat-00001//org.keycloak.models.cache.infinispan.CacheManager.addRevisioned(CacheManager.java:164)
      	at org.keycloak.keycloak-model-infinispan@9.0.10.redhat-00001//org.keycloak.models.cache.infinispan.CacheManager.addRevisioned(CacheManager.java:133)
      	at org.keycloak.keycloak-model-infinispan@9.0.10.redhat-00001//org.keycloak.models.cache.infinispan.RealmCacheSession.getRoleById(RealmCacheSession.java:793)
      	at org.keycloak.keycloak-model-infinispan@9.0.10.redhat-00001//org.keycloak.models.cache.infinispan.RealmAdapter.getRoleById(RealmAdapter.java:651)
      	at org.keycloak.keycloak-model-infinispan@9.0.10.redhat-00001//org.keycloak.models.cache.infinispan.RoleAdapter.getComposites(RoleAdapter.java:134)
      	at org.keycloak.keycloak-server-spi@9.0.10.redhat-00001//org.keycloak.models.utils.RoleUtils.expandCompositeRolesStream(RoleUtils.java:126)
      	at org.keycloak.keycloak-server-spi@9.0.10.redhat-00001//org.keycloak.models.utils.RoleUtils.lambda$expandCompositeRoles$3(RoleUtils.java:148)
      	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
      	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1603)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
      	at org.keycloak.keycloak-server-spi@9.0.10.redhat-00001//org.keycloak.models.utils.RoleUtils.expandCompositeRoles(RoleUtils.java:149)
      	at org.keycloak.keycloak-server-spi@9.0.10.redhat-00001//org.keycloak.models.utils.RoleUtils.getDeepUserRoleMappings(RoleUtils.java:163)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.TokenManager.getAccess(TokenManager.java:502)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.services.util.DefaultClientSessionContext.loadRoles(DefaultClientSessionContext.java:250)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.services.util.DefaultClientSessionContext.getRoles(DefaultClientSessionContext.java:128)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.utils.RoleResolveUtil.getAndCacheResolvedRoles(RoleResolveUtil.java:106)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.utils.RoleResolveUtil.getAllResolvedClientRoles(RoleResolveUtil.java:96)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.mappers.AudienceResolveProtocolMapper.transformAccessToken(AudienceResolveProtocolMapper.java:84)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.TokenManager.transformAccessToken(TokenManager.java:589)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.TokenManager.createClientAccessToken(TokenManager.java:448)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.TokenManager$AccessTokenResponseBuilder.generateAccessToken(TokenManager.java:748)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.endpoints.TokenEndpoint.clientCredentialsGrant(TokenEndpoint.java:695)
      	at org.keycloak.keycloak-services@9.0.10.redhat-00001//org.keycloak.protocol.oidc.endpoints.TokenEndpoint.processGrantRequest(TokenEndpoint.java:192)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              psilva@redhat.com Pedro Igor Craveiro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: