You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Thomas Hilbig <th...@yahoo.com> on 2004/04/07 17:29:37 UTC

[MP2] Output occasionally corrupt

I have been trying to get rid of this problem for over
a year -- HTTP and mod_perl upgrades haven't helped.

My CGI programs occasionally screws up its output by a
couple of bytes.  I'd say it happens once every
ten-twenty times.  It is normally not noticeable
unless it effects a hyper-link, data or Javascript
code.

I've upgraded httpd and mod_perl (last was 6 months
ago) but the problem remained.  Possibly its a Linux
or some stupid programmer problem.   Worse, I can't
find any references to this problem -- but I am not
sure what it would be labeled as.

Any ideas?

Tom

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [MP2] Output occasionally corrupt

Posted by Stas Bekman <st...@stason.org>.
Thomas, please keep the thread on the list. thanks.

Thomas Hilbig wrote:
 > It's reproducible, but intermittent -- I ran it three
 > times (90 pulls total) and had 2 bad hashes.  I
 > haven't done a bug report as I was hoping it was an
 > simple configuration problem.  I don't know if the
 > problem is mod_perl or httpd (or other).

Neither do we untill we can reliably reproduce it (which potentially requires 
your full bug report to match OS, perl and httpd and mp versions and other 
things). But it looks like you are on the way to accomplish that.

 > Definintely single server mode will be the next test.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [MP2] Output occasionally corrupt

Posted by Stas Bekman <st...@stason.org>.
Thomas Hilbig wrote:
> It's very reproducible and occurs when there is no
> other server activity.  I have built and tested a
> small CGI script to dump pages of vertical lines. 
> Then I use another Perl script (run locally or from
> another machine) to pull the page and run an MD5 hash
> against the contents to catch the bug.
> 
> The test page is at
> http://www.sygration.com/cgi-bin/bigcgi 
> 
> #!/usr/bin/perl
>    $|=1 ;
>    use strict ; 
>    print "Content-type: text/html\n\n";
>    print "<html><body><h1>Big CGI !</h1>\n" ;
>    for(my $i=1; $i<=400; $i++) {
>      print "| |   |     |    |   |     |   |     |   
> |       |    |  |      |    |     |\n" ;
>    }
>    print "<h2>Done</h2></body></html>\n" ;
> 
> I haven't included it, but the Perl script to pull
> this page and run MD5 is available at
> http://www.sygration.com/pagehammer.pl 
> To hit the webpage 30 times and dump the MD5 each
> time, use:   ./pagehammper.pl
> http://www.sygration.com/cgi-bin/bigcgi 30

I run this 3 times (3x30) and see the same md5sum. Have you tried running in a 
single server mode? This should make sure that you hit the same server all the 
time.

Also please submit a complete bug report so we are on the same line here:
http://perl.apache.org/bugs/

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [MP2] Output occasionally corrupt

Posted by Thomas Hilbig <th...@yahoo.com>.
It's very reproducible and occurs when there is no
other server activity.  I have built and tested a
small CGI script to dump pages of vertical lines. 
Then I use another Perl script (run locally or from
another machine) to pull the page and run an MD5 hash
against the contents to catch the bug.

The test page is at
http://www.sygration.com/cgi-bin/bigcgi 

#!/usr/bin/perl
   $|=1 ;
   use strict ; 
   print "Content-type: text/html\n\n";
   print "<html><body><h1>Big CGI !</h1>\n" ;
   for(my $i=1; $i<=400; $i++) {
     print "| |   |     |    |   |     |   |     |   
|       |    |  |      |    |     |\n" ;
   }
   print "<h2>Done</h2></body></html>\n" ;

I haven't included it, but the Perl script to pull
this page and run MD5 is available at
http://www.sygration.com/pagehammer.pl 
To hit the webpage 30 times and dump the MD5 each
time, use:   ./pagehammper.pl
http://www.sygration.com/cgi-bin/bigcgi 30

Thanks, Tom


--- Stas Bekman <st...@stason.org> wrote:
> 
> The first step is to be able to reproduce the
> problem. Without it I doubt we 
> can solve it.
> 
> For example you could try to stress test your
> application with ab or a similar 
> tool, recording the received length and comparing it
> with an expected one, if 
> it's losing bytes, or doing a full comparison if the
> length is fine, but the 
> data is corrupted. It's also possible that it's a
> bug in your browser, so I'd 
> use a command line tool to verify things.
> 
>
__________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another
> mod_perl Hacker
> http://stason.org/     mod_perl Guide --->
> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org
> http://apacheweek.com
> http://modperlbook.org http://apache.org  
> http://ticketmaster.com
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info:
> http://perl.apache.org/maillist/modperl.html
> List etiquette:
> http://perl.apache.org/maillist/email-etiquette.html
> 


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [MP2] Output occasionally corrupt

Posted by Stas Bekman <st...@stason.org>.
Thomas Hilbig wrote:
> I have been trying to get rid of this problem for over
> a year -- HTTP and mod_perl upgrades haven't helped.
> 
> My CGI programs occasionally screws up its output by a
> couple of bytes.  I'd say it happens once every
> ten-twenty times.  It is normally not noticeable
> unless it effects a hyper-link, data or Javascript
> code.
> 
> I've upgraded httpd and mod_perl (last was 6 months
> ago) but the problem remained.  Possibly its a Linux
> or some stupid programmer problem.   Worse, I can't
> find any references to this problem -- but I am not
> sure what it would be labeled as.

The first step is to be able to reproduce the problem. Without it I doubt we 
can solve it.

For example you could try to stress test your application with ab or a similar 
tool, recording the received length and comparing it with an expected one, if 
it's losing bytes, or doing a full comparison if the length is fine, but the 
data is corrupted. It's also possible that it's a bug in your browser, so I'd 
use a command line tool to verify things.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html