Bug #8572 LibMySQL closes SSL connection using 5sec timeout
Submitted: 17 Feb 2005 16:59 Modified: 4 Jun 2005 1:46
Reporter: Oleg Burlachenko
Status: Closed
Category:Server Severity:S1 (Critical)
Version:4.1.9 OS:Microsoft Windows (XP)
Assigned to: Jim Winstead Target Version:

[17 Feb 2005 16:59] Oleg Burlachenko
Description:
  I built MySQL server from the source with enabled HAVE_OPENSSL. I've tried to test this
build and fall into situation when MySQL server closes the connection because of timeout
after short period of time(5 sec). I checked all the related server variables and they
setup by default with reasonable timeout. I debug the server code and found out that
connection timeout(5sec) fires after connection phase, when server waits for incomming
command. I looked into viossl.c and found following code: 
void vio_ssl_timeout(Vio *vio __attribute__((unused)), 
uint timeout __attribute__((unused))) 
{ 
/* Not yet implemented (non critical) */ 
} 

   

regards, 
Oleg

How to repeat:
  Run MySQLd which supports SSL. Create a client application that connects to the server
thru SSL and makes 10sec timeout after connect. After timeout next request to the server
will fail because of socket is closed.

Suggested fix:
I copied implementation of this method from viosocket.c and seems like it fixes the
issue.
[17 Feb 2005 17:38] Miguel Solorzano
Yes I already experienced this issue. The work-around I found was
to start the server with

--connect-timeout=5000 # or any suitable value
[24 May 2005 20:04] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25228
[2 Jun 2005 3:10] Jim Winstead
Fixed in 4.1.13 and 5.0.7.
[4 Jun 2005 1:46] Paul DuBois
Noted in 4.1.13, 5.0.7 changelogs.