Invalid access of stack red zone from Java VM

人走茶凉 提交于 2019-12-05 11:51:56

问题


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!


回答1:


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




回答2:


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




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/1501770/invalid-access-of-stack-red-zone-from-java-vm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!