Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-1061

Deadlock in LDAPv3Repo

    XMLWordPrintable

    Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Snapshot9.5.1, Snapshot9.5.2, 9.5.3, 9.5.4
    • 9.5.5, 10.0.0
    • idrepo
    • None
    • N/A
    • Rank:
      1|hzn8pb:

      Description

      This issue is related to OPENSSO-1914 which hasn't been fully fixed.
      http://java.net/jira/browse/OPENSSO-1914

      1. login to admin console
      2. click [Configuration] -> [Servers and Sites] -> click your server -> [SDK] tab
      3. under "Data Store" section, change the parameter as follows:
      Enable Datastore Notification: Yes
      Specifies if backend datastore notification is enabled. If this value is set to 'false', then in-memory notification is enabled. (property name: com.sun.identity.sm.enableDataStoreNotification)
      4. under "Event Service", removed sm and/or um from the list of disabled event service connection
      Disabled Event Service Connection: aci, um, sm
      Specifies which event connection (persistent search) to be disabled. There are three valid values - aci, sm and um (case insensitive). Multiple values should be separated with ",". (property name: com.sun.am.event.connection.disable.list)

      Or alternatively, install openAM with external datastore and you will get the above configuration.

      When openAM EventService receives any pre configured errors(ie. err=80,81,91), it will trigger RetryTask and start removing LDAP listeners. During this cleanup phase, if there were another thread accessing LDAPv3Repo plugin and if the listener is not already there, it will try to add LDAP listeners. This causes deadlock. The issue is more likely to reproduce if openAM is receving large number of ldap errors and if RetryTask is running often.

      "SystemTimer" prio=10 tid=0x000000004b7ce800 nid=0x3ace waiting for monitor entry [0x0000000041ca1000]
      java.lang.Thread.State: BLOCKED (on object monitor)
      at java.util.Collections$SynchronizedMap.get(Collections.java:1975)

      • waiting to lock <0x000000079ac0af48> (a java.util.Collections$SynchronizedMap)
        at com.sun.identity.idm.plugins.ldapv3.LDAPv3Repo.objectChanged(LDAPv3Repo.java:5215)
        at com.sun.identity.idm.plugins.ldapv3.LDAPv3EventService.dispatchEventAllChanged(LDAPv3EventService.java:937)
        at com.sun.identity.idm.plugins.ldapv3.LDAPv3EventService.removeListener(LDAPv3EventService.java:403)
      • locked <0x00000007cb784438> (a com.sun.identity.idm.plugins.ldapv3.LDAPv3EventService)
        at com.sun.identity.idm.plugins.ldapv3.LDAPv3Repo.removeListener(LDAPv3Repo.java:1472)
        at com.sun.identity.idm.server.IdRepoPluginsCache.clearIdRepoPluginsCache(IdRepoPluginsCache.java:309)
        at com.sun.identity.idm.server.IdRepoPluginsCache.schemaChanged(IdRepoPluginsCache.java:670)
        at com.sun.identity.sm.ServiceSchemaManagerImpl.allObjectsChanged(ServiceSchemaManagerImpl.java:381)
        at com.sun.identity.sm.SMSNotificationManager.allObjectsChan1472ged(SMSNotificationManager.java:343)
        at com.sun.identity.sm.ldap.LDAPEventManager.allEntriesChanged(LDAPEventManager.java:170)
        at com.iplanet.services.ldap.event.EventService$RetryTask.run(EventService.java:1229)
        at com.sun.identity.common.TimerPool$WorkerThread.run(TimerPool.java:430)

      "http-8080-2" daemon prio=10 tid=0x000000004ab8a800 nid=0x3be9 waiting for monitor entry [0x0000000040702000]
      java.lang.Thread.State: BLOCKED (on object monitor)
      at com.sun.identity.idm.plugins.ldapv3.LDAPv3EventService.addListener(LDAPv3EventService.java:440)

      • waiting to lock <0x00000007cb784438> (a com.sun.identity.idm.plugins.ldapv3.LDAPv3EventService)
        at com.sun.identity.idm.plugins.ldapv3.LDAPv3Repo.addListener(LDAPv3Repo.java:1583)
      • locked <0x000000079ac0af48> (a java.util.Collections$SynchronizedMap)
        at com.sun.identity.idm.server.IdRepoPluginsCache.constructIdRepoPlugin(IdRepoPluginsCache.java:487)
        at com.sun.identity.idm.server.IdRepoPluginsCache.getIdRepoPlugins(IdRepoPluginsCache.java:137)
      • locked <0x000000079ad1a8f8> (a java.util.HashMap)
        at com.sun.identity.idm.server.IdRepoPluginsCache.getIdRepoPlugins(IdRepoPluginsCache.java:182)
        at com.sun.identity.idm.server.IdServicesImpl.getAssignedServices(IdServicesImpl.java:1860)
        at com.sun.identity.idm.AMIdentity.getAssignedServices(AMIdentity.java:626)

        Attachments

          Activity

            People

            sachiko Sachiko Wallace
            sachiko Sachiko Wallace
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: