harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Berezhniuk (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2798) [drlvm][thread] VM cunit test test_native_basic sometimes crashes on win32 SMP
Date Fri, 25 May 2007 22:54:16 GMT

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

Ilya Berezhniuk updated HARMONY-2798:

    Attachment: test_native_basic.diff

Further investigation has showed that we should wait until started threads are terminated,
and also until all GC and finalizer threads are terminated, or at least perform some finalization

The best way is to call DestroyJavaVM for every JNI_CreateJavaVM to ensure that all required
VM cleanup is performed before leaving test's main().  But it works for cunit tests with single
subtest and does not work for several subtests.

Thus the only possible solution is to wait for termination of started threads and wait a bit
more to give a time for remaining VM threads.

Suggested patch implements such waiting. Test passes in loop for 1500 times.
Testing algorithm of thread iterator subtest is not affected, because waiting was inserted
after iterator releasing and after result calculation.

> [drlvm][thread] VM cunit test test_native_basic sometimes crashes on win32 SMP
> ------------------------------------------------------------------------------
>                 Key: HARMONY-2798
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2798
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows 2003 server on P4 with HT enabled
>            Reporter: Gregory Shimansky
>         Attachments: test_native_basic.diff
> The test test_native_basic fails on windows from time to time in 3 different ways. The
most common way is to exit silently on shutdown while function main has returned 0, and all
tests passed. Two other ways are access to non-writable memory and MS debug CRT heap validation
on shutdown.
> In all 3 cases I cannot debug the program because it fails after function main has finished.
Looks like some race condition causes memory corruption. Probably running the program from
under VS.NET could help to debug it.
> To run the test many times I've written the following script in cygwin bash:
> i=0; while true; do ./test_native_basic.exe -Dorg.apache.harmony.vm.vmdir=d:/work/harmony/enhanced/trunk/working_vm/build/win_ia32_msvc_debug/deploy/jdk/jre/bin/default
ec=$?; echo $i $ec; test $ec != 0 && break; i=$[i+1]; done
> Note, to run test_native_basic in console you need to set PATH to DRLVM bin and bin/default
> Note2, it looks like this bug requires SMP or at least HT enabled system, and is not
reproducible on single processor computers like laptops.

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

View raw message