Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Does anyone know this error? (Attempt to unguard stack red zone failed)

843811Apr 10 2003 — edited Apr 11 2003
Java 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.");
}
}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2003
Added on Apr 10 2003
1 comment
595 views