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

StackOverflowError involving MSADUserAccountControlStorageMapper

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 4.7.0.Final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Steps to Reproduce:
      Hide

      1. Setup Keycloak 4.7.0 with AD federation fully backed by AD
      2. Create a group
      3. Create some users and add to the group
      4. Go to the Members tab of the created group and keep pressing "Next Page" and "Previous Page"
      5. The stacktrace provided on the description you show up eventually in the logs, and an error message will be shown to the user
      (This also happens in other areas where the AD store is queried, but this is the case where I got the stacktrace)

      Show
      1. Setup Keycloak 4.7.0 with AD federation fully backed by AD 2. Create a group 3. Create some users and add to the group 4. Go to the Members tab of the created group and keep pressing "Next Page" and "Previous Page" 5. The stacktrace provided on the description you show up eventually in the logs, and an error message will be shown to the user (This also happens in other areas where the AD store is queried, but this is the case where I got the stacktrace)
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      I see the following stacktrace happening kind of randmly when using the admin console, I couldn't find a pattern yet. This specific one happened when I was navigating through the list of members of a group. Keycloak shows an error on the screen, and then if I just refresh it is back to work again and I can see the same result page that's just failed, so it doesn't seem related to any specific user or group.

      Dec 12 00:25:06 s standalone.sh[29129]: 00:25:06,415 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-21) Uncaught server error: java.lang.StackOverflowError
      Dec 12 00:25:06 s standalone.sh[29129]: at sun.reflect.GeneratedMethodAccessor371.invoke(Unknown Source)
      Dec 12 00:25:06 s standalone.sh[29129]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      Dec 12 00:25:06 s standalone.sh[29129]: at java.lang.reflect.Method.invoke(Method.java:498)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:49)
      Dec 12 00:25:06 s standalone.sh[29129]: at com.sun.proxy.$Proxy83.find(Unknown Source)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.jpa.JpaUserProvider.getUserById(JpaUserProvider.java:520)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.storage.UserStorageManager.getUserById(UserStorageManager.java:369)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.UserAdapter.getUserModel(UserAdapter.java:400)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.DefaultLazyLoader.get(DefaultLazyLoader.java:42)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.entities.CachedUser.getRequiredActions(CachedUser.java:112)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.UserAdapter.getRequiredActions(UserAdapter.java:174)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.storage.ldap.mappers.msad.MSADUserAccountControlStorageMapper$MSADUserModelDelegate.getRequiredActions(MSADUserAccountControlStorageMapper.java:305)
      ....
      (repeat a lot of times)
      ....
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.DefaultLazyLoader.get(DefaultLazyLoader.java:43)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.entities.CachedUser.getRequiredActions(CachedUser.java:112)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.UserAdapter.getRequiredActions(UserAdapter.java:174)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.storage.ldap.mappers.msad.MSADUserAccountControlStorageMapper$MSADUserModelDelegate.getRequiredActions(MSADUserAccountControlStorageMapper.java:305)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.DefaultLazyLoader.get(DefaultLazyLoader.java:43)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.entities.CachedUser.getRequiredActions(CachedUser.java:112)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.cache.infinispan.UserAdapter.getRequiredActions(UserAdapter.java:174)
      Dec 12 00:25:06 s standalone.sh[29129]: at org.keycloak.models.utils.UserModelDelegate.getRequiredActions(UserModelDelegate.java:99)
      

      How can I help to further investigate it?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  brunojcm Bruno Medeiros
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: