bineanzhou / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

VerifyError: "Inconsistent stack height 1 != 2" on Solaris, TPTP #168

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For full details see the following thread.

http://groups.google.com/group/google-guice/browse_thread/thread/67b1b84962c1241

Specific version:

java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

on Solaris.

Error is :

java.lang.VerifyError: (class:
com/sensis/ems/admin/pages/AnomaliesPage$$FastClassByGuice$$b73515e4,
method: invoke signature:
(ILjava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Inconsistent
stack height 1 != 2
    java.lang.Class.getDeclaredConstructors0(Native Method)
    java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    java.lang.Class.getConstructor0(Class.java:2699)
    java.lang.Class.getDeclaredConstructor(Class.java:1985)
    com.google.inject.cglib.core.ReflectUtils.getConstructor(ReflectUtils.java:244)
    com.google.inject.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
    com.google.inject.cglib.reflect.FastClass$Generator.firstInstance(FastClass.java:76)
    com.google.inject.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:231)
    com.google.inject.cglib.reflect.FastClass$Generator.create(FastClass.java:64)
    com.google.inject.util.GuiceFastClass.create(GuiceFastClass.java:38)
    com.google.inject.util.GuiceFastClass.create(GuiceFastClass.java:30)
    com.google.inject.InjectorImpl$SingleMethodInjector.<init>(InjectorImpl.java:554)
    com.google.inject.InjectorImpl$5.create(InjectorImpl.java:360)
    com.google.inject.InjectorImpl$5.create(InjectorImpl.java:358)
    com.google.inject.InjectorImpl.addInjectorsForMembers(InjectorImpl.java:384)
    com.google.inject.InjectorImpl.addSingleInjectorsForMethods(InjectorImpl.java:356)
    com.google.inject.InjectorImpl.addInjectors(InjectorImpl.java:351)
    com.google.inject.InjectorImpl$4.create(InjectorImpl.java:332)
    com.google.inject.InjectorImpl$4.create(InjectorImpl.java:329)
    com.google.inject.util.ReferenceCache.create(ReferenceCache.java:53)
    com.google.inject.util.AbstractReferenceCache.internalCreate(AbstractReferenceCache.java:59)
    com.google.inject.util.AbstractReferenceCache.get(AbstractReferenceCache.java:116)
    com.google.inject.InjectorImpl.injectMembers(InjectorImpl.java:672)
    com.google.inject.InjectorImpl$8.call(InjectorImpl.java:682)
    com.google.inject.InjectorImpl$8.call(InjectorImpl.java:681)
    com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:747)
    com.google.inject.InjectorImpl.injectMembers(InjectorImpl.java:680)
    com.sensis.ems.admin.pages.InjectingPage.onInit(InjectingPage.java:18)
    net.sf.click.ClickServlet.processPage(ClickServlet.java:521)
    net.sf.click.ClickServlet.handleRequest(ClickServlet.java:356)
    net.sf.click.ClickServlet.doGet(ClickServlet.java:280)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    com.sensis.ems.common.RequestCleanupFilter.doFilter(RequestCleanupFilter.java:20)
    com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:46)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
    org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
    org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.securechannel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:138)
    org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
    org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)

Attached is the class file generated by cglib.

Original issue reported on code.google.com by gst...@gmail.com on 26 Nov 2007 at 1:40

Attachments:

GoogleCodeExporter commented 9 years ago
Further information: I upgraded my JDK version on Solaris and problem still 
occurs. 
Works fine under the Windows JDK but not in the Solaris one.

Original comment by gst...@gmail.com on 26 Nov 2007 at 7:11

GoogleCodeExporter commented 9 years ago
Chris - any ideas on how we can address this?

Glen - I know this request comes very late, but did you ever create a 
consistently-reproducible testcase that 
demonstrates this problem? Ie. a JUnit test that passes on Windows, but fails 
with the verify error on Solaris JDK? 
I suspect that'll help to get the problem resolved for Guice v2.

Original comment by limpbizkit on 1 Jun 2008 at 6:17

GoogleCodeExporter commented 9 years ago
Guice head has recently been updated to CGLIB 2.2, which uses a newer version 
of ASM.
Could you test against a fresh checkout? I do not have access to a Solaris 
machine.

Original comment by chris.no...@gmail.com on 2 Jun 2008 at 8:39

GoogleCodeExporter commented 9 years ago
This error is also raised when used with the Eclipse TPTP profiler (see issue 
157 for details).

Original comment by limpbizkit on 9 Jun 2008 at 5:47

