Does anyone know this error? (Attempt to unguard stack red zone failed)
843811Apr 10 2003 — edited Apr 11 2003Java SDK: 1.4.1_01
Linux Kernel: 2.4.9-31
Memory: 2GB
I received this error after increasing my thread (POSIX and pthread) limits in the glibc library (local_lim.h) and ran a thread program (shown below) to test the thread limit. Will someone explain exactly what this error is and if there is a way to fix it?
TIA.
Here is the error:
Java HotSpot(TM) Client VM warning: Attempt to unguard stack red zone failed.
An irrecoverable stack overflow has occurred.
Exception in thread "main" Java HotSpot(TM) Client VM warning: Attempt to unguard stack red zone failed.
An irrecoverable stack overflow has occurred.
Here is the program:
import java.util.Timer;
import java.util.TimerTask;
public class Reminder {
Timer timer;
static int cnt;
static int index;
public Reminder(int seconds) {
timer = new Timer();
timer.schedule(new RemindTask(), seconds*1000);
}
class RemindTask extends TimerTask {
public void run() {
System.out.println("Time's up!");
timer.cancel(); //Terminate the timer thread
}
}
public static void main(String args[]) {
System.out.println("About to schedule task.");
cnt = 0;
while (true) {
new Reminder(90);
System.out.println("Thread #" + ++cnt + " scheduled.");
}
}
}