You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vera Petrashkova (JIRA)" <ji...@apache.org> on 2007/06/01 14:08:21 UTC
[jira] Created: (HARMONY-4024) drlvm][thread] VM crashes when a lot
of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
---------------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-4024
URL: https://issues.apache.org/jira/browse/HARMONY-4024
Project: Harmony
Issue Type: Bug
Components: DRLVM
Environment: Windows
Reporter: Vera Petrashkova
Priority: Minor
The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
or setDefaultUncaughtExceptionHandler methods
--------------a1.java-------------------
public class a1 extends Thread {
public static int N_TH = 20;
public static void main (String[] argv) {
boolean def = true;
if (argv.length > 0) {
def = "true".equals(argv[0]);
}
try {
if (argv.length > 1) {
N_TH=Integer.parseInt(argv[1]);
}
} catch (Throwable e) {
}
a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
for (int i = 0; i < 100000; i++) {
test(def, h);
if (i % 1000 == 0) {
System.err.println("Step: " + i + " finished");
}
}
System.out.println("Test passed");
}
public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
a1 t[] = new a1[N_TH];
for (int i = 0; i < N_TH; i++) {
t[i]=new a1();
if (defUncaught) {
t[i].setDefaultUncaughtExceptionHandler(hnd);
} else {
t[i].setUncaughtExceptionHandler(hnd);
}
t[i].start();
}
try {
for (int i = 0; i < N_TH; i++) {
t[i].join();
}
} catch (Throwable e) {
System.err.println(e);
}
}
public void m(int t) {
int t1 = 100/t;
}
public void run() {
m(0);
}
}
class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
public static int count = 0;
public void uncaughtException(Thread t, Throwable e) {
count++;
throw new RuntimeException(e);
}
}
--------------------------------
Run test with DefaultUncaughtExceptionHandler
java -cp . a1 true 20
and with UncaughtExceptionHandler
java -cp . a1 false 20
This test passes on RI in both cases:
Output:
=======
On RI this test passes:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Step: 0 finished
...
Step: 94000 finished
Step: 95000 finished
Step: 96000 finished
Step: 97000 finished
Step: 98000 finished
Step: 99000 finished
Test passed
DRLVM crashes on this test in both cases.
Output:
======
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
icensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
Step: 0 finished
The GC did not provide gc_add_weak_root_set_entry()
Step: 1000 finished
Windows reported exception: 0xc0000005
Registers:
EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
EIP: 0x10002a1e
Stack trace:
0: hythread_monitor_notify_all (??:-1)
1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
2: java/lang/Object.notifyAll()V (Object.java:65)
3: java/lang/Thread.runImpl()V (Thread.java:667)
<end of stack trace>
DRLVM crashes even if only 1 thread is created on the each step.
java -cp . a1 true 1
Output
===========
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
http://incubator.apache.org/harmony
Step: 0 finished
The GC did not provide gc_add_weak_root_set_entry()
Step: 1000 finished
Step: 2000 finished
Step: 3000 finished
....
Step: 29000 finished
Step: 30000 finished
Step: 31000 finished
Step: 32000 finished
Step: 33000 finished
Windows reported exception: 0xc0000005
Registers:
EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
EIP: 0x10002a1e
Stack trace:
0: hythread_monitor_notify_all (??:-1)
1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
2: java/lang/Object.notifyAll()V (Object.java:65)
3: java/lang/Thread.runImpl()V (Thread.java:667)
<end of stack trace>
This bug causes the failure of the reliability test
api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
weldon washburn updated HARMONY-4024:
-------------------------------------
Assignee: weldon washburn
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Rebriy updated HARMONY-4024:
----------------------------------
Attachment: H4024.patch
The patch to fix the issue.
The problem is test threads throw an ArithmeticException during detach. VM interprets it as InternalError and don't free native resources. That's why memory leak arises.
The patch was checked on 4 platforms - all 'build test' passed.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch, H4024.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Afremov updated HARMONY-4024:
-----------------------------------
Attachment: 0001-Fix-of-Thread-ID-bug.patch
Fix of Thread ID bug.
Patch radices quantity of Thread IDs to 0x7FFF to match lock word format and add opportunity to reuse dead threads IDs in new threads.
Patch fix described problem but doesn't allow test to works OK. Large memory leak was found. The source of this leak is that hythread_thin_monitor_destroy and hythread_monitor_destroy aren't called during GC's, I add debug printing to check it. The other possible source is usage of apr_pool.
As result of memory leak significant performace degradation was appered.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-4024) [drlvm][thread] VM crashes when a lot
of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
weldon washburn closed HARMONY-4024.
------------------------------------
Resolution: Fixed
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch, H4024.patch, H4024.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505773 ]
Pavel Rebriy commented on HARMONY-4024:
---------------------------------------
Regarding the patch I'd better change the loop to the following way:
+ for(i = 0; i < MAX_ID; i++) {
+ next_id++;
+ if (fast_thread_array[next_id] == NULL) {
+ assert(fast_thread_array[next_id] == NULL);
+ thread->thread_id = next_id;
+ free_slot_found = 1;
+ break;
+ }
+ if (next_id == MAX_ID) {
+ next_id = 1;
+ }
+ }
It helps to elude reuse of just terminated thread ID. It's important for debugging.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Shimansky updated HARMONY-4024:
---------------------------------------
Patch Info: [Patch Available]
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch, H4024.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505703 ]
Pavel Rebriy commented on HARMONY-4024:
---------------------------------------
There is no common parts with HARMONY-2742. The issue fixes thread_id reuse, HARMONY-2742 fixes fat monitors reuse. There is no reason to compare the JIRAs. Regarding fix way - yes, it's common for monitors and thread_ids. It's nothing at all serious.
Regarding memory leak it need to make more investigation on it.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Pavel Rebriy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Rebriy updated HARMONY-4024:
----------------------------------
Attachment: H4024.patch
Update patch, removed unnecessary assert.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch, H4024.patch, H4024.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505120 ]
Pavel Afremov commented on HARMONY-4024:
----------------------------------------
I found some initial source of this bug.
In the lock word there are 15 bits for thread id, but quantity of the threads is limited by 1 000 000.This mismatching is source of this bug, when first 16 bits of lock word equals to thread id and, at the same time, equals to first 16 bits of fat monitor id.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Priority: Minor
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Shimansky updated HARMONY-4024:
---------------------------------------
Summary: [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods (was: drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods)
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Priority: Minor
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4024) [drlvm][thread] VM crashes when a
lot of threads invoke setUncaughtExceptionHandler or
setDefaultUncaughtExceptionHandler methods
Posted by "weldon washburn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505407 ]
weldon washburn commented on HARMONY-4024:
------------------------------------------
I looked at 0001-fix...patch. It is somewhat similar to the patch I had proposed for harmony-2742 called second_design006.patch. I admit I committed harmony-2742, monitor_deallocation...patch. (It was a moment of weakness!) Doing a rollback on monitor_deallocation...patch is not feasible. I prefer going back to my original design. That is, revive second_design006.patch and apply it. (I think this means reopening harmony-2742).
My guess is that the large memory leak you observe is because of the gc_force_gc() issue that is already documented in second_design006.patch.
> [drlvm][thread] VM crashes when a lot of threads invoke setUncaughtExceptionHandler or setDefaultUncaughtExceptionHandler methods
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-4024
> URL: https://issues.apache.org/jira/browse/HARMONY-4024
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Windows
> Reporter: Vera Petrashkova
> Assignee: weldon washburn
> Priority: Minor
> Attachments: 0001-Fix-of-Thread-ID-bug.patch
>
>
> The following test demonstrates that VM crashes when a lot of created threads use setUncaughtExceptionHandler
> or setDefaultUncaughtExceptionHandler methods
> --------------a1.java-------------------
> public class a1 extends Thread {
> public static int N_TH = 20;
> public static void main (String[] argv) {
> boolean def = true;
> if (argv.length > 0) {
> def = "true".equals(argv[0]);
> }
> try {
> if (argv.length > 1) {
> N_TH=Integer.parseInt(argv[1]);
> }
> } catch (Throwable e) {
> }
> a1_UncoughtExcHnd h = new a1_UncoughtExcHnd();
> for (int i = 0; i < 100000; i++) {
> test(def, h);
> if (i % 1000 == 0) {
> System.err.println("Step: " + i + " finished");
> }
> }
> System.out.println("Test passed");
> }
> public static void test(boolean defUncaught, a1_UncoughtExcHnd hnd) {
> a1 t[] = new a1[N_TH];
> for (int i = 0; i < N_TH; i++) {
> t[i]=new a1();
> if (defUncaught) {
> t[i].setDefaultUncaughtExceptionHandler(hnd);
> } else {
> t[i].setUncaughtExceptionHandler(hnd);
> }
> t[i].start();
> }
> try {
> for (int i = 0; i < N_TH; i++) {
> t[i].join();
> }
> } catch (Throwable e) {
> System.err.println(e);
> }
> }
> public void m(int t) {
> int t1 = 100/t;
> }
> public void run() {
> m(0);
> }
> }
> class a1_UncoughtExcHnd implements Thread.UncaughtExceptionHandler {
> public static int count = 0;
> public void uncaughtException(Thread t, Throwable e) {
> count++;
> throw new RuntimeException(e);
> }
> }
> --------------------------------
> Run test with DefaultUncaughtExceptionHandler
> java -cp . a1 true 20
> and with UncaughtExceptionHandler
> java -cp . a1 false 20
> This test passes on RI in both cases:
> Output:
> =======
> On RI this test passes:
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
> Step: 0 finished
> ...
> Step: 94000 finished
> Step: 95000 finished
> Step: 96000 finished
> Step: 97000 finished
> Step: 98000 finished
> Step: 99000 finished
> Test passed
> DRLVM crashes on this test in both cases.
> Output:
> ======
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c14bf8, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x0babfe80, ESP: 0x0babfda0, EBP: 0x0babfddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> DRLVM crashes even if only 1 thread is created on the each step.
> java -cp . a1 true 1
> Output
> ===========
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r542118, (May 28 2007), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Step: 0 finished
> The GC did not provide gc_add_weak_root_set_entry()
> Step: 1000 finished
> Step: 2000 finished
> Step: 3000 finished
> ....
> Step: 29000 finished
> Step: 30000 finished
> Step: 31000 finished
> Step: 32000 finished
> Step: 33000 finished
> Windows reported exception: 0xc0000005
> Registers:
> EAX: 0x00000000, EBX: 0x41c17188, ECX: 0x0e810048, EDX: 0x003927a4
> ESI: 0x00000000, EDI: 0x041ffe80, ESP: 0x041ffda0, EBP: 0x041ffddc
> EIP: 0x10002a1e
> Stack trace:
> 0: hythread_monitor_notify_all (??:-1)
> 1: java/lang/VMThreadManager.notifyAll(Ljava/lang/Object;)I (VMThreadManager.java:-2)
> 2: java/lang/Object.notifyAll()V (Object.java:65)
> 3: java/lang/Thread.runImpl()V (Thread.java:667)
> <end of stack trace>
> This bug causes the failure of the reliability test
> api.kernel.thread.ExcptHandlerTest.ExcptHandlerTest
> from http://issues.apache.org/jira/browse/HARMONY-2918
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.