[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] bufferevent_openssl's output callback



On Wed, Nov 12, 2014 at 8:39 PM, Mark Ellzey <mthomas@xxxxxxxxxx> wrote:
> - http.c chunked response parsing (really? this is what we still do?).
>   * ishuts down the socket once the last chunk has been read
>       evhttp_read_trailer()
>           -> evhttp_connection_done()
>              -> evhttp_request_free()) (removes and frees the request)
>
> - bevssl.c : also shuts down the same socket at some point, which I think
>   eventually calls "conn_closed" which then calls bufferevent_run_eventcb_
>
>   which I guess calls evhttp_error_cb() with the conditionals matching
>   "(what & ((BEV_EVENT_EOF|BEV_EVENT_ERROR))", which enters into
>   evhttp_connection_fail_(), with a NULL request.
>
> Enough "whiches"?
>
> This is a terrible mess.
Yuuup.

Try adding a debug printf on the return value of SSL_read. You'll see
that SSL_read returning 0 is what kicks off this entire sequence of
events. I haven't been able to correlate this with any particular
pattern in the pcap, so I would really like to write a minimal repro
for this but not sure where to start. (and can't sink too much time
into it)
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.