httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: apache 2.0.11 - tag 2.0.12?
Date Mon, 05 Mar 2001 15:05:29 GMT
On Sun, 4 Mar 2001 22:23:27 -0500 (EST), Cliff Woolley wrote:

>On Mon, 5 Mar 2001, Brian Havard wrote:
>
>> it dies when the total output exceeds 64k, header+body, not when the
>> requested file exceeds 64k. Subtle difference but may point to a
>> completely different cause.
>
>Yes, I'd missed that.  And yes, you're probably right that it points in a
>different direction.  Actually, that makes me feel better in a way,
>because it somewhat validates my theory that file_read() is not
>responsible.
>
>Anyway, I'm getting set up to try to duplicate the problem.  Will keep you
>all posted.

No need, I've think I've got to the bottom of it now. It appears that the
OS/2 implementation of writev() chokes if the total bytes > 64k. It returns
EINVAL but server/core.c:3189 says /* XXX: log the error */ rather than
actually logging the error :-(

So what's a reliable way to ensure no more than 64k gets writev()'d? I
guess I should break it up appropriately in apr_sendv() as it's most likely
an OS/2 only problem.

I also noticed some odd behaviour, the iovec looks like:

$65 = {{iov_base = 0x16c340 "", iov_len = 284}, {iov_base = 0x152c20 "",
    iov_len = 8192}, {iov_base = 0x154c80 "8", ' ' <repeats 199 times>...,
    iov_len = 808}, {iov_base = 0x154fa8 ' ' <repeats 200 times>...,
    iov_len = 7384}, {iov_base = 0x156d20 "16", ' ' <repeats 198 times>...,
    iov_len = 1616}, {iov_base = 0x157370 ' ' <repeats 200 times>...,
    iov_len = 6576}, {iov_base = 0x158dc0 "24", ' ' <repeats 198 times>...,
    iov_len = 2424}, {iov_base = 0x159738 ' ' <repeats 200 times>...,
    iov_len = 5768}, {iov_base = 0x15ae60 "32", ' ' <repeats 198 times>...,
    iov_len = 3232}, {iov_base = 0x15bb00 ' ' <repeats 200 times>...,
    iov_len = 4960}, {iov_base = 0x15cf00 "40", ' ' <repeats 198 times>...,
    iov_len = 4040}, {
    iov_base = 0x15dec8 ' ' <repeats 55 times>, "\n44", ' ' <repeats 142
times>..., iov_len = 4152}, {iov_base = 0x15efa0 "48", ' ' <repeats 198
times>...,
    iov_len = 4848}, {iov_base = 0x160290 ' ' <repeats 200 times>...,
    iov_len = 3344}, {iov_base = 0x161040 "56", ' ' <repeats 198 times>...,
    iov_len = 5656}, {iov_base = 0x162658 ' ' <repeats 200 times>...,
    iov_len = 2536}}

It looks like an interaction going on between a 9000 byte limit & an 8192
byte limit. Looks far from optimal to me.....

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message