-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynalink leaks memory when adaptive authentication scripts are used with JDK 11 #16597
Comments
The aforementioned issue was tested with WSO2 IS 6.0.0.119 using JDK 17.0.7, and it appears that the issue has been resolved. The same test mentioned above was conducted for approximately 3 hours, and the JConsole results were as follows. As you can observe, the heap now clears properly when compared to the screenshot included in the previous comment. Furthermore, we acquired a heap dump and analyzed it to verify the presence of Dynalink objects. However, we could not locate any such objects in the two heap dumps that were obtained. The screenshot below provides further illustration. |
The above issue was tested with WSO2 IS 5.10.0.248 with Java 11.0.20. I used a JMeter script to call the authorize endpoint indefinitely and was able to observe the same increase of memory. I observed that the Old Gen memory is increasing linearly with the number of executions and becomes static when the test script is stopped. Tested the same script in Java 8 and noticed that the Old Generation memory is reduced frequantly than with Java 11. |
Temporary fix: wso2/carbon-identity-framework#5202 |
An alternative script execution engine in introduced with wso2/carbon-identity-framework#5279. |
Describe the issue:
When adaptive authentication scripts are used with JDK 11 a memory leak identified at JDK's end [1] causes the WSO2 Identity Server (WSO2 IS) to go out of memory (OOM). The heap memory rises and it does not get cleared up.
How to reproduce:
In my case, the -Xmx was configured to the default value of 1024, and the authorize calls sent during that time added up to about 1 million requests.
Sample screenshots with the evidence are attached below:
Heap Dump Analysis:
JConsole Overview during the test:
Expected behavior:
The fix for the issue is provided with JDK 17 but it has not been sent out to JDK 11. If the fix is not ported to JDK 11 alternatives should be looked into.
Environment information (Please complete the following information; remove any unnecessary fields) :
References:
[1] - https://bugs.openjdk.org/browse/JDK-8198540
The text was updated successfully, but these errors were encountered: