You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Afremov (JIRA)" <ji...@apache.org> on 2006/12/14 17:32:21 UTC

[jira] Created: (HARMONY-2718) [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.

[classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
-------------------------------------------------------------------------------------

                 Key: HARMONY-2718
                 URL: http://issues.apache.org/jira/browse/HARMONY-2718
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Pavel Afremov
         Attachments: ZipDictionaryTest.java

The following test is source of  memory leak (in classlib native code conceivably) and uncaught OutOfMemoryError.

import java.util.zip.Deflater;

public class ZipDictionaryTest {
    private static final int MAX_ITERATION_NUMBER = 30000000;
    private static final int PRINT_ITERATION_NUMBER = 500000;
    private static final int DICTIONARY_SIZE = 100;

    public static void main(String[] args) {
        Deflater compresser = new Deflater();
        byte[] dictionary = new byte [DICTIONARY_SIZE];

        for (int i = 0; i < MAX_ITERATION_NUMBER;) {
            System.out.println("Iteration = " + i);

            for (int l = i + PRINT_ITERATION_NUMBER; i < l; ++i) {
                compresser.setDictionary(dictionary,0,DICTIONARY_SIZE);
            }
        }

        System.out.println("PASS");
    }
}


-- 
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

        

[jira] Commented: (HARMONY-2718) [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.

Posted by "Vladimir Beliaev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12555018 ] 

Vladimir Beliaev commented on HARMONY-2718:
-------------------------------------------

This issue is still reproducible on M4 release... (I've checked it on Windows x86, release build).

> [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2718
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2718
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Afremov
>         Attachments: ZipDictionaryTest.java
>
>
> The following test is source of  memory leak (in classlib native code conceivably) and uncaught OutOfMemoryError.
> import java.util.zip.Deflater;
> public class ZipDictionaryTest {
>     private static final int MAX_ITERATION_NUMBER = 30000000;
>     private static final int PRINT_ITERATION_NUMBER = 500000;
>     private static final int DICTIONARY_SIZE = 100;
>     public static void main(String[] args) {
>         Deflater compresser = new Deflater();
>         byte[] dictionary = new byte [DICTIONARY_SIZE];
>         for (int i = 0; i < MAX_ITERATION_NUMBER;) {
>             System.out.println("Iteration = " + i);
>             for (int l = i + PRINT_ITERATION_NUMBER; i < l; ++i) {
>                 compresser.setDictionary(dictionary,0,DICTIONARY_SIZE);
>             }
>         }
>         System.out.println("PASS");
>     }
> }

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


[jira] Commented: (HARMONY-2718) [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12555049 ] 

Nathan Beyer commented on HARMONY-2718:
---------------------------------------

If this is really a duplicate of HARMONY-2530, then it's invalid, as that bug is closed, but according to the comments, this bug is happening still. If that's true, then the 2530 should really be reopened.

Can someone else test this independently?

BTW - OutOfMemoryErrors should always be uncaught, at least by the JRE.

> [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2718
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2718
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Afremov
>         Attachments: ZipDictionaryTest.java
>
>
> The following test is source of  memory leak (in classlib native code conceivably) and uncaught OutOfMemoryError.
> import java.util.zip.Deflater;
> public class ZipDictionaryTest {
>     private static final int MAX_ITERATION_NUMBER = 30000000;
>     private static final int PRINT_ITERATION_NUMBER = 500000;
>     private static final int DICTIONARY_SIZE = 100;
>     public static void main(String[] args) {
>         Deflater compresser = new Deflater();
>         byte[] dictionary = new byte [DICTIONARY_SIZE];
>         for (int i = 0; i < MAX_ITERATION_NUMBER;) {
>             System.out.println("Iteration = " + i);
>             for (int l = i + PRINT_ITERATION_NUMBER; i < l; ++i) {
>                 compresser.setDictionary(dictionary,0,DICTIONARY_SIZE);
>             }
>         }
>         System.out.println("PASS");
>     }
> }

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


[jira] Commented: (HARMONY-2718) [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.

Posted by "Vladimir Beliaev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12555021 ] 

Vladimir Beliaev commented on HARMONY-2718:
-------------------------------------------

This really looks like classlib issue - I've reproduced the failure in J9.

DRLVM output:
....
Iteration = 15500000
Iteration = 16000000
Uncaught exception in main:
java.lang.OutOfMemoryError: 
        at java.util.zip.Deflater.setDictionaryImpl(Deflater.java)


J9 output:
Iteration = 13500000

$echo $*
1

(ok, I've run it under cygwin).

> [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2718
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2718
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Afremov
>         Attachments: ZipDictionaryTest.java
>
>
> The following test is source of  memory leak (in classlib native code conceivably) and uncaught OutOfMemoryError.
> import java.util.zip.Deflater;
> public class ZipDictionaryTest {
>     private static final int MAX_ITERATION_NUMBER = 30000000;
>     private static final int PRINT_ITERATION_NUMBER = 500000;
>     private static final int DICTIONARY_SIZE = 100;
>     public static void main(String[] args) {
>         Deflater compresser = new Deflater();
>         byte[] dictionary = new byte [DICTIONARY_SIZE];
>         for (int i = 0; i < MAX_ITERATION_NUMBER;) {
>             System.out.println("Iteration = " + i);
>             for (int l = i + PRINT_ITERATION_NUMBER; i < l; ++i) {
>                 compresser.setDictionary(dictionary,0,DICTIONARY_SIZE);
>             }
>         }
>         System.out.println("PASS");
>     }
> }

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


[jira] Updated: (HARMONY-2718) [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2718?page=all ]

Pavel Afremov updated HARMONY-2718:
-----------------------------------

    Attachment: ZipDictionaryTest.java

The attached test is source of  memory leak (in classlib native code conceivably) and uncaught OutOfMemoryError.

> [classlib][drlvm] Simple test is source of memory leak and uncaught OutOfMemoryError.
> -------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2718
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2718
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Pavel Afremov
>         Attachments: ZipDictionaryTest.java
>
>
> The following test is source of  memory leak (in classlib native code conceivably) and uncaught OutOfMemoryError.
> import java.util.zip.Deflater;
> public class ZipDictionaryTest {
>     private static final int MAX_ITERATION_NUMBER = 30000000;
>     private static final int PRINT_ITERATION_NUMBER = 500000;
>     private static final int DICTIONARY_SIZE = 100;
>     public static void main(String[] args) {
>         Deflater compresser = new Deflater();
>         byte[] dictionary = new byte [DICTIONARY_SIZE];
>         for (int i = 0; i < MAX_ITERATION_NUMBER;) {
>             System.out.println("Iteration = " + i);
>             for (int l = i + PRINT_ITERATION_NUMBER; i < l; ++i) {
>                 compresser.setDictionary(dictionary,0,DICTIONARY_SIZE);
>             }
>         }
>         System.out.println("PASS");
>     }
> }

-- 
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