2006/11/15, Alexey Varlamov <[EMAIL PROTECTED]>:
2006/11/15, Gregory Shimansky <[EMAIL PROTECTED]>: > Alexey Varlamov wrote: > > The guilty change is the following, which effectively turns on > > VM_LAZY_EXCEPTION support in exceptions_impl.cpp: > > Well this is a patch from HARMONY-2018 which doesn't hide the fact that > it enables lazy exceptions. Why shouldn't we enable them?
Gregory, I've just re-read my posts and couldn't find anything critique or offending - please don't take regressions too personal. I'm sure we will be able to fix this one quite soon. -- Peace, Alexey
The point is not that we should or should not enable them, rather the fact that the regression appeared due to this change. I just tried to localize the problem hoping it will help to resolve this regression soon instead of reverting. > > Actually if you revert the patch (I've tried) this doesn't seem to fix > the test. At least the exceptions are still there, not sure about test > PASSED status. Verbose test output is confusing but itself does no harm. I found so far the following: 1) the test fails on this assertion (ClassGenericsTest4.java:799): if (!(e.getCause() instanceof java.lang.reflect.GenericSignatureFormatError)) { fail("test_3, case 003 FAILED: GenericSignatureFormatError should be risen."); } because of e.getCause() returns null. That is, lazy machinery drops the cause of InvocationTargetException, I did not yet figured out why. 2) Test report provides the following diagnostics: java.lang.NullPointerException at junit.framework.TestCase.runTest(TestCase.java:168). This seems to point to the same problem: lost cause exception after reflection. > > > Modified: > > incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp > > > > URL: > > http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp?view=diff&rev=475029&r1=475028&r2=475029 > > > > ============================================================================== > > > > --- > > incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp > > > > (original) > > +++ > > incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp > > > > Tue Nov 14 14:45:45 2006 > > @@ -26,6 +26,7 @@ > > #include "Class.h" > > #include "classloader.h" > > #include "exceptions.h" > > +#include "exceptions_impl.h" > > #include "exceptions_jit.h" > > #include "exceptions_type.h" > > #include "environment.h" > > > > So the problem most probably in exn_throw_by_class_internal() > > function, will look closer after lunch. > > > > 2006/11/15, Alexey Varlamov <[EMAIL PROTECTED]>: > >> Heh, this regression is more interesting than it looked at first glance: > >> JITs give the same output with identical stack trace, but test result > >> is PASSED. > >> By lucky chance I have older debug build at hand (svn = r474646) and > >> it also spills this stacktrace to system err but status is PASSED for > >> all execution engines. > >> Looks like smth hase changed in exceptions processing for interpreter. > >> > >> 2006/11/15, Gregory Shimansky <[EMAIL PROTECTED]>: > >> > Hello > >> > > >> > Today a kernel tests which used to pass a day ago started to fail. > >> It is > >> > java.lang.ClassGenericsTest4 (subtest test_3) [1]. I tried to revert > >> some VM > >> > and classlib (since some important classes like URLClassLoader, > >> Hashtable and > >> > TreeMap were changed recently) patches but no reversion helped. It > >> may be a > >> > cumulative effect of the patches now makes the test fail. > >> > > >> > It fails somewhere deep inside of signature parser. The problem is > >> also that > >> > class format parses uses antlr which makes the whole parsing quite > >> complex. > >> > The failure happens on a BadSignatureTemplate class which is > >> constructed from > >> > bytes, parsed and its method is invoked. Apparently it has a wrong > >> signature > >> > (surprise :) ). > >> > > >> > The whole purpose of the test is not clear to me more surprising is > >> that it > >> > works on RI (not on BEA). If someone could point to what may be > >> wrong now > >> > with this test I would be very grateful. > >> > > >> > I also wonder why there is no InvocationTargetException which should be > >> > chained with the down the stack Exception. The test_3 method uses > >> reflection > >> > to invoke a method BadSignatureTemplate.test_1 which in its turn > >> threw an > >> > Exception in parser. Shouldn't there be an InvocationTargetException > >> as the > >> > result of Method.invoke? > >> > > >> > Where can I look at BadSignatureTemplate.java, specifically line 13 > >> which > >> > according to the stack called Class.getTypeParameters? > >> > > >> > [1] > >> > > >> > [EMAIL PROTECTED]: > >> > 10113$] ./lnx_ia32_gcc_debug/deploy/jre/bin/java -Xint > >> -Xbootclasspath/a:./lnx_ia32_gcc_debug/semis/kernel.tests/classes:./make/tmp/junit.jar > >> -Dtest.resource.path=./lnx_ia32_gcc_debug/semis/kernel.tests/resources > >> > junit.textui.TestRunner java.lang.ClassGenericsTest4 > >> > > >> ..../lnx_ia32_gcc_debug/semis/kernel.tests/resources/org/apache/harmony/lang/generics/BadSignatureTemplate.class > >> > >> > java.lang.Exception > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureLexer2.nextToken(SignatureLexer2.java:420) > >> > >> > at antlr.TokenBuffer.fill(TokenBuffer.java:69) > >> > at antlr.TokenBuffer.LA(TokenBuffer.java:80) > >> > at antlr.LLkParser.LA(LLkParser.java:52) > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__SIMPLE_CLASS_TYPE_SIGNATURE(SignatureParser.java:1457) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE_SUFFIXES(SignatureParser.java:1736) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__REFERENCE(SignatureParser.java:1408) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE(SignatureParser.java:980) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FIELD_TYPE_SIGNATURE(SignatureParser.java:844) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__BOUND(SignatureParser.java:1311) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_OR_INTERFACE_BOUNDS(SignatureParser.java:1278) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETER(SignatureParser.java:1183) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS(SignatureParser.java:1152) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS_DECL(SignatureParser.java:951) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_DECL(SignatureParser.java:535) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__DECL(SignatureParser.java:480) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.parseSignature(SignatureParser.java:378) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.Parser.parseSignature(Parser.java:38) > >> > >> > at java.lang.Class$GACache.getTypeParameters(Class.java:1551) > >> > at java.lang.Class.getTypeParameters(Class.java:1020) > >> > at org.apache.harmony.lang.generics.BadSignatureTemplate.test_1 > >> > (BadSignatureTemplate.java:13) > >> > at > >> java.lang.reflect.VMReflection.invokeMethod(VMReflection.java) > >> > at java.lang.reflect.Method.invoke(Method.java:381) > >> > at > >> java.lang.ClassGenericsTest4.test_3(ClassGenericsTest4.java:793) > >> > at > >> java.lang.reflect.VMReflection.invokeMethod(VMReflection.java) > >> > at java.lang.reflect.Method.invoke(Method.java:381) > >> > at junit.framework.TestCase.runTest(TestCase.java:154) > >> > at junit.framework.TestCase.runBare(TestCase.java:127) > >> > at junit.framework.TestResult$1.protect(TestResult.java:106) > >> > at junit.framework.TestResult.runProtected(TestResult.java:124) > >> > at junit.framework.TestResult.run(TestResult.java:109) > >> > at junit.framework.TestCase.run(TestCase.java:118) > >> > at junit.framework.TestSuite.runTest(TestSuite.java:208) > >> > at junit.framework.TestSuite.run(TestSuite.java:203) > >> > at junit.textui.TestRunner.doRun(TestRunner.java:116) > >> > at junit.textui.TestRunner.start(TestRunner.java:172) > >> > at junit.textui.TestRunner.main(TestRunner.java:138) > >> > ===nextToken===: java.lang.Exception > >> > antlr.TokenStreamException > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureLexer2.nextToken(SignatureLexer2.java:434) > >> > >> > at antlr.TokenBuffer.fill(TokenBuffer.java:69) > >> > at antlr.TokenBuffer.LA(TokenBuffer.java:80) > >> > at antlr.LLkParser.LA(LLkParser.java:52) > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__SIMPLE_CLASS_TYPE_SIGNATURE(SignatureParser.java:1457) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE_SUFFIXES(SignatureParser.java:1736) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__REFERENCE(SignatureParser.java:1408) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE(SignatureParser.java:980) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FIELD_TYPE_SIGNATURE(SignatureParser.java:844) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__BOUND(SignatureParser.java:1311) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_OR_INTERFACE_BOUNDS(SignatureParser.java:1278) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETER(SignatureParser.java:1183) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS(SignatureParser.java:1152) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS_DECL(SignatureParser.java:951) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_DECL(SignatureParser.java:535) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.pr__DECL(SignatureParser.java:480) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.SignatureParser.parseSignature(SignatureParser.java:378) > >> > >> > at > >> > > >> org.apache.harmony.lang.reflect.parser.Parser.parseSignature(Parser.java:38) > >> > >> > at java.lang.Class$GACache.getTypeParameters(Class.java:1551) > >> > at java.lang.Class.getTypeParameters(Class.java:1020) > >> > at org.apache.harmony.lang.generics.BadSignatureTemplate.test_1 > >> > (BadSignatureTemplate.java:13) > >> > at > >> java.lang.reflect.VMReflection.invokeMethod(VMReflection.java) > >> > at java.lang.reflect.Method.invoke(Method.java:381) > >> > at > >> java.lang.ClassGenericsTest4.test_3(ClassGenericsTest4.java:793) > >> > at > >> java.lang.reflect.VMReflection.invokeMethod(VMReflection.java) > >> > at java.lang.reflect.Method.invoke(Method.java:381) > >> > at junit.framework.TestCase.runTest(TestCase.java:154) > >> > at junit.framework.TestCase.runBare(TestCase.java:127) > >> > at junit.framework.TestResult$1.protect(TestResult.java:106) > >> > at junit.framework.TestResult.runProtected(TestResult.java:124) > >> > at junit.framework.TestResult.run(TestResult.java:109) > >> > at junit.framework.TestCase.run(TestCase.java:118) > >> > at junit.framework.TestSuite.runTest(TestSuite.java:208) > >> > at junit.framework.TestSuite.run(TestSuite.java:203) > >> > at junit.textui.TestRunner.doRun(TestRunner.java:116) > >> > at junit.textui.TestRunner.start(TestRunner.java:172) > >> > at junit.textui.TestRunner.main(TestRunner.java:138) > >> > TokenStreamException: antlr.TokenStreamException > >> > E > >> > Time: 71.596 > >> > There was 1 error: > >> > 1) test_3(java.lang.ClassGenericsTest4)java.lang.NullPointerException > >> > > >> > > >> > -- > >> > Gregory Shimansky, Intel Middleware Products Division > >> > > >> > > > > > -- > Gregory > >