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

Failed to acquire lock registering the ShutdownListener when shutting down OpenAM

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 14.0.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      JDK 1.8, Tomcat 8.5

      Description

      The following error is logged in CoreSystem after shutting down OpenAM

      amSecurity:01/12/2017 02:19:33:304 PM GMT: Thread[localhost-startStop-2,5,main]: TransactionId[29c3d388-ab1f-4d5b-b456-af3ca21cee02-65]
      ERROR: AdminTokenAction.reset: cannot destroy appSSOToken.
      com.iplanet.sso.SSOException: Failed to acquire lock registering the ShutdownListener
              at com.iplanet.sso.providers.dpro.SSOProviderImpl.destroyToken(SSOProviderImpl.java:349)
              at com.iplanet.sso.SSOTokenManager.destroyToken(SSOTokenManager.java:490)
              at com.sun.identity.security.AdminTokenAction.resetInstance(AdminTokenAction.java:194)
              at com.sun.identity.security.AdminTokenAction.reset(AdminTokenAction.java:188)
              at com.sun.identity.security.AdminTokenAction$1.shutdown(AdminTokenAction.java:143)
              at com.sun.identity.common.ShutdownManager.shutdown(ShutdownManager.java:218)
              at com.sun.identity.common.ShutdownServletContextListener.contextDestroyed(ShutdownServletContextListener.java:51)
              at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4774)
              at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5411)
              at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
              at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBzase.java:1420)
      #         at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1409)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.iplanet.dpro.session.SessionException: Failed to acquire lock registering the ShutdownListener
              at com.iplanet.dpro.session.Session.refresh(Session.java:750)
              at org.forgerock.openam.session.SessionCache.getSession(SessionCache.java:253)
              at org.forgerock.openam.session.SessionCache.getSession(SessionCache.java:203)
              at org.forgerock.openam.session.SessionCache.getSession(SessionCache.java:188)
              at com.iplanet.sso.providers.dpro.SSOProviderImpl.destroyToken(SSOProviderImpl.java:343)
              ... 15 more
      Caused by: java.lang.IllegalMonitorStateException: Failed to acquire lock registering the ShutdownListener
              at com.sun.identity.common.ShutdownManager.addShutdownListener(ShutdownManager.java:145)
              at org.forgerock.openam.cts.impl.queue.AsyncResultHandler.<init>(AsyncResultHandler.java:79)
              at org.forgerock.openam.cts.impl.queue.AsyncResultHandler.<init>(AsyncResultHandler.java:65)
              at org.forgerock.openam.cts.impl.queue.AsyncResultHandlerFactory.getUpdateHandler(AsyncResultHandlerFactory.java:73)
              at org.forgerock.openam.cts.monitoring.impl.queue.MonitoredResultHandlerFactory.getUpdateHandler(MonitoredResultHandlerFactory.java:70)
              at org.forgerock.openam.cts.impl.CoreTokenAdapter.updateOrCreate(CoreTokenAdapter.java:149)
              at org.forgerock.openam.cts.CTSPersistentStoreImpl.update(CTSPersistentStoreImpl.java:155)
              at org.forgerock.openam.cts.CTSPersistentStoreImpl.update(CTSPersistentStoreImpl.java:150)
              at org.forgerock.openam.session.service.access.persistence.SessionPersistenceStore.save(SessionPersistenceStore.java:119)
              at org.forgerock.openam.session.service.access.persistence.InternalSessionPersistenceStore.store(InternalSessionPersistenceStore.java:49)
              at org.forgerock.openam.session.service.access.persistence.InternalSessionStoreChain$ChainIterator.store(InternalSessionStoreChain.java:71)
              at org.forgerock.openam.session.service.access.persistence.SessionPersistenceManagerStep.store(SessionPersistenceManagerStep.java:50)
              at org.forgerock.openam.session.service.access.persistence.InternalSessionStoreChain$ChainIterator.store(InternalSessionStoreChain.java:69)
              at org.forgerock.openam.session.service.access.persistence.caching.InMemoryInternalSessionCacheStep.store(InMemoryInternalSessionCacheStep.java:98)
              at org.forgerock.openam.session.service.access.persistence.InternalSessionStoreChain$ChainIterator.store(InternalSessionStoreChain.java:69)
              at org.forgerock.openam.session.service.access.persistence.AbstractInternalSessionStoreStep.store(AbstractInternalSessionStoreStep.java:36)
              at org.forgerock.openam.session.service.access.persistence.InternalSessionStoreChain$ChainIterator.store(InternalSessionStoreChain.java:69)
              at org.forgerock.openam.session.service.access.persistence.InternalSessionStoreChain.store(InternalSessionStoreChain.java:45)
              at org.forgerock.openam.session.service.access.persistence.SessionPersistenceManagerStep.notifyUpdate(SessionPersistenceManagerStep.java:64)
              at com.iplanet.dpro.session.service.InternalSession.notifyPersistenceManager(InternalSession.java:1179)
              at com.iplanet.dpro.session.service.InternalSession.setLatestAccessTime(InternalSession.java:701)
              at com.iplanet.dpro.session.operations.strategies.LocalOperations.getSessionInfo(LocalOperations.java:203)
              at com.iplanet.dpro.session.operations.strategies.LocalOperations.refresh(LocalOperations.java:119)
              at com.iplanet.dpro.session.monitoring.MonitoredOperations.refresh(MonitoredOperations.java:68)
              at com.iplanet.dpro.session.Session.doRefresh(Session.java:763)
              at com.iplanet.dpro.session.Session.access$000(Session.java:84)
              at com.iplanet.dpro.session.Session$1.run(Session.java:739)
              at com.sun.identity.session.util.RestrictedTokenContext.doUsing(RestrictedTokenContext.java:81)
              at com.iplanet.dpro.session.Session.refresh(Session.java:736)
              ... 19 more
      

      To reproduce:

      1. deploy OpenAM WAR in Tomcat
      2. run the configurator
      3. shutdown Tomcat
      4. observe CoreSystem debug file

      Please consider removing the stack trace for non-debug error levels as per: OPENAM-10373

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              n4al Nemanja Lukic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: