Bug #64456 SSH Tunnel timeout causes mysql crash
Submitted: 26 Feb 2012 10:52 Modified: 10 Jun 2012 15:21
Reporter: Matt Boothman Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.37 rev 8576 OS:Linux (3.2.5-3.fc16.x86_64)
Assigned to: CPU Architecture:Any
Tags: SSH Tunnel timeout causes workbench to crash

[26 Feb 2012 10:52] Matt Boothman
Description:
Workbench seems unable to detect when an SSH tunnel has timed out and/or been closed causing a crash when running queries (along with severe annoyance :-) ).

How to repeat:
You will need to know if your ISP forces SSH connections to timeout and how long they take to timeout or find another way to recreate a timeout.

1. Open Workbench
2. Set up an SSH connection to a server
3. Open Connection to Start Querying
4. Run a query right away (works fine)
5. Wait for the SSH tunnel to timeout
6. Attempt to run another query
7. Application stalls and needs to be exited before you can continue at which point you should get an ABRT notification.

Suggested fix:
Add mechanism to detect if an SSH tunnel is open and the remote server can be contacted. If not, clean up the old connection and create a new one.
[21 Mar 2012 21:41] Armando Lopez Valencia
Hello Matt.
Thanks for your report.
Can you please provide more information about the scenario where you are reproducing this?
Something like: Client OS, Server OS, MySQL Version, SSH Client/Server parameters that are causing this?
I tried to reproduce this in Windows 7 and Ubuntu 11.04 as clients without success.
Thanks.
[21 Mar 2012 21:59] Matt Boothman
I have this issue using:

Fedora FC16 -> Centos 5.7 (OpenSSH_5.8p1, MySQL 5.5.19)
Fedore FC16 -> Windows Server 2008 R2 (running FreeSSH, MySQL 5.1.57-community)

I also had the same issue with Ubuntu but can't remember the versions.

Connecting using 5.2.38 rev 8753 as have updated since raising issue.

Try this:

Open Workbench and connect to a MySQL server over SSH. Now disconnect from the network, reconnect and see what happens (will that force the SSH connection to close??)? You have to force the SSH connection to timeout without the software knowing about it.

I know this is a specific problem but I have experienced it when connected to a British Telecom network and Virgin Media (in the UK) but not when connected to my work's network (ISP unknown).

Hope this helps.
[22 Mar 2012 16:51] Armando Lopez Valencia
Can't reproduce with Fedora 16x64.
Even when WB can't connect back to the SSH tunnel after unplug-plug the network there is no crash.
select sleep (600) LIMIT 0, 1000	Error Code: 2013. Lost connection to MySQL server during query
[10 May 2012 15:21] Armando Lopez Valencia
Hello Matt
Can you please try with our new WB version and verify if you can still reproduce this issue?
http://dev.mysql.com/downloads/workbench/5.2.html
Please keep in mind that for a huge amount of data and/or a slow connection wb takes some time to complete the task, so, sometimes you have to be patience.
Thanks.
[11 Jun 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".