GoogleCodeExporter commented 9 years ago
Hi.  Sorry for being slow to get back to you - I've been away.  I'm afraid I was
never able to get a consistent test case.  The error seems a little 
unpredictable and
it's a bit of a pain pushing up different versions to the Solaris box.

I'll try the latest checkout when I get a chance.

Original comment by gst...@gmail.com on 9 Jun 2008 at 8:56

GoogleCodeExporter commented 9 years ago
Further investigation has show that the problem occurs with the latest snapshot 
of
guice.  Also it appears not to necessarily related to Solaris as we have one 
Solaris
box where it works and another where it doesn't (with same solaris & Java 
verions for
both).

The problem seems to sometimes get triggered by classes that have non-static 
inner
classes.  Removing those fixed the last problem we got here.

Original comment by gst...@gmail.com on 27 Aug 2008 at 2:18

GoogleCodeExporter commented 9 years ago
I tried to reproduce this with Eclipse TPTP, but unfortunately it isn't 
supported on my Mac. Even worse, the TPTP 
documentation doesn't warn you of this until you attempt to profile the 
application. 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=68111

Original comment by limpbizkit on 18 Oct 2008 at 7:04

GoogleCodeExporter commented 9 years ago
I tried to reproduce this with Eclipse TPTP on Ubuntu, but unfortunately that 
tool fails with an error, "IWAT0435E 
an error occured when connecting to the host." Reproducing this issue is 
proving painful!

Original comment by limpbizkit on 27 Nov 2008 at 8:04

GoogleCodeExporter commented 9 years ago
After several hours of trying, I haven't been able to reproduce this. In my 
last effort, I setup Solaris on VMWare, 
but with no success.

If this is still offending, please provide detailed steps to reproduce!

Original comment by limpbizkit on 27 Nov 2008 at 9:36

GoogleCodeExporter commented 9 years ago
Thank you for spending so much time on this issue.  

I've spent considerable time trying to generate a failing test case but 
unfortunately 
at the moment it only seems to occur in our production code.  Why the problem 
only 
manifests in our production code is beyond me.

Original comment by gst...@gmail.com on 20 Jan 2009 at 2:33

GoogleCodeExporter commented 9 years ago
I've managed to determine the cause of this problem.  Apparently on the web 
server 
this error was occurring on there was a performance monitoring & profiling tool 
from 
HP installed.  After discovering and disabling this the problem no longer 
occurred so 
it's safe to say there's some sort of conflict between this tool and guice.  I 
feel 
very bad for having wasted your time on this.  Thanks again for your help.

Original comment by gst...@gmail.com on 11 Mar 2009 at 3:23

GoogleCodeExporter commented 9 years ago
@gstamp: thanks for the update. I suspect the HP profiler and Eclipse TPTP have 
the same problem.

Original comment by limpbizkit on 11 Mar 2009 at 4:48

GoogleCodeExporter commented 9 years ago
FYI inconsistent stack height errors are the most common problem with bytecode 
manipulation, so a problem with CGLIB wasn't a bad guess. But in retrospect yet 
another buggy bytecode manipulator makes even more sense :-)

Original comment by chris.no...@gmail.com on 12 Mar 2009 at 2:34

GoogleCodeExporter commented 9 years ago
See also this thread:
http://groups.google.com/group/google-guice/browse_thread/thread/676de841d5c5eb4
2/6fae78fcfed1ae74

Original comment by limpbizkit on 17 Mar 2009 at 3:48

GoogleCodeExporter commented 9 years ago
Having the exact same error on windows when trying to profile a JUnit test.

Original comment by dob...@gmail.com on 6 Mar 2010 at 4:16

GoogleCodeExporter commented 9 years ago
Try -Xverify:none,
it works for me.

Original comment by yuel...@gmail.com on 18 Jun 2010 at 12:06

GoogleCodeExporter commented 9 years ago
I confirm that -Xverify:none workaround works (comment #16 
http://code.google.com/p/google-guice/issues/detail?id=168#c16)

Original comment by mohammad...@gmail.com on 4 Jan 2011 at 4:41

GoogleCodeExporter commented 9 years ago
-Xverify:none does not work for me.  The JVM ends up crashing.  This is not a 
consistent workaround, but it's worth trying.

Original comment by arootb...@gmail.com on 2 Feb 2012 at 5:08

GoogleCodeExporter commented 9 years ago
workaround works fine for me

Original comment by pj.char...@gmail.com on 12 Mar 2013 at 6:51

GoogleCodeExporter commented 9 years ago
The workaround also worked for me using Java 1.6.0_45-b06.
I learned that the default value for the verify option is "remote", so our app 
started while loading local classes and crashed when loading remote classes. 

Original comment by joachim....@gmail.com on 20 Jun 2013 at 8:44