httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: [PATCH] ENOBUFS is not a shooting offense.
Date Wed, 16 Jan 2002 17:37:18 GMT
On Tue, 15 Jan 2002, Bill Stoddard wrote:

> Apache on HPUX will return ENOBUFS when resources are low. When ENOBUFS is returned,
the
> TCP connection has whacked the connection before the call to accept() completed. This
> patch will enable the child process to stay up and running.
> 
> This patch enables Apache on HPUX to more gracefully handle low resource conditions.
Any
> concerns with committing this?

madhu submitted a patch for this a few weeks ago.  it is specific to hpux
11.x, i would suggest committing his patch that only does so for hpux
11.x.  if this were to happen anywhere else, it would be a real error that
shouldn't be ignored.  i found the following on the hpux support site when
looking at the problem before speaking with madhu:

Beginning in 11.0 the accept(2) call now returns errno 233
(ENOBUFS) if a connection is aborted by the client before the accept()
call completes.

On 11.0, this error can be returned under the following scenario:

1) A client makes a new TCP connection to the server (TCP SYN/SYN ACK/ACK)
2) The new connection is queued on the servers LISTEN socket
3) Client sends a TCP reset (RST) on the connection
4) Server calls accept(2)

The man page indicates this may out of memory condition, however this
is rarely the case.   The man page reads:
  [ENOBUFS] No buffer space is available. The accept() cannot complete.
  The queued socket connect request is aborted.

These items should all be considered as 3 seperate posibilities. The
last one, "The queued socket connect request is aborted" is, actually
the most common.

This errno was chosen, in part, because it was an existing errno already
being returned by the accept(2) call. It was not deemed acceptable to
add a new errno at thsi time in order to maintain binary compatability
with exising applications.



Mime
View raw message