harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5145) [drlvm][gc] intermittent NPE in annotation tests
Date Thu, 29 Nov 2007 14:23:43 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Varlamov updated HARMONY-5145:
-------------------------------------

    Component/s:     (was: Classlib)
    Environment: Windows, Linux (x86_64 only ?)
        Summary: [drlvm][gc] intermittent NPE in annotation tests  (was: intermittent NPE
in annotation tests)

I suggest GC gurus to take a look at this issue. 
After I added printing proxy caches to assert, it appears that always only some sole GC event
collects weak referemces to proxy classes and it happens quite early in the test run (usually
at 3rd test suite out of a handred), but this never happens later though I almost sure a few
major collections happen till the rest of the run. 

In all cases I've seen it happens near the java.lang.ClassAnnotationsTest.test_10(), so the
proxyCache becomes clean: 

java.lang.AssertionError: interfaceKey=java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii
loaderCache={null={java.lang.SuperValAntn=java.lang.ref.WeakReference@ab64cd00, java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1=java.lang.ref.WeakReference@ab64ccde,
java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1=java.lang.ref.WeakReference@ab64ccaa,
java.lang.ClassAnnotationsTest$MA7$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii=java.lang.ref.WeakReference@ab64cca4,
java.lang.annotation.Documented=java.lang.ref.WeakReference@ab64cc92, java.lang.zzz=java.lang.ref.WeakReference@ab64cc6c,
java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii$internalAnnotation=java.lang.ref.WeakReference@ab64cc60,
org.apache.harmony.lang.AnnotatedElementTestFrame$MissingClassValAntn=java.lang.ref.WeakReference@ab64cc5a,
java.lang.iat=java.lang.ref.WeakReference@ab64cc1a, java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii=java.lang.ref.WeakReference@ab64cbfc,
java.lang.ClassAnnotationsTest$MA1=java.lang.ref.WeakReference@ab64cbb0, java.lang.annotation.Inherited=java.lang.ref.WeakReference@ab64cba4,
org.apache.harmony.lang.AnnotatedElementTestFrame$TagAntn=java.lang.ref.WeakReference@ab64cb7e,
java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1=java.lang.ref.WeakReference@ab64cb4a, java.lang.annotation.Retention=java.lang.ref.WeakReference@ab64cb44,
java.lang.ClassAnnotationsTest$MA1$MA1_1=java.lang.ref.WeakReference@ab64cb32, java.lang.j=java.lang.ref.WeakReference@ab64cb2c,
org.apache.harmony.lang.AnnotatedElementTestFrame$ValAntn=java.lang.ref.WeakReference@ab64cb0a,
java.lang.SuperTagAntn=java.lang.ref.WeakReference@ab64cafe, java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1=java.lang.ref.WeakReference@ab64cadc,
java.lang.annotation.Target=java.lang.ref.WeakReference@ab64ca94}}   
intfCache={java.lang.SuperValAntn=java.lang.ref.WeakReference@ab64cd00, java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1=java.lang.ref.WeakReference@ab64ccde,
java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1=java.lang.ref.WeakReference@ab64ccaa,
java.lang.ClassAnnotationsTest$MA7$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii=java.lang.ref.WeakReference@ab64cca4,
java.lang.annotation.Documented=java.lang.ref.WeakReference@ab64cc92, java.lang.zzz=java.lang.ref.WeakReference@ab64cc6c,
java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii$internalAnnotation=java.lang.ref.WeakReference@ab64cc60,
org.apache.harmony.lang.AnnotatedElementTestFrame$MissingClassValAntn=java.lang.ref.WeakReference@ab64cc5a,
java.lang.iat=java.lang.ref.WeakReference@ab64cc1a, java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1$iiii=java.lang.ref.WeakReference@ab64cbfc,
java.lang.ClassAnnotationsTest$MA1=java.lang.ref.WeakReference@ab64cbb0, java.lang.annotation.Inherited=java.lang.ref.WeakReference@ab64cba4,
org.apache.harmony.lang.AnnotatedElementTestFrame$TagAntn=java.lang.ref.WeakReference@ab64cb7e,
java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1=java.lang.ref.WeakReference@ab64cb4a, java.lang.annotation.Retention=java.lang.ref.WeakReference@ab64cb44,
java.lang.ClassAnnotationsTest$MA1$MA1_1=java.lang.ref.WeakReference@ab64cb32, java.lang.j=java.lang.ref.WeakReference@ab64cb2c,
org.apache.harmony.lang.AnnotatedElementTestFrame$ValAntn=java.lang.ref.WeakReference@ab64cb0a,
java.lang.SuperTagAntn=java.lang.ref.WeakReference@ab64cafe, java.lang.ClassAnnotationsTest$MA1$MA1_1$MA1_1_1$MA1_1_1_1$MA1_1_1_1_1$MA1_1_1_1_1_1$MA1_1_1_1_1_1_1=java.lang.ref.WeakReference@ab64cadc,
java.lang.annotation.Target=java.lang.ref.WeakReference@ab64ca94}   
proxyCache={}   
 at java.lang.reflect.Proxy.getProxyClass(Proxy.java:169)   
 at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:201)   
 at org.apache.harmony.lang.annotation.AnnotationFactory.createAnnotation(AnnotationFactory.java:101)
  
 at org.apache.harmony.vm.VMGenericsAndAnnotations.getDeclaredAnnotations(VMGenericsAndAnnotations.java)
  
 at java.lang.reflect.Method$MethodData.getDeclaredAnnotations(Method.java:426)   
 at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:71)   
 at java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java)   
 at java.lang.ClassAnnotationsTest.test_10(ClassAnnotationsTest.java:2027)   
 

After that the proxy only grows with new classes, so the last error is like 
...
proxyCache={class $Proxy26=, class $Proxy38=, class $Proxy37=, class $Proxy28=, class java.lang.$Proxy21=,
class java.lang.reflect.$Proxy41=, class $Proxy30=, class $Proxy23=, class $Proxy34=, class
org.apache.harmony.lang.generics.$Proxy25=, class $Proxy33=, class java.lang.reflect.$Proxy39=,
class java.lang.$Proxy35=, class $Proxy29=, class java.lang.reflect.$Proxy40=, class $Proxy31=,
class java.lang.$Proxy36=, class java.lang.$Proxy24=, class java.lang.$Proxy27=, class $Proxy32=,
class $Proxy22=}   
 at java.lang.reflect.Proxy.getProxyClass(Proxy.java:169)   
 at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:201)   
 at org.apache.harmony.lang.annotation.AnnotationFactory.createAnnotation(AnnotationFactory.java:101)
  
 at org.apache.harmony.vm.VMGenericsAndAnnotations.getDeclaredAnnotations(VMGenericsAndAnnotations.java)
  
 at java.lang.Class$GACache.getAllAnnotations(Class.java:1338)   
 at java.lang.Class.getAnnotation(Class.java:890)   
 at org.apache.harmony.lang.annotation.AllTypesTest.testSerialization(AllTypesTest.java:189)
  


> [drlvm][gc] intermittent NPE in annotation tests
> ------------------------------------------------
>
>                 Key: HARMONY-5145
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5145
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows, Linux (x86_64 only ?)
>            Reporter: Alexey Varlamov
>
> Kernel tests fail intermittently with NPE, the top of stacktrace is always the same:
> java.lang.NullPointerException   
>  at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:200)   
>  at org.apache.harmony.lang.annotation.AnnotationFactory.createAnnotation(AnnotationFactory.java:101)
  
> Brief review of j.l.reflect.Proxy code shows that possible reason of failure are nullified
WeakReferences to proxy classes in interfaceCache. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message