[OpenSIPS-Devel] [ opensips-Bugs-3061895 ] tls_blocking_write() in tls_server.c problem

SourceForge.net noreply at sourceforge.net
Wed Sep 8 13:04:49 CEST 2010


Bugs item #3061895, was opened at 2010-09-08 11:04
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3061895&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: tls_blocking_write() in tls_server.c problem

Initial Comment:
tls_blocking_write() polls for both POLLOUT and POLLIN at the same time. Normally, socket is ready for write all the time. It causes poll() at line 765 returned immediately.

When using t_relay("tls:xxx") in script, I always get "too many retries with no operation" error message because poll() function returns immediately.

I read the OpenSSL doc http://www.openssl.org/docs/ssl/SSL_connect.html and http://www.openssl.org/docs/ssl/SSL_get_error.html#item_SSL_ERROR_WANT_READ. 
When SSL_connect(), SSL_read(), or SSL_write() return SSL_ERROR_WANT_READ, tls_blocking_write() should poll for POLLIN only. And when they return SSL_ERROR_WANT_WRITE, tls_blocking_write() should poll for POLLOUT only.

I think this bug also makes CPU usage to be 100% while looping.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3061895&group_id=232389



More information about the Devel mailing list