Steffen started testing and immediately found sth. Yeah! He sees many

[Mon Apr 03 14:20:28.390474 2017] [http2:warn] [pid 3180:tid 2880] [client 
5.80.147.209:61342] AH10020: h2_session(106,DONE,0): session cleanup triggered 
by pool cleanup. this should have happened earlier already.

in his logs. The problem here is that mod_http2 would like to shutdown in 
ap_prep_lingering_close()
which is invoked by ap_lingering_close(). This is always done by mpm_event, 
worker and prefork AFAIK.

mpm_winnt has an optimization in line 814:
        ap_process_connection(c, context->sock);

        apr_socket_opt_get(context->sock, APR_SO_DISCONNECTED, &disconnected);

        if (!disconnected) {
            context->accept_socket = INVALID_SOCKET;
            if (!c->aborted) { 
                ap_lingering_close(c);
            }
        }

So, if the connection is already gone or was aborted, it will not call
this and the "safe" shutdown is not triggered. "safe" insofar as
mod_http2 needs to shutdown the connection *before* mod_ssl does.

Question is: do we "fix" mpm_winnt or is there a better way for mod_http2 to 
shutdown the connection before mod_ssl does. This would need to work in async 
mpms for any connection state.

-Stefan

Reply via email to