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

[Libevent-users] assert in http.c



Hi all,

I sometimes trigger the
  EVUTIL_ASSERT(req != NULL);
line in evhttp_connection_fail() in http.c while running a load test client that I have written. The load test involves many concurrent connections that are terminated while in various stages of connection establishment. Could this be related to the comment in evhttp_connection_reset()?

  /* XXXX This is not actually an optimal fix.  Instead we ought to have
     an API for "stop connecting", or use bufferevent_setfd to turn off
     connecting.  But for Libevent 2.0, this seems like a minimal change
     least likely to disrupt the rest of the bufferevent and http code.

     Why is this here?  If the fd is set in the bufferevent, and the
     bufferevent is connecting, then you can't actually stop the
     bufferevent from trying to connect with bufferevent_disable().  The
     connect will never trigger, since we close the fd, but the timeout
     might.  That caused an assertion failure in evhttp_connection_fail.
  */

In this case, I am using bufferevents returned from bufferevent_openssl_socket_new(). I do not see the problem when using bufferevent_new().

Thanks,
Myk
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.