[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    RE: mod_perl: rwrite returned -1
From:       "Christian Gilmore" <cgilmore () research ! att ! com>
Date:       1998-09-30 19:40:28
[Download RAW message or body]

I've seen that as well. As far as we here can decipher (without going into
full debug mode) this occurs when a user cuts off a connection. The error
report appears in Apache.xs (src/modules/perl/Apache.xs). Here's the
important code snippet:

#ifdef APACHE_SSL
        while(len > 0) {
            sent = 0;
            if(len < HUGE_STRING_LEN) {
                sent = rwrite(buffer, len, r);
            }
            else {
                sent = rwrite(buffer, HUGE_STRING_LEN, r);
                buffer += HUGE_STRING_LEN;
            }
            if(sent < 0) {
                mod_perl_debug(r->server, "mod_perl: rwrite returned -1");
                if(r->connection->aborted) break;
                else continue;
            }
            len -= sent;
            RETVAL += sent;
        }
#else
        if((sent = rwrite(buffer, len, r)) < 0) {
            mod_perl_debug(r->server, "mod_perl: rwrite returned -1");
            if(r->connection->aborted) break;
            else continue;
        }
        RETVAL += sent;
#endif

The r->connection->aborted variable appears to not be set properly, and
mod_perl complains (as it is attempting to continually write to a closed
connection) until Apache reaches its hard timeout. It may be worth noting
that I've so far only seen this behavior on SSL connections...

Regards,
Christian

-----------------
Christian Gilmore
AT&T Labs Research, Florham Park
cgilmore@research.att.com
www.research.att.com/info/cgilmore

> -----Original Message-----
> From: modperl-owner@apache.org [mailto:modperl-owner@apache.org]On
> Behalf Of Rob Goodwin
> Sent: Wednesday, September 30, 1998 12:25 PM
> To: mod_perl mailing list
> Subject: mod_perl: rwrite returned -1
>
>
>
> Hi there,
>
> Every now & then I get about 100 instances of an error that looks like:
>
> [Wed Sep 30 09:56:55 1998] mod_perl: rwrite returned -1
>
> what does this mean?
>
> thanks,
>
> rob
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic