You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/03/27 21:00:44 UTC

DO NOT REPLY [Bug 7534] New: - StackOverflowError in ChunkedOutputFilter.doWrite()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7534>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7534

StackOverflowError in ChunkedOutputFilter.doWrite()

           Summary: StackOverflowError in ChunkedOutputFilter.doWrite()
           Product: Tomcat 4
           Version: 4.0.4 Beta 2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Connector:Coyote
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: osvaldo@visionnaire.com.br


I got the following error with Tomcat 4.0.4-b2, testing Coyote:

java.lang.StackOverflowError
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedO
utputFilter.java:166)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedO
utputFilter.java:166)
(...)

Immediately, other stack dump appears in the console, should be caused by the 
stack overflow problem:

SEVERE: Error finishing response
java.lang.ArrayIndexOutOfBoundsException
        at org.apache.coyote.http11.InternalOutputBuffer.addActiveFilter(Interna
lOutputBuffer.java:274)
        at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Proces
sor.java:694)
        at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:
391)
        at org.apache.coyote.Response.action(Response.java:205)
        at org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutp
utBuffer.java:358)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:354)
        at org.apache.coyote.tomcat4.CoyoteProcessor.process(CoyoteProcessor.jav
a:791)
        at org.apache.coyote.tomcat4.CoyoteProcessor.run(CoyoteProcessor.java:87
0)
        at java.lang.Thread.run(Thread.java:536)

This only happened once, without apparent cause, and Tomcat keeps running 
smoothly afterwards.  Couldn't find how to reproduce it.

Trying to guess from the source, in ChunkedOutputFilter.java:166 -
> "buffer.doWrite(chunkHeader);" it seems the problem is related to a cycle in 
the linked list of filter pointers, and these are being updated by 
addActiveFilter().  It's very likely a race bug, so the difficulty to reproduce 
(when I did it, I was accessing my web-app pages immediately after starting 
Tomcat, and maybe some initialization was still running in parallel, which is 
likely because I have Cocoon installed in this Tomcat setup, addition to my web-
app).

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>