You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@light.plus.com> on 2000/12/21 23:47:31 UTC

2.0 has problems with request bodies?

This triggers an assertion failure:

$ telnet www 8022
POST / HTTP/1.1
Host: www:8022
Content-Length: 1

<hit return a few times>

The error_log gives:

[Thu Dec 21 22:39:26 2000] [error] [client 192.168.5.1] File does not
exist: /home/joe/lib/inst/ap2b1-2/htdocs//
[Thu Dec 21 22:39:26 2000] file http_protocol.c, line 1168, assertion
"(((&(req_cfg->bb)->list))->next == (struct ap_bucket *)((char
*)((&(req_cfg->bb)->list)) - ((size_t) &((struct ap_bucket
*)0)->link)))" failed

Regards,

joe

Re: 2.0 has problems with request bodies?

Posted by Greg Stein <gs...@lyra.org>.
mod_dav doesn't do anything with POST, so I'd be suspect that it is the
cause. Happy to be wrong because it means we found the problem :-), but I
would doubt it.

Joe found it first in mod_dav because there are a number of DAV methods that
have request bodies. He just created a simple test case that also has a body
and (I presume) does not involved mod_dav.

I think you guys might need to figure out what machine/OS you're each
working on.
[ I'd help but I'm in the middle of errands and a visit to a friend. I can
  pick this up later tonite, tho. ]

Cheers,
-g

On Thu, Dec 21, 2000 at 06:45:07PM -0800, rbb@covalent.net wrote:
> 
> Do you have mod_dav installed?  I have been trying to reproduce that, but
> I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> see if that makes it fail.
> 
> Ryan
> 
> On Thu, 21 Dec 2000, Joe Orton wrote:
> 
> > This triggers an assertion failure:
> > 
> > $ telnet www 8022
> > POST / HTTP/1.1
> > Host: www:8022
> > Content-Length: 1
> > 
> > <hit return a few times>
> > 
> > The error_log gives:
> > 
> > [Thu Dec 21 22:39:26 2000] [error] [client 192.168.5.1] File does not
> > exist: /home/joe/lib/inst/ap2b1-2/htdocs//
> > [Thu Dec 21 22:39:26 2000] file http_protocol.c, line 1168, assertion
> > "(((&(req_cfg->bb)->list))->next == (struct ap_bucket *)((char
> > *)((&(req_cfg->bb)->list)) - ((size_t) &((struct ap_bucket
> > *)0)->link)))" failed
> > 
> > Regards,
> > 
> > joe
> > 
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------

-- 
Greg Stein, http://www.lyra.org/

Re: 2.0 has problems with request bodies?

Posted by Joe Orton <jo...@light.plus.com>.
On Fri, Dec 22, 2000 at 02:04:56PM -0800, Ryan Bloom wrote:
> > I'm unclear on this. On RH6.2 it works, but on RH7 it crashes?

Sorry, I wasn't being clear there; POST/C-L: 1 was doing weird things on
6.2 as well; the 15 seconds pause before the response. On 7 it just
crashed.

> > On my RH6.1 box, it passes my "regress" script. That certainly has some
> > request bodies in it (for PROPPATCH at least).
> > 
> > If it crashes only on RH7, then I *would* be suspicious of the glibc/gcc.
> 
> I am very suspicious of glibc in this instance.

The mod_dav testing I did was crashing with the same backtrace I posted
on 6.2 and 7.0.

Regards,

joe

Re: 2.0 has problems with request bodies?

