Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Sebastian Sjöberg
On Apr 29, 2010, at 6:35 PM, Nick Mathewson wrote: > On Thu, Apr 29, 2010 at 5:19 AM, Sebastian Sjöberg > wrote: >> Hi, >> >> I've encountered a problem with openssl bufferevents where libevent reports >> fd:s as writeable but no action is being taken. > > [...] >> There is no problem when I'm

Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Nick Mathewson
On Thu, Apr 29, 2010 at 5:19 AM, Sebastian Sjöberg wrote: > Hi, > > I've encountered a problem with openssl bufferevents where libevent reports > fd:s as writeable but no action is being taken. [...] > There is no problem when I'm connecting without tls so I think this is an > issue with opens

Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Dan Kegel
On Thu, Apr 29, 2010 at 3:41 AM, W.C.A. Wijngaards wrote: > (From man SSL_write): >    As at any time a re-negotiation is possible, a >       call to SSL_write() can also cause read operations! > > It is different from normal socket operations, so maybe an interesting fact. I haven't looked at li

Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Sebastian Sjöberg
On Apr 29, 2010, at 12:59 PM, Springande Ulv wrote: > From my experience such "while-true" loops are typically created if you > neglect to check if the connection was closed on the client side and instead > reinsert the connection in libevent. In this case libevent will immediately > report tha

Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Springande Ulv
From my experience such "while-true" loops are typically created if you neglect to check if the connection was closed on the client side and instead reinsert the connection in libevent. In this case libevent will immediately report that the connection is readable. On 29. apr. 2010, at 12.10, S

Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread W.C.A. Wijngaards
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, (From man SSL_write): As at any time a re-negotiation is possible, a call to SSL_write() can also cause read operations! It is different from normal socket operations, so maybe an interesting fact. Best regards, Wouter On 04/29/20

Re: [Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Sebastian Sjöberg
On Apr 29, 2010, at 11:19 AM, Sebastian Sjöberg wrote: > Hi, Some additions and corrections. I've tested this on the latest libevent from git. > > I've encountered a problem with openssl bufferevents where libevent reports > fd:s as writeable but no action is being taken. After adding some m

[Libevent-users] 100% cpu utilization with openssl bufferevent.

2010-04-29 Thread Sebastian Sjöberg
Hi, I've encountered a problem with openssl bufferevents where libevent reports fd:s as writeable but no action is being taken. The program does the following: An evconnlistener waits for connections and when an connection by a client is made we set up an reading event. When the new connection