Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004025 [Resin] major random 05-04-10 00:12 05-19-10 15:32
Reporter vicsanca View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.6
Summary 0004025: sendRedirect fails
Description In some pages sendRedirect fails where 3.1 works fine. The server seems to try to redirect and in a time fails to redirect.

I get an error in jvm_default.log

java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(
at com.caucho.server.hmux.HmuxRequest.onCloseConnection(
at com.caucho.server.connection.TcpConnection.closeImpl(
at com.caucho.server.connection.TcpConnection.destroy(
at com.caucho.server.connection.TcpConnection.handleRequests(
at com.caucho.server.connection.TcpConnection$AcceptTask.doTask(
at com.caucho.server.connection.TcpConnection$ConnectionReadTask.runThread(
at com.caucho.server.connection.TcpConnection$
at com.caucho.util.ThreadPool$PoolThread.runTasks(
at com.caucho.util.ThreadPool$

I'm trying to make some simple code to reproduce error
Additional Information
Attached Files

- Relationships

- Notes
05-04-10 02:30

Still not able to generate simple code to reproduce it. The pages we use worked fine in 3.1 and 2 versions. The page is not fully correct but worked fine in that versions.

What the pages do:
if (condition) {
generate html code

We know that the correct one is this:
if (condition) {
else {
   generate html code

but when the application was created we thought that sendRedirect jumped to the page and stop the execution in the correct page.
05-13-10 16:31

vicsanca, I wasn't able to reproduce the error. I think it may be caused by a downsizing the buffers in version 4.
Do you use <%@page buffer directive on your page? What's that set to if so?
What are you using for load balancing ( apache / iis / resin ? ) Thanks!
05-13-10 16:42

On that same note: sendRedirect should not be failing due to the issue in stacktrace. It can be failing with IllegalStateException if the output has already been flushed due to buffer overflow or an explicit flushing of the buffers.
05-16-10 23:45

We use resin with Apache 2.2 and
We don't use buffer directive.
We are able to reproduce the error in our application but not to generate simple code to post you.
05-17-10 05:46

Yes seems that adding buffer page directive with a high value works:
1kb - fails
8kb - fails
16kb - works :)

It's a bug or there is an option for increasing default buffer for all pages without the buffer directive?
05-17-10 08:02

Thanks for clarification. You can include the <%@ page buffer using <jsp-config include-prelude.
05-17-10 23:58

What buffer size it's configured by default in 3.1.x?
It's possible to change it in 4.0 in source code before compiling to put the same? if possible where is the buffer size in source code?

05-19-10 15:32


- Issue History
Date Modified Username Field Change
05-04-10 00:12 vicsanca New Issue
05-04-10 02:30 vicsanca Note Added: 0004548
05-04-10 08:31 vicsanca Issue Monitored: vicsanca
05-13-10 16:31 alex Note Added: 0004580
05-13-10 16:42 alex Note Added: 0004581
05-16-10 23:45 vicsanca Note Added: 0004585
05-17-10 05:46 vicsanca Note Added: 0004586
05-17-10 08:02 alex Note Added: 0004588
05-17-10 23:58 vicsanca Note Added: 0004591
05-19-10 15:32 ferg Note Added: 0004597
05-19-10 15:32 ferg Assigned To  => ferg
05-19-10 15:32 ferg Status new => closed
05-19-10 15:32 ferg Resolution open => fixed
05-19-10 15:32 ferg Fixed in Version  => 4.0.7

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
45 total queries executed.
34 unique queries executed.
Powered by Mantis Bugtracker