My Oracle Support Banner

StackOverflowError from AJPBodyInputStream.read() when Handling Requests with Large HTTP body (Doc ID 423164.1)

Last updated on OCTOBER 15, 2018

Applies to:

Oracle Containers for J2EE - Version 10.1.3.0.0 to 10.1.3.3.0 [Release AS10gR3]
Information in this document applies to any platform.

Symptoms

You have a J2EE web application running in the Oracle Containers for J2EE (OC4J) component of  Oracle Application Server 10.1.3.x that receives requests via the MOD_OC4J component of the Oracle HTTP_Server (powered by Apache).

During the handling of requests whose body content is large, the OC4J container encounters a StackOverflowError with a stack trace similar to the following:

java.lang.StackOverflowError 
at java.lang.ThreadLocal.set(ThreadLocal.java:148) 
at sun.nio.ch.Util.releaseTemporaryDirectBuffer(Util.java:67) 
at sun.nio.ch.IOUtil.read(IOUtil.java:212) 
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207) 
at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:176) 
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:86) 
at com.evermind.io.SingleReadBufferInputStream.readChunk(SingleReadBufferInputStream.java:92) 
at com.evermind.io.SingleReadBufferInputStream.read(SingleReadBufferInputStream.java:55) 
at com.evermind.server.http.AJPBodyInputStream.refillReadBuffer(AJPBodyInputStream.java:138) 
at com.evermind.server.http.AJPBodyInputStream.read(AJPBodyInputStream.java:103) 
at com.evermind.server.http.AJPBodyInputStream.read(AJPBodyInputStream.java:119) 
at com.evermind.server.http.AJPBodyInputStream.read(AJPBodyInputStream.java:119) 
         :
         : 
at com.evermind.server.http.AJPBodyInputStream.read(AJPBodyInputStream.java:119) 

With some JDK implementations, such as BEA JRockit (build 1.4.2_12-b03), the StackOverflowError can cause the JVM to abnormally exit though other JDK implementations (such as the Sun JDK 1.4.2_13 implementation) seem to be able to recover more gracefully from this error.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.