Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-05-05
06:27 • Closed ticket [222072ffff]: TLS (SSL) client loops before SSL becomes ready ... artifact: 23f7872e91 user: patthoyts
2003-09-15
05:35 • Ticket [222072ffff]: 6 changes artifact: 78b89869c1 user: dkf
2001-04-01
01:47 • Ticket [222072ffff]: 1 change artifact: be07a864af user: dgp
2000-11-09
19:23 • New ticket [222072ffff]. artifact: 5c58656c78 user: nobody

TLS (SSL) client loops before SSL becomes ready

Closed / Invalid222072ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 18 years ago
Descriptionplain2000-11-09 19:23:19
A non-blocking client socket is in a active wait (spending 100% of the CPU) state if he tries to write before the SSL is ready (detected using the SSL_is_finished function). This doesn't happen in the non-blocking version.

It was detected using the test/simpleClient.tcl script available from the TLS extension, and using any SSL server from the Internet (the slower the server responds to the SSL handshake the worser).

If compiling the TLS in debug we get the following message repeated:

BIO_write(0x27a448, 16)
WaitForConnect(0x27a448)
BioRead(0x48fc20, <buf>, 7) [0x27a048]
[0x27a048] BioRead(7) -> -1 [0.11]
ERR(5, 11)
Output(16) -> -1

After writing to the socket once, the TlsOutputProc (the TLS output callback) keeps getting called in a cycle wasting 100% of CPU, until the SSL_is_init_finished function returns 1.
dgp Ticket [222072ffff]: 1 change [History diff]2001-04-01 01:47:29
dkfplain2003-09-15 05:35:33
Logged In: YES 
user_id=79902

Is this bug valid or does it depend on misbehaviour inside
the TLS extension?
patthoytsplain2009-05-05 06:27:17
Re-raised this as a TLS issue.
Log in (anonymous is fine) to add a comment.