Bug #70332 Crash when failing to establish a database connection via SSH
Submitted: 13 Sep 2013 12:54 Modified: 15 Jan 2014 19:39
Reporter: Craig Fowler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:6.0.7.11215 OS:Linux (Debian Wheezy (stable))
Assigned to: CPU Architecture:Any
Tags: crash

[13 Sep 2013 12:54] Craig Fowler
Description:
There is a crash bug present when attempting to connect to a MySQL server using a TCP/IP-via-SSH connection type.  This crash appears to occur only when the SSH connection is successful but then the connection to the actual database server via the SSH tunnel fails.

I have opened this as a new issue but it MIGHT be a dupe of any or all of these issues (and this extra info about how to reproduce the issue might allow all of them to be solved if it does turn out to be a true dupe!):

* #61995
* #69572
* #70192

How to repeat:
There is more than one way to reproduce this crash.  These are all of the scenarios that I have tried, they all lead to the same results.

Sometimes Workbench crashes immediately, sometimes the crash is 'deferred' until the next time that the user interacts with the 'Available server connections' user interface (such as clicking on the same or a different connection).  The backtrace seems to be the same though, regardless of whether it is an immediate crash or a deferred one.

---

1) Open Workbench and create a new TCP/IP-via-SSH connection to a server:
   * The SSH host and SSH connection details must be valid and correct
   * For the MySQL server details however, enter a fictitious server hostname & username combination

2) Save this connection and attempt to connect
   * You will be presented with a 'cannot connect to MySQL server' dialog.  Upon closing this dialog Workbench crashes.

---

1) Open Workbench and create a new TCP/IP-via-SSH connection to a server:
   * The SSH host and SSH connection details must be valid and correct
   * Enter valid/correct MySQL connection details
   * As a variant on this scenario, the crash is also reproducible if you enter a real MySQL server hostname but fictitious username

2) Save this connection and attempt to connect

3) You will be presented with a password dialog; enter an incorrect password and choose "OK" or press Enter
   * Workbench crashes.

---

1) Open Workbench and create a new TCP/IP-via-SSH connection to a server:
   * The SSH host and SSH connection details must be valid and correct
   * Enter valid/correct MySQL connection details

2) Save this connection and attempt to connect

3) You will be presented with a password dialog; press cancel to abort the connection attempt.
   * Workbench crashes.
[13 Sep 2013 12:56] Craig Fowler
Backtrace from this crash

Attachment: backtrace.txt (text/plain), 65.10 KiB.

[13 Sep 2013 15:32] MySQL Verification Team
This bug was already reported and closed as fixed however still is repeatable on current release i.e. MacBook Pro too:

Process:         MySQLWorkbench [911]
Path:            /Applications/MySQLWorkbench.app/Contents/MacOS/MySQLWorkbench
Identifier:      com.oracle.mysql.workbench
Version:         6.0.7 (1)
Code Type:       X86 (Native)
Parent Process:  launchd [710]
User ID:         501

Date/Time:       2013-09-13 12:26:12.642 -0300
OS Version:      Mac OS X 10.8.4 (12E55)
Report Version:  10

Interval Since Last Report:          3778851 sec
Crashes Since Last Report:           26
Per-App Interval Since Last Report:  42229 sec
Per-App Crashes Since Last Report:   5
Anonymous UUID:                      2A5B59E8-F98A-1451-49F8-DEC433009E11

Crashed Thread:  11

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000000000000c

VM Regions Near 0xc:
--> __PAGEZERO             0000000000000000-0000000000001000 [    4K] ---/--- 

<CUT>
[16 Sep 2013 14:40] MySQL Verification Team
http://bugs.mysql.com/bug.php?id=69572 marked as duplicate of this one.
[16 Sep 2013 14:51] Craig Fowler
I just remembered something which may or may not also be relevant.  For all of these SSH connections (just the SSH part of the connection), I am using key-based auth and not password auth.
[15 Oct 2013 12:46] MySQL Verification Team
http://bugs.mysql.com/bug.php?id=70620 duplicate of this one.
[15 Jan 2014 19:39] Philip Olson
Fixed as of the upcoming Workbench 6.0.9 release, and here is the changelog entry:

MySQL Workbench could crash when using a MySQL connection that connects via an
SSH tunnel with success, but is defined using incorrect MySQL server
credentials. A dialog now requests the correct information.

Thank you for the bug report.