tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Freeman \(saurik\)" <sau...@saurik.com>
Subject Large JSP Files (8k+) Yield "Buffer overflow" & Lots of Errors
Date Mon, 03 Jul 2000 08:03:55 GMT
I was playing around with the current CVS of xml.apache.org’s xml-soap, and
ended up totally killing Tomcat.  The browser just sits there, and Tomcat
goes into a loop spitting the following to stdout (maybe stderr, not 100%
sure).  Each iteration of the error message is a few lines worth of Hander,
ServletWrapper, and ContextManager longer.

I finally figured out that it wasn’t any of the JSP code or beans that it
was using (removed all of that from the file), but the fact that it was
large, over 11K.  Through some experimenting with “cat /dev/zero | head -c #
> doh.jsp” the cutoff is at 8184 characters.  Anything over causes an error
message.  At first just a couple, but the farther over you go, the more
error messages.  If there is going to be an 8k cutoff, at least there should
only be one error message involved :-) .

I have gotten this behavior both with the Tomcat 3.2 beta binaries and the
current CVS of Tomcat (which I finally managed to get compiling JSP files
without returning those JspCompilationContext problems, which must have had
something to do with my CLASSPATH at the time I compiled Tomcat that time).


The error (the original really long one, with the JavaBean code still in,
which is loading the SOAP Service Manager):

SOAP Service Manager: Unable to read 'DeployedServices.ds': assuming fresh
start
Buffer overflow 8192 7 8186
Buffer overflow 8192 7 8186
Ctx( admin.cyberuniverse.com:/xml-soap ): Exception in: R( /xml-soap +
/deploy.jsp + null)
 java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.tomcat.service.connector.MsgBuffer.appendBytes(MsgBuffer.java,
Compiled Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectorResponse.doWrite(Ajp13Conn
ectorResponse.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOu
tputStream.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
utStream.java, Compiled Code)
        at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java,
Compiled Code)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java,
Compiled Code)
        at java.io.PrintWriter.flush(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.flush(ServletWriterFacade.java,
Compiled Code)
        at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java,
Compiled Code)
        at
_0002fdeploy_0002ejspdeploy_jsp_0._jspService(_0002fdeploy_0002ejspdeploy_js
p_0.java, Compiled Code)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va, Compiled Code)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java,
Compiled Code)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java, Compiled Code)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
Buffer overflow 8192 7 8186
Ctx( admin.cyberuniverse.com:/xml-soap ): Exception in: R( /xml-soap +
/deploy.jsp + null)
 java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.tomcat.service.connector.MsgBuffer.appendBytes(MsgBuffer.java,
Compiled Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectorResponse.doWrite(Ajp13Conn
ectorResponse.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOu
tputStream.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
utStream.java, Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.write(ServletWriterFacade.java,
Compiled Code)
        at java.io.PrintWriter.print(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.print(ServletWriterFacade.java,
Compiled Code)
        at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java, Compiled Code)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
Buffer overflow 8192 7 8186
Ctx( admin.cyberuniverse.com:/xml-soap ): Exception in: R( /xml-soap +
/deploy.jsp + null)
 java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.tomcat.service.connector.MsgBuffer.appendBytes(MsgBuffer.java,
Compiled Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectorResponse.doWrite(Ajp13Conn
ectorResponse.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOu
tputStream.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
utStream.java, Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.write(ServletWriterFacade.java,
Compiled Code)
        at java.io.PrintWriter.print(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.print(ServletWriterFacade.java,
Compiled Code)
        at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java, Compiled Code)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
Buffer overflow 8192 7 8186
Ctx( admin.cyberuniverse.com:/xml-soap ): Exception in: R( /xml-soap +
/deploy.jsp + null)
 java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.tomcat.service.connector.MsgBuffer.appendBytes(MsgBuffer.java,
Compiled Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectorResponse.doWrite(Ajp13Conn
ectorResponse.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOu
tputStream.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
utStream.java, Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.write(ServletWriterFacade.java,
Compiled Code)
        at java.io.PrintWriter.print(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.print(ServletWriterFacade.java,
Compiled Code)
        at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java, Compiled Code)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
Buffer overflow 8192 7 8186
Ctx( admin.cyberuniverse.com:/xml-soap ): Exception in: R( /xml-soap +
/deploy.jsp + null)
 java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.tomcat.service.connector.MsgBuffer.appendBytes(MsgBuffer.java,
Compiled Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectorResponse.doWrite(Ajp13Conn
ectorResponse.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOu
tputStream.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
utStream.java, Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.write(ServletWriterFacade.java,
Compiled Code)
        at java.io.PrintWriter.print(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.print(ServletWriterFacade.java,
Compiled Code)
        at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java, Compiled Code)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
Buffer overflow 8192 7 8186
Ctx( admin.cyberuniverse.com:/xml-soap ): Exception in: R( /xml-soap +
/deploy.jsp + null)
 java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.tomcat.service.connector.MsgBuffer.appendBytes(MsgBuffer.java,
Compiled Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectorResponse.doWrite(Ajp13Conn
ectorResponse.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOu
tputStream.java, Compiled Code)
        at
org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutp
utStream.java, Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java,
Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at java.io.PrintWriter.write(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.write(ServletWriterFacade.java,
Compiled Code)
        at java.io.PrintWriter.print(PrintWriter.java, Compiled Code)
        at
org.apache.tomcat.facade.ServletWriterFacade.print(ServletWriterFacade.java,
Compiled Code)
        at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java,
Compiled Code)
        at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
Code)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
Code)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
        at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection
(Ajp13ConnectionHandler.java, Compiled Code)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
…
…
…

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com



Mime
View raw message