Skip to content
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

java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=java/net/AbstractPlainSocketImpl, #37

Open
jsreedhar opened this issue Jun 7, 2018 · 3 comments

Comments

@jsreedhar
Copy link

Hi,

I am trying to use the file leak detector jar in my application, when add the javaagent and start the jvm, getting the following error. I am using IBM JDK 7

File leak detector installed
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:405)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:420)
Caused by: java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=java/net/AbstractPlainSocketImpl, method=create(Z)V, pc=6
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:94)
at java.lang.J9VMInternals.verify(J9VMInternals.java:92)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:169)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:256)
at org.kohsuke.file_leak_detector.AgentMain.premain(AgentMain.java:130)
... 6 more

Fatal error: processing of -javaagent failed

when I pass the jvm argument -Xverify:none, then I get the following error

File leak detector installed
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:405)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:420)
Caused by: java.lang.ClassFormatError
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:164)
at org.kohsuke.file_leak_detector.AgentMain.premain(AgentMain.java:126)
... 6 more

Fatal error: processing of -javaagent failed

Please let me know how I can get pass this problem and bring up the jvm

Thanks,
Sreedhar.

@jsreedhar
Copy link
Author

Any updates?

@mandragorn
Copy link
Contributor

mandragorn commented Apr 18, 2020

I'm getting the same issue with adoptopen jdk 8:

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
Eclipse OpenJ9 VM (build openj9-0.18.1, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200122_511 (JIT enabled, AOT enabled)
OpenJ9   - 51a5857d2
OMR      - 7a1b0239a
JCL      - 8cf8a30581 based on jdk8u242-b08)

@mandragorn
Copy link
Contributor

mandragorn commented Apr 18, 2020

Based on this article: https://www.ibm.com/support/pages/ibm-java-linux-howto-resolving-javalangverifyerror-jvmvrfy012-stack-shape-inconsistent it looks like adding -Xverify:none to the java command line args works. An example from the pom to make the unit tests work:

-javaagent:"${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar" -Xverify:none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants