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
NullPointerException from FStringEqual.hashCode #6039
Comments
This would be caused if the Questions for you:
|
We may also see more information if you run with assertions enabled at the JVM level, e.g. |
It is happening each time when I stop Tomcat server - I do not even hit the application that will trigger ruby evaluation, so in my testing the ruby code in the web application should not matter - I just package jruby-complete into war file and deploy this under Tomcat 8.5 with options to detect memory leaks - once the server is started up I just kill the server using Ctrl+C and during the tomcat stop this exception is displaying in the tomcat console as stacktrace exception Also during the startup following warnings are displayed:
|
if I use --illegal-access=warn I do get one more warning regards NativeThread.current() :
|
The warnings are unrelated to the error. They're from Java modules and are only informational (but we're slowly getting rid of them). I was able to reproduce this issue by setting the 2.times { JRuby.runtime.freezeAndDedupString("blah") };
p JRuby.runtime.DEDUP_WRAPPER_CACHE.get.hash This is not really a bug in JRuby. We use this thread-local cache to store a string wrapper used for looking up a Ruby string while considering both its byte content and its encoding. It's perfectly valid for the thread-local to contain such a wrapper with its string set to Tomcat's aggressive thread-local leak detector actively searches for objects in thread-local storage, and upon finding one it tries to print out information about that object. In this case, that means calling Had Tomcat not been digging around in our thread-locals, this error would never have happened. In any case, I will fix this by making vacated wrappers silently return 0 for |
thanks @headius |
Environment
Java web application using jruby-complete as jar file in war's WEB-INF/lib and using embedded jruby mode
openjdk 13.0.1 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.1+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.17.0, JRE 13 Windows 10 amd64-64-Bit Compressed References 20191031_97 (JIT enabled, AOT enabled)
OpenJ9 - 77c1cf708
OMR - 20db4fbc
JCL - c973c65658 based on jdk-13.0.1+9)
Provide at least:
Other relevant info you may wish to add:
Expected Behavior
Actual Behavior
Stacktrace:
The text was updated successfully, but these errors were encountered: