You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jos van der Meer <jm...@aidministrator.nl> on 2000/03/14 14:00:01 UTC
general/5852
The following reply was made to PR mod_jserv/5852; it has been noted by GNATS.
From: Jos van der Meer <jm...@aidministrator.nl>
To: apbugs@apache.org
Cc: hhor@aidministrator.nl
Subject: general/5852
Date: Tue, 14 Mar 2000 13:56:14 +0100 (MET)
Problem 5852 is a bug in the core part of Apache (http_protocol.c).
The problem occurs in Solaris 2.7 and might be Solaris specific.
The problem occurs in Apache 1.3.11 and 1.3.12. Apache 1.3.6 did
not have the bug.
Cause of the Bug: In Solaris 2.7 read() on a pipe may may return 0 even
if there is more input to read. This is conform Solaris' "read(2)" manual page:
>
> When attempting to read from an empty pipe (or FIFO):
>
> o If some process has the pipe open for writing and
> O_NDELAY is set, read() returns 0.
>
As a result, Apache will partially read input -- especially when it is large.
The fix is to apply the "UTS 2.1.2"-work-around in http_protocol.c
for Solaris too. The simplest way to achieve this is to add
NDELAY_PIPE_RETURNS_ZERO in ap_config.h for Solaris. For Apache 1.3.11 src:
$ diff ap_config.h ap_config.h.ORIG
172d171
< #define NDELAY_PIPE_RETURNS_ZERO
The work-around has been tested at AIdministrator. The problem
was reproducable before the work-around, and not-reproducable afterwards.
I.e. the work-around fixes the bug.
It seems to us that the NDELAY_PIPE_RETURNS_ZERO-behaviour would not
cause a serious overhead in any platform: for conservative programming,
it might be considered to integrate the NDELAY_PIPE_RETURNS_ZERO-behaviour
in the generic Apache code.
Jos van der Meer
AIdministrator Nederland B.V.
Julianaplein 14B, 3817 CS Amersfoort, Tel: +31-33-4659987
mailto:Jos.van.der.Meer@AIdministrator.nl