[OpenSIPS-Devel] [ opensips-Bugs-3061895 ] tls_blocking_write() in tls_server.c problem
SourceForge.net
noreply at sourceforge.net
Fri Dec 17 09:40:15 CET 2010
Bugs item #3061895, was opened at 2010-09-08 14:04
Message generated for change (Comment added) made by bogdan_iancu
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: core
Group: trunk
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
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.
----------------------------------------------------------------------
>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2010-12-17 10:40
Message:
Bug fixed by patch #3118263
----------------------------------------------------------------------
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