Full Thread Dump...Deadlock occured in the code

The following code generates error saying the following description:

ERROR Start:

SIGBUS occured.

Full thread dump:

"main" (TID:0x66c9360, sys_thread_t:0x7ad4f10, taskId:0x7ae447c state:runnable name:tJmain, stack_base:0x7ae447c, stack_high:0x1080 stack_size:19696) prio=5

"Finalizer thread" (TID:0x66c9390, sys_thread_t:0x7ad0538, taskId:0x7ad4590 state:condition variable pend name:Finalizer threa, stack_base:0x7ad4588, stack_high:0x144 stack_size:15624) prio=1

"Thread-0" (TID:0x66dd778, sys_thread_t:0x6560460, taskId:0x65644b8 state:condition variable pend name:Thread-0, stack_base:0x65644b0, stack_high:0xb48 stack_size:15628) prio=5

Page Fault

Program Counter: 0x0013c6a3

Status Register: 0x00010202

Error Code: 0x00130000

Task: 0x6551d20 "Thread-3"

ERROR End

This is the code..........

public class abc{

private boolean ready;

public synchronized void toggle1() {

ready = false; // de-block the other thread

try {

notify(); // inform the other thread

}catch(IllegalMonitorStateException e) {

e.printStackTrace();

}

while (!ready) {// block until the other

try {// thread sets "ready" to

wait();// "true".

} catch (InterruptedException e) {

System.out.println("Error from toggle1:InterruptedException");

e.printStackTrace();

}

catch(Throwable e)

{

System.out.println("Error from toggle1:Throwable");

e.printStackTrace();

}

}

}

public synchronized void toggle0() {

ready = true;// de-block the other thread

notify();// inform the other thread

while (ready) {// block until the other

try {// thread sets "ready" to

wait();// "false".

} catch (InterruptedException e) {}

}

}

}

Would you please put look into it and suggest a solution

Thanks

Message was edited by:

Indranil.Sarkar

[1993 byte] By [Indranil.Sarkara] at [2007-10-3 4:46:43]
# 1
Errors in application Java code should not crash the VM.You have hit some bug in the VM. Your crash log seems incomplete. What platform and VM version was this? Can you try with the latest Java 5 or even Java 6 version?
davidholmesa at 2007-7-14 22:51:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
David, I can not use upper version of jdk than 1.2 as the device on which the code was running should be complied to jdk 1.2And this is the error status exactly how I got
Indranil.Sarkara at 2007-7-14 22:51:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

Ah well if you're back on 1.2 then that's about as much error information as you will get.

JDK 1.2 is way past end-of-life. There is nothing you can do here to fix this problem.

Note: just because your application code was written for 1.2 doesn't mean it won't run on a later version of the VM. Try 1.3.1 if you don't want to jump up to 1.5 or 1.6 (but 1.3.1 will soon hit end-of-life too).

Sorry.

davidholmesa at 2007-7-14 22:51:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4
Thanks David for your valuable inputs
Indranil.Sarkara at 2007-7-14 22:51:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...