You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/03/24 15:22:30 UTC

[jira] Closed: (HARMONY-222) Stop VM crashing at end of run of unit tests.

     [ http://issues.apache.org/jira/browse/HARMONY-222?page=all ]
     
Tim Ellison closed HARMONY-222:
-------------------------------


Verified by George
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/%3c4423E9FD.4000204@googlemail.com%3e


> Stop VM crashing at end of run of unit tests.
> ---------------------------------------------
>
>          Key: HARMONY-222
>          URL: http://issues.apache.org/jira/browse/HARMONY-222
>      Project: Harmony
>         Type: Improvement
>   Components: Classlib
>  Environment: Win32
>     Reporter: George Harley
>     Assignee: Tim Ellison
>     Priority: Minor
>  Attachments: HARMONY-222.txt
>
> At the very end of a run of all of the LUNI tests (whether run by themselves or as part of the larger test suite) the runtime terminates in a rather nasty way and leaves behind some pretty substantial core dump files. This is the kind of error information you might see in your console ...
> Thread: main (priority 5) (LOCATION OF ERROR)
> NATIVE   com/ibm/icu4jni/converters/NativeConverter.resetCharToByte(J)V
> 00000004 com/ibm/icu4jni/charset/CharsetEncoderICU.implReset()V
> 00000006 java/nio/charset/CharsetEncoder.reset()Ljava/nio/charset/CharsetEncoder;
> 0000000d
> java/nio/charset/CharsetEncoder.encode(Ljava/nio/CharBuffer;)Ljava/nio/ByteBuffer;
> 0000000d java/nio/charset/Charset.encode(Ljava/nio/CharBuffer;)Ljava/nio/ByteBuffer;
> 00000013 java/lang/String.getBytes()[B
> 00000010 com/ibm/oti/util/Util.getBytes(Ljava/lang/String;)[B
> 00000010 java/io/File.properPath(Z)[B
> 0000001f java/io/File.isDirectory()Z 
> ...etc ...
> This is being caused by a nasty interaction between one of the test case methods that calls System.runFinalizersOnExit(true) and the ICU4JNI libraries that close character converter handles in a finalize() method. The result is that at VM shutdown time, the ICU4JNI charset encoder's finalize() is called and then later on in the shutdown sequence an attempt is made to use the now invalid handle. The short term fix is to ensure that the test suite does not force all finalize() methods to be run at shutdown - this will at least save a number of core files from eating up your disk. Longer term, we wil probably have to look at the ICU4JNI source itself to see if it can be made guard against attempted usage of its converter handle after it has become invalid - something which should really only happen in the scenario described above. 
> One line patch to follow.
> Best regards, 
> George

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira