Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] 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 Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.7 Product Version 4.0.6
  Product Build
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(Thread.java:1206)
at com.caucho.server.hmux.HmuxRequest.onCloseConnection(HmuxRequest.java:1640)
at com.caucho.server.connection.TcpConnection.closeImpl(TcpConnection.java:908)
at com.caucho.server.connection.TcpConnection.destroy(TcpConnection.java:960)
at com.caucho.server.connection.TcpConnection.handleRequests(TcpConnection.java:538)
at com.caucho.server.connection.TcpConnection$AcceptTask.doTask(TcpConnection.java:1100)
at com.caucho.server.connection.TcpConnection$ConnectionReadTask.runThread(TcpConnection.java:1037)
at com.caucho.server.connection.TcpConnection$AcceptTask.run(TcpConnection.java:1068)
at com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901)
at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866)

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

- Relationships

- Notes
(0004548)
vicsanca
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) {
   sendRedirect(url)
}
generate html code


We know that the correct one is this:
if (condition) {
    sendRedirect(url)
}
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.
 
(0004580)
alex
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!
 
(0004581)
alex
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.
 
(0004585)
vicsanca
05-16-10 23:45

We use resin with Apache 2.2 and mod_caucho.so.
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.
 
(0004586)
vicsanca
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?
 
(0004588)
alex
05-17-10 08:02

Thanks for clarification. You can include the <%@ page buffer using <jsp-config include-prelude.
 
(0004591)
vicsanca
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?

Thanks
 
(0004597)
ferg
05-19-10 15:32

server/265b
 

- 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