Posted by rb...@covalent.net.
> > > > Do you have mod_dav installed?  I have been trying to reproduce that, but
> > > > I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> > > > see if that makes it fail.
> > > 
> > > Well I'm on Linux and configured with:
> > > 
> > > "./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
> > >     --with-maintainer-mode"
> > 
> > The POST failure I posted previously was on RH Linux 7: if I try this on
> > RH Linux 6.2:
> > 
> > POST / HTTP/1.1
> > Host: www:8022
> > Content-Length: 1
> > 
> > <return return return>
> > 
> > the server waits for about 15 seconds, then sends a 404 response. (i.e.,
> > this probably isn't a RHL7 glibc/gcc problem or anything like that)
> 
> I'm unclear on this. On RH6.2 it works, but on RH7 it crashes?
> 
> On my RH6.1 box, it passes my "regress" script. That certainly has some
> request bodies in it (for PROPPATCH at least).
> 
> If it crashes only on RH7, then I *would* be suspicious of the glibc/gcc.

I am very suspicious of glibc in this instance.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: 2.0 has problems with request bodies?

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Dec 22, 2000 at 03:49:36PM +0000, Joe Orton wrote:
> On Fri, 22 Dec 2000, Joe Orton wrote:
> > On Thu, Dec 21, 2000 at 06:45:07PM -0800, Ryan Bloom wrote:
> > > 
> > > Do you have mod_dav installed?  I have been trying to reproduce that, but
> > > I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> > > see if that makes it fail.
> > 
> > Well I'm on Linux and configured with:
> > 
> > "./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
> >     --with-maintainer-mode"
> 
> The POST failure I posted previously was on RH Linux 7: if I try this on
> RH Linux 6.2:
> 
> POST / HTTP/1.1
> Host: www:8022
> Content-Length: 1
> 
> <return return return>
> 
> the server waits for about 15 seconds, then sends a 404 response. (i.e.,
> this probably isn't a RHL7 glibc/gcc problem or anything like that)

I'm unclear on this. On RH6.2 it works, but on RH7 it crashes?

On my RH6.1 box, it passes my "regress" script. That certainly has some
request bodies in it (for PROPPATCH at least).

If it crashes only on RH7, then I *would* be suspicious of the glibc/gcc.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: 2.0 has problems with request bodies?

Posted by Joe Orton <jo...@redhat.com>.
On Fri, 22 Dec 2000, Joe Orton wrote:

> On Thu, Dec 21, 2000 at 06:45:07PM -0800, Ryan Bloom wrote:
> > 
> > Do you have mod_dav installed?  I have been trying to reproduce that, but
> > I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> > see if that makes it fail.
> 
> Well I'm on Linux and configured with:
> 
> "./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
>     --with-maintainer-mode"

The POST failure I posted previously was on RH Linux 7: if I try this on
RH Linux 6.2:

POST / HTTP/1.1
Host: www:8022
Content-Length: 1

<return return return>

the server waits for about 15 seconds, then sends a 404 response. (i.e.,
this probably isn't a RHL7 glibc/gcc problem or anything like that)

joe


Re: 2.0 has problems with request bodies?

Posted by rb...@covalent.net.
> Hmm. This means we have a crasher on the RH7 platform, and no known issues
> on RH6.x platforms (I've been able to run a simple regression on
> Apache/DAV).
> 
> Next Thursday when I get back, I'd be happy with a bit of remote debugging
> if somebody would be able to provide SSH access to an RH7 box.

I'll be back on Tuesday, and I'm also willing to take a closer look at
this on RH7.  I thought I had access to a box, but my friend is in Lincoln
this week, so I don't have access to a box until probably Wednesday at the
earliest.  If somebody else wants to give me SSH access, I could debug on
Tuesday sometime.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: 2.0 has problems with request bodies?

Posted by Greg Stein <gs...@lyra.org>.
Hmm. This means we have a crasher on the RH7 platform, and no known issues
on RH6.x platforms (I've been able to run a simple regression on
Apache/DAV).

Next Thursday when I get back, I'd be happy with a bit of remote debugging
if somebody would be able to provide SSH access to an RH7 box.

Cheers,
-g

On Fri, Dec 22, 2000 at 05:32:30PM -0800, rbb@covalent.net wrote:
> 
> I have researched this a bit more, and there is no patche.  :-)  The
> problem is in the request.  The request you sent was:
> 
> > > POST / HTTP/1.1
> > > Host: www:8022
> > > Content-Length: 1
> > > 
> > > <return return return>
> > > 
> 
> The problem is that Linux doesn't send 1 byte as a return, it sends two
> \r\n.  So, if you change the Content-Length to 2, you will get an
> immediate response.
> 
> What is happening right now, is that when we call check_pipeline_flush, it
> is checking the brigade to see if there is any data.  If so, we expect
> that there is a second request coming on this connection, and we should
> wait to send any data until the second request is processed.  Because
> there is a \n still on the socket, we see data and try to read the entire
> request.  When the second request is aborted, we just flush the output and
> close the connection.
> 
> Ryan
> 
> 
> On Fri, 22 Dec 2000 rbb@covalent.net wrote:
> 
> > 
> > Okay, well the second problem you mention (15 second delay before the 404
> > response on RedHat 6.2) is something I have just tracked down.  I should
> > have a patch momentarily.
> > 
> > Ryan
> > 
> > On Fri, 22 Dec 2000, Joe Orton wrote:
> > 
> > > On Thu, Dec 21, 2000 at 06:45:07PM -0800, Ryan Bloom wrote:
> > > > 
> > > > Do you have mod_dav installed?  I have been trying to reproduce that, but
> > > > I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> > > > see if that makes it fail.
> > > 
> > > Well I'm on Linux and configured with:
> > > 
> > > "./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
> > >     --with-maintainer-mode"
> > > 
> > > Regards,
> > > 
> > > joe
> > > 
> > > 
> > 
> > 
> > _______________________________________________________________________________
> > Ryan Bloom                        	rbb@apache.org
> > 406 29th St.
> > San Francisco, CA 94131
> > -------------------------------------------------------------------------------
> > 
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------
> 

-- 
Greg Stein, http://www.lyra.org/

Re: 2.0 has problems with request bodies?

Posted by rb...@covalent.net.
> > The problem is that Linux doesn't send 1 byte as a return, it sends two
> > \r\n.  So, if you change the Content-Length to 2, you will get an
> > immediate response.
> 
> I thought Joe was seeing a server crash due to an assert.

He was, but he posted another example that was just a dealy in sending
data.  We haven't been able to duplicate the server crash, and we _think_
the problem is he is using RedHat 7.0, which ships with a lot of beta
code.

> > What is happening right now, is that when we call check_pipeline_flush, it
> > is checking the brigade to see if there is any data.  If so, we expect
> > that there is a second request coming on this connection, and we should
> > wait to send any data until the second request is processed.  Because
> > there is a \n still on the socket, we see data and try to read the entire
> > request.  When the second request is aborted, we just flush the output and
> > close the connection.
> 
> I'm not sure if this is related, but the above check needs to read
> past data that looks like an empty line CRLF (or just LF).  Otherwise,
> we will pause for keepalive timeout at the end of every posted form
> request, because Navigator and MSIE still send an extra CRLF at the
> end of every POST.

Thank you Roy.  I didn't realize this was a problem.  I am in the middle
of testing a patch to solve this problem, should be committed in a few
minutes.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: 2.0 has problems with request bodies?

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
> The problem is that Linux doesn't send 1 byte as a return, it sends two
> \r\n.  So, if you change the Content-Length to 2, you will get an
> immediate response.

I thought Joe was seeing a server crash due to an assert.

> What is happening right now, is that when we call check_pipeline_flush, it
> is checking the brigade to see if there is any data.  If so, we expect
> that there is a second request coming on this connection, and we should
> wait to send any data until the second request is processed.  Because
> there is a \n still on the socket, we see data and try to read the entire
> request.  When the second request is aborted, we just flush the output and
> close the connection.

I'm not sure if this is related, but the above check needs to read
past data that looks like an empty line CRLF (or just LF).  Otherwise,
we will pause for keepalive timeout at the end of every posted form
request, because Navigator and MSIE still send an extra CRLF at the
end of every POST.

....Roy

Re: 2.0 has problems with request bodies?

Posted by rb...@covalent.net.
I have researched this a bit more, and there is no patche.  :-)  The
problem is in the request.  The request you sent was:

> > POST / HTTP/1.1
> > Host: www:8022
> > Content-Length: 1
> > 
> > <return return return>
> > 

The problem is that Linux doesn't send 1 byte as a return, it sends two
\r\n.  So, if you change the Content-Length to 2, you will get an
immediate response.

What is happening right now, is that when we call check_pipeline_flush, it
is checking the brigade to see if there is any data.  If so, we expect
that there is a second request coming on this connection, and we should
wait to send any data until the second request is processed.  Because
there is a \n still on the socket, we see data and try to read the entire
request.  When the second request is aborted, we just flush the output and
close the connection.

Ryan


On Fri, 22 Dec 2000 rbb@covalent.net wrote:

> 
> Okay, well the second problem you mention (15 second delay before the 404
> response on RedHat 6.2) is something I have just tracked down.  I should
> have a patch momentarily.
> 
> Ryan
> 
> On Fri, 22 Dec 2000, Joe Orton wrote:
> 
> > On Thu, Dec 21, 2000 at 06:45:07PM -0800, Ryan Bloom wrote:
> > > 
> > > Do you have mod_dav installed?  I have been trying to reproduce that, but
> > > I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> > > see if that makes it fail.
> > 
> > Well I'm on Linux and configured with:
> > 
> > "./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
> >     --with-maintainer-mode"
> > 
> > Regards,
> > 
> > joe
> > 
> > 
> 
> 
> _______________________________________________________________________________
> Ryan Bloom                        	rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> -------------------------------------------------------------------------------
> 
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Re: 2.0 has problems with request bodies?

Posted by rb...@covalent.net.
Okay, well the second problem you mention (15 second delay before the 404
response on RedHat 6.2) is something I have just tracked down.  I should
have a patch momentarily.

Ryan

On Fri, 22 Dec 2000, Joe Orton wrote:

> On Thu, Dec 21, 2000 at 06:45:07PM -0800, Ryan Bloom wrote:
> > 
> > Do you have mod_dav installed?  I have been trying to reproduce that, but
> > I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> > see if that makes it fail.
> 
> Well I'm on Linux and configured with:
> 
> "./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
>     --with-maintainer-mode"
> 
> Regards,
> 
> joe
> 
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: 2.0 has problems with request bodies?

Posted by Joe Orton <jo...@light.plus.com>.
On Thu, Dec 21, 2000 at 06:45:07PM -0800, Ryan Bloom wrote:
> 
> Do you have mod_dav installed?  I have been trying to reproduce that, but
> I can't seem to.  Any tips for me?  I am about to try building mod_dav to
> see if that makes it fail.

Well I'm on Linux and configured with:

"./configure --with-mpm=prefork --enable-dav --enable-dav-fs 
    --with-maintainer-mode"

Regards,

joe

Re: 2.0 has problems with request bodies?

Posted by rb...@covalent.net.
Do you have mod_dav installed?  I have been trying to reproduce that, but
I can't seem to.  Any tips for me?  I am about to try building mod_dav to
see if that makes it fail.

Ryan

On Thu, 21 Dec 2000, Joe Orton wrote:

> This triggers an assertion failure:
> 
> $ telnet www 8022
> POST / HTTP/1.1
> Host: www:8022
> Content-Length: 1
> 
> <hit return a few times>
> 
> The error_log gives:
> 
> [Thu Dec 21 22:39:26 2000] [error] [client 192.168.5.1] File does not
> exist: /home/joe/lib/inst/ap2b1-2/htdocs//
> [Thu Dec 21 22:39:26 2000] file http_protocol.c, line 1168, assertion
> "(((&(req_cfg->bb)->list))->next == (struct ap_bucket *)((char
> *)((&(req_cfg->bb)->list)) - ((size_t) &((struct ap_bucket
> *)0)->link)))" failed
> 
> Regards,
> 
> joe
> 
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------