You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Chen Chien-Yu <ho...@gmail.com> on 2010/06/02 10:50:26 UTC
HTTP doesn't work after upgrading from 2.0.55 to 2.2.15
Hi all,
I've been suffering from a problem for more than 1 week. The client will get
stuck when reading a page from Apache, it just waits for the zero-chunk
being sent from the Apache.
This post (
http://mail-archives.apache.org/mod_mbox/httpd-users/201005.mbox/%3CAANLkTinKrR60LOYct3eYtmCLwZAvL9OR3e8pWGOY72_K@mail.gmail.com%3E)
describes the problem I met.
After some debugging and analyses (
http://mail-archives.apache.org/mod_mbox/httpd-users/201006.mbox/%3cAANLkTinwenme6xwGtPokzCMHhK5sHKAaFcVFAQRlWU0e@mail.gmail.com%3e),
it seems the problem is caused by the APR library when processing the
bucket reading, an infinite loop?!
Then I found a post in this mail list with similar symptom as mine (
http://mail-archives.apache.org/mod_mbox/apr-dev/200704.mbox/%3C20070425010624.GA46804@zeus.kimaker.com%3E),
and another discussion that might be related to my problem (
http://mail-archives.apache.org/mod_mbox/apr-dev/200405.mbox/%3c20040507002929.GA19761@manyfish.co.uk%3e
).
But the post about "blocking bucket reads on non-blocking sockets" was in
2004, it's 6 years ago.
The Apache version I'm using is 2.2.15, the newest stable version, I don't
think the bug fix wouldn't include in the version.
How can I make sure the fix was included? Or do you guys have any idea about
my problem?
Thanks
Best regards,
honercek
Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15
Posted by Ryan Phillips <ry...@trolocsis.com>.
If you have native GCC available on your targets, it's probably
easiest to run ./configure of apr on the target and verify configure
is detecting sane values from the cross compiler.
If the cross compiler and configure are not behaving nicely, you can
override ./configure values by setting ac_ variables directly on the
./configure line.
Regards,
Ryan
On Fri, Jun 4, 2010 at 8:04 AM, Chen Chien-Yu <ho...@gmail.com> wrote:
> Hi Ryan,
> Thanks for your support.
> I'm not quite sure what you mean..
> Does that mean I have to build the code in srclib/apr/test and
> srclib/apr-util/test, and run the test on my target machine
> (cross-compiling)
> If it is, then I did run them and have some problems. But have no exact idea
> how to fix them.. The information on the Internet about this is few.
> srclib/apr/testall -v testfmt
> testfmt : |Line 50: expected <0>, but saw <2>
>
> Line 61: expected <0>, but saw <2>
>
> FAILED 2 of 9
> Failed Tests Total Fail Failed %
> ===================================================
> testfmt 9 2 22.22%
>
> srclib/apr/testall -v testlock
> testlock : -Line 188: rwlocks not implemented
>
> SUCCESS
> All tests passed.
>
> srclib/apr/testall -v testlfs
> testlfs : \Line 239: seek to 8GB - 4 (22): Invalid argument
> Bus error
>
> srclib/apr/testall -v testmmap
> testmmap : /Line 77: expected <0>, but saw <2>
>
> Segmentation fault
>
> srclib/apr/testall -v testsockets
> testsockets : |Line 67: IPv6 not enabled
>
> Line 82: IPv6 not enabled
>
> Line 108: IPv6 not enabled
>
> SUCCESS
> All tests passed.
> ========================================================================================
> srclib/apr-util/testall -v testqueue
> testqueue : \Line 103: expected <0>, but saw <70023>
> Segmentation fault
> srclib/apr-util/testall -v testpass
> testpass : \Line 96: expected <0>, but saw <70023>
> Segmentation fault
> srclib/apr-util/testall -v testreslist
> testreslist : |Line 228: expected <0>, but saw <70023>
>
> Segmentation fault
> srclib/apr-util/testall -v testxlate
> testxlate : -Line 63: expected <0>, but saw <22>
>
> FAILED 1 of 1
> Failed Tests Total Fail Failed %
> ===================================================
> testxlate 1 1 100.00%
>
> Thanks
> Best regards,
> honercek
>
> On Fri, Jun 4, 2010 at 1:06 PM, Ryan Phillips <ry...@trolocsis.com> wrote:
>>
>> On Wed, Jun 2, 2010 at 4:28 AM, Chen Chien-Yu <ho...@gmail.com> wrote:
>> > Hi all,
>> > I've tested the fix "Ryan Phillips" posted. It did work for my case.
>> > But I'm not sure if it's right or not..
>> >
>> > Index: sockopt.c
>> > ===================================================================
>> > --- sockopt.c (revision 532161)
>> > +++ sockopt.c (working copy)
>> > @@ -102,7 +102,7 @@
>> > /* must disable the incomplete read support if we disable
>> > * a timeout
>> > */
>> > - if (t <= 0) {
>> > + if (t < 0) {
>> > sock->options &= ~APR_INCOMPLETE_READ;
>> > }
>> > sock->timeout = t;
>>
>> Make sure to run the apr unit tests on the target to double check
>> configure detected all the correct settings... I'm pretty sure that
>> was our problem. We don't apply the patch I posted anymore (although
>> it could still be correct).
>>
>> Regards,
>> Ryan
>
>
Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15
Posted by Chen Chien-Yu <ho...@gmail.com>.
Hi Ryan,
Thanks for your support.
I'm not quite sure what you mean..
Does that mean I have to build the code in srclib/apr/test and
srclib/apr-util/test, and run the test on my target machine
(cross-compiling)
If it is, then I did run them and have some problems. But have no exact idea
how to fix them.. The information on the Internet about this is few.
srclib/apr/testall -v testfmt
testfmt : |Line 50: expected <0>, but saw <2>
Line 61: expected <0>, but saw <2>
FAILED 2 of 9
Failed Tests Total Fail Failed %
===================================================
testfmt 9 2 22.22%
srclib/apr/testall -v testlock
testlock : -Line 188: rwlocks not implemented
SUCCESS
All tests passed.
srclib/apr/testall -v testlfs
testlfs : \Line 239: seek to 8GB - 4 (22): Invalid argument
Bus error
srclib/apr/testall -v testmmap
testmmap : /Line 77: expected <0>, but saw <2>
Segmentation fault
srclib/apr/testall -v testsockets
testsockets : |Line 67: IPv6 not enabled
Line 82: IPv6 not enabled
Line 108: IPv6 not enabled
SUCCESS
All tests passed.
========================================================================================
srclib/apr-util/testall -v testqueue
testqueue : \Line 103: expected <0>, but saw <70023>
Segmentation fault
srclib/apr-util/testall -v testpass
testpass : \Line 96: expected <0>, but saw <70023>
Segmentation fault
srclib/apr-util/testall -v testreslist
testreslist : |Line 228: expected <0>, but saw <70023>
Segmentation fault
srclib/apr-util/testall -v testxlate
testxlate : -Line 63: expected <0>, but saw <22>
FAILED 1 of 1
Failed Tests Total Fail Failed %
===================================================
testxlate 1 1 100.00%
Thanks
Best regards,
honercek
On Fri, Jun 4, 2010 at 1:06 PM, Ryan Phillips <ry...@trolocsis.com> wrote:
> On Wed, Jun 2, 2010 at 4:28 AM, Chen Chien-Yu <ho...@gmail.com> wrote:
> > Hi all,
> > I've tested the fix "Ryan Phillips" posted. It did work for my case.
> > But I'm not sure if it's right or not..
> >
> > Index: sockopt.c
> > ===================================================================
> > --- sockopt.c (revision 532161)
> > +++ sockopt.c (working copy)
> > @@ -102,7 +102,7 @@
> > /* must disable the incomplete read support if we disable
> > * a timeout
> > */
> > - if (t <= 0) {
> > + if (t < 0) {
> > sock->options &= ~APR_INCOMPLETE_READ;
> > }
> > sock->timeout = t;
>
> Make sure to run the apr unit tests on the target to double check
> configure detected all the correct settings... I'm pretty sure that
> was our problem. We don't apply the patch I posted anymore (although
> it could still be correct).
>
> Regards,
> Ryan
>
Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15
Posted by Ryan Phillips <ry...@trolocsis.com>.
On Wed, Jun 2, 2010 at 4:28 AM, Chen Chien-Yu <ho...@gmail.com> wrote:
> Hi all,
> I've tested the fix "Ryan Phillips" posted. It did work for my case.
> But I'm not sure if it's right or not..
>
> Index: sockopt.c
> ===================================================================
> --- sockopt.c (revision 532161)
> +++ sockopt.c (working copy)
> @@ -102,7 +102,7 @@
> /* must disable the incomplete read support if we disable
> * a timeout
> */
> - if (t <= 0) {
> + if (t < 0) {
> sock->options &= ~APR_INCOMPLETE_READ;
> }
> sock->timeout = t;
Make sure to run the apr unit tests on the target to double check
configure detected all the correct settings... I'm pretty sure that
was our problem. We don't apply the patch I posted anymore (although
it could still be correct).
Regards,
Ryan
Re: HTTP doesn't work after upgrading from 2.0.55 to 2.2.15
Posted by Chen Chien-Yu <ho...@gmail.com>.
Hi all,
I've tested the fix "Ryan Phillips" posted. It did work for my case.
But I'm not sure if it's right or not..
Index: sockopt.c
===================================================================
--- sockopt.c (revision 532161)
+++ sockopt.c (working copy)
@@ -102,7 +102,7 @@
/* must disable the incomplete read support if we disable
* a timeout
*/
- if (t <= 0) {
+ if (t < 0) {
sock->options &= ~APR_INCOMPLETE_READ;
}
sock->timeout = t;
Thanks
Best regards,
honercek
On Wed, Jun 2, 2010 at 4:50 PM, Chen Chien-Yu <ho...@gmail.com> wrote:
> Hi all,
>
> I've been suffering from a problem for more than 1 week. The client will
> get stuck when reading a page from Apache, it just waits for the zero-chunk
> being sent from the Apache.
>
> This post (
> http://mail-archives.apache.org/mod_mbox/httpd-users/201005.mbox/%3CAANLkTinKrR60LOYct3eYtmCLwZAvL9OR3e8pWGOY72_K@mail.gmail.com%3E)
> describes the problem I met.
>
> After some debugging and analyses (
> http://mail-archives.apache.org/mod_mbox/httpd-users/201006.mbox/%3cAANLkTinwenme6xwGtPokzCMHhK5sHKAaFcVFAQRlWU0e@mail.gmail.com%3e),
> it seems the problem is caused by the APR library when processing the
> bucket reading, an infinite loop?!
>
> Then I found a post in this mail list with similar symptom as mine (
> http://mail-archives.apache.org/mod_mbox/apr-dev/200704.mbox/%3C20070425010624.GA46804@zeus.kimaker.com%3E),
> and another discussion that might be related to my problem (
> http://mail-archives.apache.org/mod_mbox/apr-dev/200405.mbox/%3c20040507002929.GA19761@manyfish.co.uk%3e
> ).
>
> But the post about "blocking bucket reads on non-blocking sockets" was in
> 2004, it's 6 years ago.
> The Apache version I'm using is 2.2.15, the newest stable version, I don't
> think the bug fix wouldn't include in the version.
>
> How can I make sure the fix was included? Or do you guys have any idea
> about my problem?
>
> Thanks
>
> Best regards,
> honercek
>
>