ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Web Agent Option Pack memory leak at stop

book

Article ID: 214108

calendar_today

Updated On:

Products

SITEMINDER

Issue/Introduction

 

When stopping Web Agent Option Pack, the Tomcat Application Server
doesn't stop and reports error :

catalina.out :

    11-Mar-2021 20:38:43.856 INFO [main]
    org.apache.catalina.core.StandardServer.await A valid shutdown
    command was received via the shutdown port. Stopping the Server
    instance.

    11-Mar-2021 20:38:43.857 INFO [main]
    org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
    ["http-nio-8080"]

    11-Mar-2021 20:38:43.867 INFO [main]
    org.apache.catalina.core.StandardService.stopInternal Stopping
    service [Catalina]

    11-Mar-2021 20:38:43.917 WARNING [main]
    org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads
    The web application [affwebservices] appears to have started a
    thread named [Thread-4] but has failed to stop it. This is very
    likely to create a memory leak. Stack trace of thread:
    java.lang.Thread.sleep(Native Method)

     com.netegrity.siteminder.agentcommon.framework.g9.run(DashoA10*..:98)

    11-Mar-2021 20:38:43.918 WARNING [main]
    org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads
    The web application [affwebservices] appears to have started a
    thread named [Thread-5] but has failed to stop it. This is very
    likely to create a memory leak. Stack trace of thread:
    java.lang.Thread.sleep(Native Method)

     com.netegrity.affiliateminder.webservices.utils.ab.run(DashoA10*..:587)
     java.lang.Thread.run(Thread.java:748)

 

Environment

 

  Web Agent Option Pack 12.52SP1CR09 on Tomcat 9 on RedHat 7;

 

Resolution

 

Upgrade Web Agent Option Pack to 12.52SP1CR12 when this one will be
available.

The fix will make the Tomcat server stop.

Still you'll see the error :

catalina.out

  28-Apr-2021 09:53:10.093 INFO [main]
  org.apache.catalina.core.StandardServer.await A valid shutdown
  command was received via the shutdown port. Stopping the Server
  instance.

  28-Apr-2021 09:53:10.093 INFO [main]
  org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler
  ["http-nio-8080"]

  28-Apr-2021 09:53:10.109 INFO [main]
  org.apache.catalina.core.StandardService.stopInternal Stopping
  service [Catalina]

  com.netegrity.siteminder.agentcommon.framework.j: The Configuration
  Manager may not have been initialized.

   at com.netegrity.siteminder.agentcommon.framework.e.a(DashoA10*..:193)
   at com.netegrity.affiliateminder.webservices.admin.d.c(DashoA10*..:209)
   [...]
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)

  Exception history:

   com.netegrity.siteminder.agentcommon.framework.j: The
   Configuration Manager may not have been initialized.

  28-Apr-2021 09:53:10.980 WARNING [main]
  org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads
  The web application [affwebservices] appears to have started a
  thread named [Thread-5] but has failed to stop it. This is very
  likely to create a memory leak. Stack trace of thread:

   java.lang.Thread.sleep(Native Method)
   com.netegrity.affiliateminder.webservices.utils.ab.run(DashoA10*..:587)
   java.lang.Thread.run(Thread.java:748)

  28-Apr-2021 09:53:10.988 INFO [main]
  org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler
  ["http-nio-8080"]

  28-Apr-2021 09:53:10.996 INFO [main]
  org.apache.coyote.AbstractProtocol.destroy Destroying
  ProtocolHandler ["http-nio-8080"]

The reason of this is that in the code, we obfuscate the code
thread/class name will not be logged as is. That why we see

    com.netegrity.affiliateminder.webservices.utils.ab.run(DashoA10*..:587

This one is a daemon thread which will exit as soon as all the user
threads exit. So we can ignore this warning.

We just need to see if the JVM process is exited or not after
shutting down Tomcat (which was not the case earlier).