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 2007/07/30 08:00:41 UTC

DO NOT REPLY [Bug 42996] New: - Redirect-to-buffer strategy with nio connector results in blank page

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996

           Summary: Redirect-to-buffer strategy with nio connector results
                    in blank page
           Product: Tomcat 6
           Version: unspecified
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: apache@spatula.net


When using Wicket 1.2.6 to post a form, Tomcat 6 appears to prematurely close
the HTTP connection when using the nio connector.  This manifests itself as a
blank page being delivered to the end user.  Viewing the TCP dump, it looks like
after the POST data is delivered, Tomcat just closes the connection.

On other dynamic and static pages, Tomcat behaves as-expected.  This only seems
to be a problem when delivering a page using the redirect-to-buffer form
processing pattern.

Wicket's default form processing strategy is to render the output to a buffer,
issue a redirect to the user, and then display the content of the buffer.  (See
http://cwiki.apache.org/WICKET/render-strategies.html and a long discussion of
the redirect-after-post strategy here:
http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost )

This works as-expected every time with the standard HTTP/1.1 connector.  With
the nio connector it fails about 9 times out of 10.

The workaround is to use only the HTTP/1.1 connector.

I'm not 100% certain that this is a Tomcat bug and not a Wicket bug, but it does
seem to be a consequence of the interaction between the two.  Fortunately,
Wicket is an Apache project now too :-)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996





------- Additional Comments From sebster@sebster.com  2007-07-31 02:31 -------
This looks exactly like what I saw with the NIO connector; POST parameters
sometimes went missing. It happened very infrequently, and when I tried to
produce an isolated test case (which I spent several hours on), I could not
reproduce it. Note that my requests in which this happened had POST params only
and no GET params.

When debugging in my application I saw behavior that I found suspect: the
parametersParsed flag on the Request was sometimes true even though the
parameters had not been parsed yet, causing all the POST params to not be parsed
and the parameters map to be empty. Unfortunately this problem happened so
infrequently that I only caught it in the debugger once, and was not able to
determine how this could come about.

The strange thing is, that the problem went away in my application (I don't know
what caused it to go away), and I have not seen it since. I figured it may have
been incorrect synchronization on my part...

Regards,
Sebastiaan

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996





------- Additional Comments From apache@spatula.net  2007-07-31 14:58 -------
At first glance, it looks like 6.0.14 fixes the problem.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996





------- Additional Comments From fhanik@apache.org  2007-07-31 06:42 -------
Hey guys,
please test with 6.0.14 or 6.x as there have been numerous bug fixes.
the 6.0.14 binaries can be found here:
http://people.apache.org/~remm/tomcat-6/v6.0.14/

Let me know what you come up with
Filip

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996


apache@spatula.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Redirect-to-buffer strategy |POST with nio connector
                   |with nio connector results  |results in missing variables
                   |in blank page               |




------- Additional Comments From apache@spatula.net  2007-07-30 22:18 -------
I'm still trying to zero in on the exact nature of the problem.   Right now it
looks like the redirect-to-buffer is a red herring.  I wrote a simple filter to
dump out the parameters to the request, and it looks like all of the POST
variables are missing, though the GET variable is there.  tcpdump shows that
they *are* being delivered over the wire, however.

Sometimes *some* variables make it into the request and others don't.

Once I get a better idea of what's going on, I'll submit a proper test case.

It seems to misbehave less often if the native library is not used, but that
might also be a red herring.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - Redirect-to-buffer strategy with nio connector results in blank page

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996


fhanik@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From fhanik@apache.org  2007-07-30 09:43 -------
Could you please attach a test case, and I'll be happy to look into it for you.

thanks
Filip

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996


apache@spatula.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |WORKSFORME
            Version|unspecified                 |6.0.13




------- Additional Comments From apache@spatula.net  2007-08-01 09:06 -------
A day later, things still seem OK, so at this point I'm comfortable saying that
it's fixed in 6.0.14.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996





------- Additional Comments From apache@spatula.net  2007-07-31 14:00 -------
Unfortunately, adjusting the maxHttpHeaderSize doesn't seem to fix the problem.

Strangely enough, though, it seems like having multiple Connectors defined with
at least one of them being the standard connector and the two sharing the same
executor pool makes the problem happen less frequently, though that could be my
imagination too.  Maybe there's some state that isn't getting reset for the
executors with the nio connector?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996





------- Additional Comments From apache@spatula.net  2007-07-31 13:30 -------
Some additional testing indicates that this MAY be the result of too low a value
for maxHttpHeaderSize.  My simple test of POST works as-expected, but posts with
my actual site don't seem to.  The inference I got from this was that the
content of the POST matters.  No idea why it would behave differently for nio vs
the standard connector though, unless the two have different defaults or react
differently when the default is exceeded.

I will do some more testing and report what I find.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 42996] - POST with nio connector results in missing variables

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=42996





------- Additional Comments From apache@spatula.net  2007-07-30 22:33 -------
Also, I'm not sure if it's relevant, but it's more information anyway; this is
happening much more often on my FreeBSD system, which is running Tomcat via
jsvc, than it is happening on the Windows machine I use for development work...
it's possible that jsvc figures into it somehow.  Once I get port 8080 unblocked
on my firewall, I'll see if it persists without jsvc.

It's also possible that there's something particular to the way nio behaves on
FreeBSD (and there's always the unusual possibility of a JVM bug on the platform).

The other thing that strikes me as interesting/unusual about the request is that
it contains both GET and POST variables... something I'll probably take into
consideration as I try to wire up a test case.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org