You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Sid Bos <Si...@netiq.com> on 2001/12/10 20:10:42 UTC
general/9028: binary corruption when mod_jk uses buffer routines
>Number: 9028
>Category: general
>Synopsis: binary corruption when mod_jk uses buffer routines
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: apache
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Mon Dec 10 11:20:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Sid.Bos@netiq.com
>Release: 1.3.20
>Organization:
apache
>Environment:
Windows XP Home Edition
>Description:
We are using mod_jk with Apache 1.3.20. When we run this on Windows XP, the page is garbled a lot of the time, there is binary data or HTTP response headers from different POST's. To test this problem we made a large html file (130K). When Apache served this up, there were no problems. When Tomcat served this up, there were no problems. When Apache was on NT 4, and Tomcat on XP, there were no problems. When Apache was on XP and Tomcat on NT4, the HTML file is garbled. I put a bunch of debugging statements in to see the buffer contents. The buffer looks fine up to and after the first send() call in sendwithtimeout in buff.c, but what is sent to the send() call does not match what the browser (or command-line HTML scraping utility) recieves. I believe the corruption always occurs on buffer boundaries. At first we thought this was only occurring when the request came from a remote machine, but using a command-line tool we saw that the corruption could occur on from the local machine as well, just not as often. With larger file sizes the problem becomes more apparent. With a 30K test file we would hardly see the the corruption at all on the local machine (less than .5% of the time). With a 130K file we have never seen the whole file served up correctly on the local machine. The problem also occurs with both HTTP 1.0 and HTTP 1.1. I think the file was being served up correctly when at one point I had so much debugging print statements that the SO_LINGER timeout was reached, and the buffering routines just wrote out everything at once.
>How-To-Repeat:
Just pass large amounts of data through the write_it_all() or write_with_errors() routines when Apache is running on XP
>Fix:
I'm not really sure. It would seem to me to be a problem in the send() call in Windows XP, but the problem doesn't manifest itself if we have Apache directly serve up pages.
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]