harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [testing][drlvm] smoke test gc.WeakReferenceTest failed today on winXP
Date Wed, 31 Jan 2007 22:46:06 GMT
Elena Semukhina wrote:
> On 1/31/07, Gregory Shimansky <gshimansky@gmail.com> wrote:
>>
>> Elena Semukhina wrote:
>> > I managed to reproduce the failure on my Windows XP laptop. W'd suggest
>> > that
>> > we change the test so that it waits a little after gc() as Pavel 
>> pointed
>> > out.
>>
>> Spec says in [1] that
>>
>> -------------------
>> Some time after the garbage collector determines that the reachability
>> of the referent has changed to the value corresponding to the type of
>> the reference, it will add the reference to the associated queue. At
>> this point, the reference is considered to be enqueued.
>> -------------------
>>
>> The problem is with defining "some time". If spec says nothing about how
>> much time later the reference is enqueued, then it is not possible to
>> test such event consistently. I am afraid this test is simply incorrect
>> and cannot be used.
> 
> 
> Can we define some "reasonable" time based on common sense? I tried to fix
> the test and "build test" successfully passed a few times on my WinXP.
> Possibly I was too speedy to file a JIRA issue(
> https://issues.apache.org/jira/browse/HARMONY-3101) but could we change the
> tests in the way suggested in the patch to be sure that a reference
> is eventually enqueued?

Yes, I think you are right. After all we're not developing TCK to test 
spec correctness, so in this case we can expect some reasonable small 
time for reference to enqueued.

>> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/package-summary.html 
>>
>>
>> > On 1/31/07, Vladimir Ivanov <ivavladimir@gmail.com> wrote:
>> >>
>> >> Could we exclude this tests up to end of investigation? Now they lead
>> >> to 2-3 CC notifications in a day about drlvm tests failures.
>> >>
>> >> Thanks, Vladimir
>> >>
>> >> On 1/30/07, Pavel Afremov <pavel.n.afremov@gmail.com> wrote:
>> >> > Looks like in the test there are a race condition. Spec says that
>> >> reference
>> >> > will enqueue at the same time or at some later time. So immediately
>> >> after gc
>> >> > reference can be not enqueued, and it's OK.
>> >> >
>> >> > BR
>> >> > Pavel Afremov.
>> >> >
>> >> > On 1/30/07, Pavel Afremov <pavel.n.afremov@gmail.com> wrote:
>> >> > >
>> >> > > I can't reproduce crash too.
>> >> > >
>> >> > > Pavel Afremov
>> >> > >
>> >> > >
>> >> > > On 1/30/07, Elena Semukhina <elena.semukhina@gmail.com>
wrote:
>> >> > > >
>> >> > > > I ran all the tests iteratively ("build.bat test") for 40
times
>> on
>> >> W2003
>> >> > > > 2CPUx4core machine and did not see any failures. Now I'm
trying
>> >> them
>> >> on
>> >> > > > W2003 1 CPU machine. 6 iterations have already succeeded.
>> >> > > >
>> >> > > > Elena
>> >> > > >
>> >> > > >
>> >> > > > On 1/30/07, Vladimir Ivanov <ivavladimir@gmail.com>
wrote:
>> >> > > > >
>> >> > > > > Do you run only this test in a loop?
>> >> > > > > I rerun tests again as "build.bat test" and sow 2 failures
>> again
>> >> > > > (note, 2
>> >> > > > > times before it all tests were passed):
>> >> > > > > gc.PhantomReferenceTest_interpreter
>> >> > > > >    waiting for a reference..
>> >> > > > >    FAIL: reference was not enqueued
>> >> > > > > gc.WeakReferenceTest_interpreter
>> >> > > > >    waiting for a reference..
>> >> > > > >    FAIL: reference was not enqueued
>> >> > > > >
>> >> > > > > thanks, Vladimir
>> >> > > > >
>> >> > > > > PSC jdk\jre\bin> java.exe -version
>> >> > > > > Apache Harmony Launcher : (c) Copyright 1991, 2006 The
Apache
>> >> Software
>> >> > > > > Foundatio
>> >> > > > > n or its licensors, as applicable.
>> >> > > > > java version "1.5.0"
>> >> > > > > pre-alpha : not complete or compatible
>> >> > > > > svn = r501301, (Jan 30 2007), Windows/ia32/msvc 1310,
debug
>> build
>> >> > > > > http://incubator.apache.org/harmony
>> >> > > > >
>> >> > > > > On 1/29/07, Gregory Shimansky < gshimansky@gmail.com
> wrote:
>> >> > > > > >
>> >> > > > > > Vladimir Ivanov wrote:
>> >> > > > > > > DRLVM smoke test gc.WeakReferenceTest intermittently
>> >> failed in
>> >> the
>> >> > > > > > > 'interpreter' mode on WinXP with log:
>> >> > > > > > > "waiting for a reference..
>> >> > > > > > > FAIL: reference was not enqueued"
>> >> > > > > > >
>> >> > > > > > > Could somebody reproduce/ fix it?
>> >> > > > > >
>> >> > > > > > I tried to run this test on interpreter. It has
passed 
>> for me
>> >> more
>> >> > > > than
>> >> > > > > > 100 times in a loop.
>> >> > > > > >
>> >> > > > > > > The list of commits since last successfull
build:
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/mutator_alloc.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/finalizer_weakref/finalizer_weakref_metadata.cpp

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/finalizer_weakref/finalizer_weakref.cpp

>>
>> >>
>> >> > > >
>> >> > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace_alloc.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > >
>> >> > > >
>> >> 
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/interior_pointer.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace_extend_compact.cpp

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.h
>> >> > > > > > >
>> >> > > > > > > /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen.h
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/build/make/components/vm/gc_gen.xml
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_gen_forward_pool.cpp

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_natives.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/collector.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace_slide_compact.cpp

>>
>> >>
>> >> > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h
>> >> > > > > > >
>> >> > > > > > >
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_block.h
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/large_pages.cpp
>> >> > > > > > >
>> >> > > > > > >
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_space.h
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/mutator.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_sweep/lspace.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > >
>> >> > > >
>> >> 
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_sweep/free_area_pool.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > >
>> >> > > >
>> >> 
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/fix_repointed_refs.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/collector_alloc.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/fallback_mark_scan.cpp 
>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/mark_scan_pool.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_metadata.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/vector_block.h
>> >> > > > > > >
>> >> > > > > > > /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace_collect_compact.cpp

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/finalizer_weakref/finalizer_weakref_metadata.h

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/finalizer_weakref/finalizer_weakref.h

>>
>> >>
>> >> > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_sweep/lspace_alloc_collect.cpp 
>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_queue.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/javasrc/org/apache/harmony/drlvm/gc_gen/GCHelper.java

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace.h
>> >> > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_platform.h
>> >> > > > > > >
>> >> > > > > > >
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/gen/gen_adapt.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/thread/gc_thread.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_alloc.cpp 
>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp
>> >> > > > > > >
>> >> > > > > > > 
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/bit_ops.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/trace_forward/fspace_nongen_forward_pool.cpp

>>
>> >>
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_compact/mspace_move_compact.cpp

>>
>> >>
>> >> > > >
>> >> > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.h
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/utils/sync_stack.h
>> >> > > > > > >
>> >> > > > > > >
>> >> /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/mark_sweep/lspace.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp
>> >> > > > > > >
>> >> > > > > > > /harmony/enhanced/drlvm/trunk/vm/vmcore/include/finalize.h
>> >> > > > > > >
>> >> > > > > > >
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalize.cpp
>> >> > > > > > >
>> >> > > > > > >
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/include/environment.h
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/stop_the_world_root_set_enum.cpp 
>>
>> >>
>> >> > > >
>> >> > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > > >
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > >
>> >>
>> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_FinalizerThread.cp

>>
>> >>
>> >> > > >
>> >> > > > > > >
>> >> > > > > > >
>> >> > > > > >
>> >> > > > > >
>> >> > > > > > --
>> >> > > > > > Gregory
>> >> > > > > >
>> >> > > > > >
>> >> > > > >
>> >> > > > >
>> >> > > >
>> >> > > >
>> >> > > > --
>> >> > > > Thanks,
>> >> > > > Elena
>> >> > > >
>> >> > > >
>> >> > >
>> >> >
>> >> >
>> >>
>> >
>> >
>> >
>>
>>
>> -- 
>> Gregory
>>
>>
> 
> 


-- 
Gregory


Mime
View raw message