When using the condition environment LDAPFilter OpenAM adds a ShutdownManager Listener repeatedly. ShutdownManager listeners are not removed until OpenAM is shutdown, so it creates a leak.
With subject time to live disabled and many LDAPFilter condition filters, the leak will be noticeable more quickly. But even with subject ttl enabled, new listeners would be added after the cache expire, creating a slow leak as well.
Steps to reproduce
Install OpenAM + agent + agent profile + policy
Add a LDAP Filter condition environment to the policy
Disable subject TTL in order to see an impact more quickly: in Services > Policy Configuration > Subjects result Time To Live > set to 0
Access the protected resource (redirect to AM ; log user in; agent doing policy evaluation) -> policy evaluation being the key here.
Load test and take a heap dump
Expected Results
Should see only a small footprint for the shutdownmanager
Description
When using the condition environment LDAPFilter OpenAM adds a ShutdownManager Listener repeatedly. ShutdownManager listeners are not removed until OpenAM is shutdown, so it creates a leak.
With subject time to live disabled and many LDAPFilter condition filters, the leak will be noticeable more quickly. But even with subject ttl enabled, new listeners would be added after the cache expire, creating a slow leak as well.
Steps to reproduce
Expected Results
Should see only a small footprint for the shutdownmanager
Actual Results
ShutdownManager retained set increases regularly.
References