-
Notifications
You must be signed in to change notification settings - Fork 729
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
JVMVRFY038 invokespecial on invalid target; class=die/verwandlung/GregorSamsa, #7684
Comments
@planetf1 Do you have the .class file that causes the verifyerror? We need to see the bytecodes to see why the check in the verifier is failing. |
The maven dependency I'm using is from https://repo1.maven.org/maven2/org/apache/rat/apache-rat-plugin/0.13/ ie with the jar at https://repo1.maven.org/maven2/org/apache/rat/apache-rat-plugin/0.13/apache-rat-plugin-0.13.jar but I'm unclear which class specifically you need ? |
The VerifyError is flagging a problem in:
So I need the |
I found a few hits like https://stackoverflow.com/questions/49758534/java-lang-verifyerror-class-gregorsamsa-method-illegal-target-of-jump - or more helpfully perhaps http://www.jguru.com/faq/view.jsp?EID=1340163 ie this is in the XLST processor which I assume is bundled with the jvm? |
This is an AdoptOpenJDK build |
also some explanations at #6642 |
That link shows an issue with branch/jump targets and should be fixed in JDK10. According to the java -version above, you're using JDK11 so it may be related to the XLST processor but shouldn't be the same issue. We need the bytecode to figure out what's going on |
Can you recommend how to get the byte code? Any ideas? This class is being created dynamically by the XSLT processing as far as I can see (an area I'm unfamiliar with) |
I don't know enough about the XSLT processing to know how to dump the generated files. @hzongaro Are you aware of a |
Another observation. The exact stage of the build the failure happens on varies. Sometimes it may get all the way through (supposition - since I originally only noticed this on a nightly). For example I ran now and it got 50% further. Still failing with the same report, managing RAT. Our 'master' code is changing - a few updates constantly through the day, but it may also point to odd corruption perhaps? |
Only seen on MacOS so far. trying same code/version on linux, but not seen yet. |
Dan @DanHeidinga, I'm not aware of a There is a The difficulty of course is that @planetf1 might not have access to the source that's processing the XSLT stylesheet in order to set those attributes on the |
Thanks for the update, but I think that will be rather tricky. Technically all of this will be open source but it involves the implementation of the rat plugin - not familiar, time... The unfortunate issue is I was hoping to ensure we can run with J9, but I have hit a variety of issues - being worked through I now, but for now I think I'll have to recommend sticking with hotspot. |
Can we dump a core file when the VerifyError occurs and get the bytecode that way?
|
Typically I cannot get a failure this morning. I've set MAVEN_OPTS with the above, so if/when I get a failure hopefully I'll find a core (also added a ulimit -c unlimited in my build invocation). |
After around 8 attempts I had another failure
Also
However I can't see any core file in the current directory from where the sw was launched, nor the relevant maven directory nor indeed anywhere down the tree |
Can you set the |
I will try that too, though I've used it for other JVM options and it appears to pass through fine (or through JAVA_TOOL_OPTIONS). But will set OPENJ9_JAVA_OPTIONS |
Needed to do a build today and hit the issue again - those options are set but I still see no evidence of a core?
|
|
New information - I just hit the same issue on linux (Ubuntu 19.10) - though I did not have the same environment set there to capture debug: Again
|
No sign of cores on linux either |
Try just |
Tried that, and this time my maven build failed in 27s which is pretty impressive. Same error. No sign of a core. This was on ubuntu. Clearly the RAT plugin is the cause, yet I've never seen this with hotspot, nor with earlier J9 builds which I've been using intermittently since macOS came out from adoptopenjdk. The version of the rat plugin is current, and has been around for about a year. |
This is a ClassFormatError. Can you try with We may need to hack a VM that dumps the classfile on a verifyerror/classformaterror.... |
I expect that if Another possibility is the core is going to an unexpected place. If the -Xdump command triggers, there are messages printed to stderr like the following.
|
I don't see any messages like this, but of course I am running a maven build composed of 200+ modules, and within that the rat plugin is being invoked >200 times. The failure seems to happen randomly. I have no idea if anything about that environment is masking properties sent to the jvm. So there's a fair gap between the user perceived problem and the nitty gritty in the jvm. I can try to repeatedly call rat directly, but unsure I'll be able to repro. I could try to go back to 11.0.4 and ensure the issue doesn't happen there, again. Would that help given any thoughts on changes going to 11.0.5 (or the packaging from adoptopenjdk) |
I've been speaking with @cathyzhyi offline about this. We have limited the issue down to method handle inlining in the inliner ( |
@cathyzhyi if you comment in this issue, I can assign it to you |
@DanHeidinga please assign to me thanks! |
We're past Milestone 2 for the 0.20.0 release, moving this forward to the next release. |
Any new news, Cathy? |
So the problem is very likely to be related to incorrect inlining and around 500 hundred methods are inlined. I've managed to find the inlining branch that's responsible for the messed up constant pool entry which still involves 100 methods, unfortunately. Will keep digging through the coredumps to narrow down to a smaller subset of problematic inlined methods. |
Thanks for the update! |
The problem happens because runMacro can expand the following code in In this case, the 3 arguments filter argument handle wants to filter are the Will try with a tactical fix first. To fix inliner properly to be able to handle different calls with the same bytecode info needs more consideration. |
So excited that you figured this out, Cathy!! |
I'm going to tentatively move this back to the 0.20.0 milestone, hoping that a fix will be available and can go into the release. |
@cathyzhyi Any update on the tactical fix? Many thanks! |
@vij-singh After more investigation, I find that this problem should only happen when using option |
It's too late to put any fixes into the 0.20.0 release, moving forward. |
fixes should be merged |
@andrewcraik @cathyzhyi if the fixes are merged, can this be closed? The OMR change has promoted. |
Yes this should be fixed - closing - please reopen if further issues are seen once the update has been picked up. |
Great news - thanks folks! |
Thank you everyone! |
Java -version output
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.17.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20191016_371 (JIT enabled, AOT enabled)
OpenJ9 - 77c1cf7
OMR - 20db4fb
JCL - 2a7af5674b based on jdk-11.0.5+10)
Summary of problem
When building ODPi egeria (https://github.com/odpi/egeria) master, the build fails on a maven step using the Apache RAT plugin 0.13 with
An API incompatibility was encountered while executing org.apache.rat:apache-rat-plugin:0.13:check: java.lang.VerifyError: JVMVRFY038 invokespecial on invalid target; class=die/verwandlung/GregorSamsa, method=template$dot$0(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;I)V, pc=698
[ERROR] Exception Details:
[ERROR] Location:
[ERROR] die/verwandlung/GregorSamsa.template$dot$0(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;I)V @698: JBinvokespecial
[ERROR] Reason:
[ERROR] The method invoked via invokespecial is invalid.
This was when attempting to reproduce #7539 (my environment doesn't yet have the fix), but I had also cleaned up my build environment by removing all of my ~/.m2 - as well as pulled current updates from master. I had previously only seen this failure with a nightly build
Diagnostic files
Full log from the exceptions is posted to https://gist.github.com/f640872cc6608793e8988f54c68363d7
The text was updated successfully, but these errors were encountered: