I see many of those:
[Thu Jul 08 14:16:55.301670 2021] [mpm_event:error] [pid 81101:tid 
123145411510272] (9)Bad file descriptor: AH00468: error closing socket 
-1/7ff9cf0086b0 from process_socket

which come from event.c#1263: rc = start_lingering_close_blocking(cs);
calling event.c#864: kill_connection_ex(cs, from);
and event.c#837: close_socket_nonblocking_ex(cs->pfd.desc.s, from);

Patch attached.

Attachment: event_ka_no_lingerv3.diff
Description: Binary data

> Am 08.07.2021 um 15:46 schrieb Yann Ylavic <[email protected]>:
> 
> On Thu, Jul 8, 2021 at 3:35 PM Stefan Eissing
> <[email protected]> wrote:
>>>> 
>>>> I needed to make small tweaks, because no all previous close checked the
>>>> return value and I got assert failures on your patch.
>>> 
>>> Interesting, what error value was that? EBADF, EAGAIN?
>> 
>> EBADF is what I saw.
> 
> Could you track somehow where the first close happened?
> Maybe:
> static void close_socket_nonblocking_ex(apr_socket_t *csd, const char *from)
> {
>    apr_status_t rv;
>    apr_os_sock_t fd = -1;
>    apr_os_sock_get(&fd, csd);
>    apr_socket_timeout_set(csd, 0);
>    rv = apr_socket_close(csd);
>    if (rv != APR_SUCCESS) {
>        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00468)
>                     "error closing socket %i/%pp from %s", (int)fd, csd, 
> from);
>        /*AP_DEBUG_ASSERT(0);*/
>    }
>    else {
>        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
>                     "socket %i/%pp closed from %s", (int)fd, csd, from);
>    }
> }
> #define close_socket_nonblocking(csd) close_socket_nonblocking_ex(csd,
> __FUNCTION__)
> 
> to see if close_socket_nonblocking() is called twice or something.

Reply via email to