Invalid access of stack red zone from Java VM
Asked Answered
K

4

15

I'm trying to figure out what can cause this error in Java:

Invalid access of stack red zone 0x115ee0ed0 rip=0x114973900

Has anyone ever encountered this error message? It's literally killing the JVM and everything stops there.

I'm currently using this version of Java:(on OS X 10.6)

java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)

All I'm looking for is some sort of explanation and tips on how to avoid hitting this again.

Thanks in advance!

Krill answered 1/10, 2009 at 3:35 Comment(0)
I
5

Without looking at your code, it's difficult to say what is causing the error but here is explanation on red zone and also few links which discuss about the problem.

Each block of memory allocated to an application comes with a leading and trailing "redzone" which is a special signature in memory just before and just after the memory allocated to the application. If the application were to overwrite outside this region, the red zone signature would be overwritten. Then later on the application crashes and you get this abend when the memory is returned, and the OS can inspect the red zones.

This issues has been found on Mac OSX so it could be something related to class loader issues when class is not found but on mac osx, it's been reported as red zone access. So try it with JDK 1.5 and see if you can reproduce the problem.

http://osdir.com/ml/java.objectweb.asm/2007-07/msg00004.html

http://wiki.geneontology.org/index.php/OEWG_20090505

http://forums.oracle.com/forums/thread.jspa?threadID=429325

Island answered 1/10, 2009 at 4:0 Comment(2)
Interesting. I'll give these a shot.Krill
Saw this today. Turned out to be stack overflow. Apparently these days you aren't guaranteed to get a StackOverflowException from an infinitely recursive method call.Rufusrug
P
7

I found the same error on OSX today. Tracked it down to what amounted to a stackOverlfow in an entitybean

Point answered 20/11, 2010 at 11:18 Comment(0)
I
5

Without looking at your code, it's difficult to say what is causing the error but here is explanation on red zone and also few links which discuss about the problem.

Each block of memory allocated to an application comes with a leading and trailing "redzone" which is a special signature in memory just before and just after the memory allocated to the application. If the application were to overwrite outside this region, the red zone signature would be overwritten. Then later on the application crashes and you get this abend when the memory is returned, and the OS can inspect the red zones.

This issues has been found on Mac OSX so it could be something related to class loader issues when class is not found but on mac osx, it's been reported as red zone access. So try it with JDK 1.5 and see if you can reproduce the problem.

http://osdir.com/ml/java.objectweb.asm/2007-07/msg00004.html

http://wiki.geneontology.org/index.php/OEWG_20090505

http://forums.oracle.com/forums/thread.jspa?threadID=429325

Island answered 1/10, 2009 at 4:0 Comment(2)
Interesting. I'll give these a shot.Krill
Saw this today. Turned out to be stack overflow. Apparently these days you aren't guaranteed to get a StackOverflowException from an infinitely recursive method call.Rufusrug
S
2

As already mentioned, this is appears to be a stealth stack overflow. Bump up your stack size JVM parameter (-Xss). In my case, going from -Xss128k to -Xss1024k did the trick.

Swagman answered 6/9, 2011 at 5:2 Comment(0)
C
2

In case this is helpful for anyone else. I encountered this error because because if a bad string passed to JSONArray.fromObject(jsonString);

I am running: java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode) OSX 10.6.8

The jsonString had a null value at the very beginning and the error was:

Invalid access of stack red zone 0x10d446ba0 rip=0x10c384b87

Bus error

This completely killed the jvm.

Once I figured out it was the bad json string the fix was easy.

Hope that helps someone.

Cher answered 8/6, 2012 at 14:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.