Bug #72249 Query execution (SELECT) cause application crash
Submitted: 5 Apr 2014 15:08 Modified: 3 Jun 2014 20:38
Reporter: Adriel Menezes Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:6.1.4 OS:Any
Assigned to: CPU Architecture:Any
Tags: command, crash, Execution, SQL

[5 Apr 2014 15:08] Adriel Menezes
Description:
Executing SELECT query on a remote host (version 5.6.17, Windows Server 2012 R2), the application crashes. 
Occurs in Windows 8.1 x64 and Mac OS 10.8.5. The version 6.0.9 works without any issue in both platforms. With and without SSL the issue occur.

On host machine works without any issue.

Below the stack trace of thread crashed on Mac OS:

Thread 18 Crashed:
0   libsystem_kernel.dylib        	0x92cb6a6a __pthread_kill + 10
1   libsystem_c.dylib             	0x95f7db2f pthread_kill + 101
2   libsystem_c.dylib             	0x95fb4631 abort + 168
3   libsystem_c.dylib             	0x95f96e03 free + 428
4   libmysqlclient.18.dylib       	0x04c60f9a void yaSSL::ysDelete<yaSSL::input_buffer>(yaSSL::input_buffer*) + 22
5   libmysqlclient.18.dylib       	0x04c6ed17 yaSSL::Buffers::~Buffers() + 83
6   libmysqlclient.18.dylib       	0x04c63bd5 yaSSL::SSL::~SSL() + 59
7   libmysqlclient.18.dylib       	0x04c63c6d void yaSSL::ysDelete<yaSSL::SSL>(yaSSL::SSL*) + 22
8   libmysqlclient.18.dylib       	0x04c3f5d1 vio_ssl_delete + 49
9   libmysqlclient.18.dylib       	0x04c1cd27 end_server + 47
10  libmysqlclient.18.dylib       	0x04c1ce16 cli_safe_read + 56
11  libmysqlclient.18.dylib       	0x04c20ce9 cli_advanced_command + 426
12  libmysqlclient.18.dylib       	0x04c167d7 mysql_ping + 77
13  libmysqlcppconn.7.1.1.3.dylib 	0x04b7d76d sql::mysql::NativeAPI::LibmysqlStaticProxy::ping(st_mysql*) + 17
14  libmysqlcppconn.7.1.1.3.dylib 	0x04b7eb0b sql::mysql::NativeAPI::MySQL_NativeConnectionWrapper::ping() + 37
15  libmysqlcppconn.7.1.1.3.dylib 	0x04b4b9b0 sql::mysql::MySQL_Connection::isClosed() + 42
16  libwbprivate.be.dylib         	0x010a8cf0 SqlEditorForm::ensure_valid_dbc_connection(boost::shared_ptr<sql::Dbc_connection_handler>&, base::RecMutex&) + 122
17  libwbprivate.be.dylib         	0x0109c672 SqlEditorForm::get_autocompletion_connection(boost::shared_ptr<sql::Dbc_connection_handler>&) + 46
18  libwbprivate.be.dylib         	0x010d2bc0 base::RecMutexLock boost::_bi::bind_t<base::RecMutexLock, boost::_mfi::mf1<base::RecMutexLock, SqlEditorForm, boost::shared_ptr<sql::Dbc_connection_handler>&>, boost::_bi::list2<boost::_bi::value<SqlEditorForm*>, boost::arg<1> > >::operator()<boost::shared_ptr<sql::Dbc_connection_handler> >(boost::shared_ptr<sql::Dbc_connection_handler>&) + 48
19  libwbprivate.be.dylib         	0x010d2b89 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<base::RecMutexLock, boost::_mfi::mf1<base::RecMutexLock, SqlEditorForm, boost::shared_ptr<sql::Dbc_connection_handler>&>, boost::_bi::list2<boost::_bi::value<SqlEditorForm*>, boost::arg<1> > >, base::RecMutexLock, boost::shared_ptr<sql::Dbc_connection_handler>&>::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<sql::Dbc_connection_handler>&) + 31
20  libwbpublic.be.dylib          	0x0091358d boost::function1<base::RecMutexLock, boost::shared_ptr<sql::Dbc_connection_handler>&>::operator()(boost::shared_ptr<sql::Dbc_connection_handler>&) const + 43
21  libwbpublic.be.dylib          	0x00911279 AutoCompleteCache::refresh_columns_w(std::string const&, std::string const&) + 87
22  libwbpublic.be.dylib          	0x0090f85a AutoCompleteCache::refresh_cache_thread() + 300
23  libwbpublic.be.dylib          	0x009116c1 AutoCompleteCache::_refresh_cache_thread(void*) + 17
24  libglib-2.0.0.dylib           	0x0012f4f5 g_thread_proxy + 161
25  libsystem_c.dylib             	0x95f7c5b7 _pthread_start + 344
26  libsystem_c.dylib             	0x95f66dce thread_start + 34

How to repeat:
Executing any SELECT on query editor.
[13 May 2014 15:35] Rahman Syed
I'm also impacted by this error, on Mac OS X 10.9.2 with MySQL Workbench 6.1.4.

Application Specific Information:
abort() called
*** error for object 0x7d02000: pointer being freed was not allocated

...

Thread 25 Crashed:
0   libsystem_kernel.dylib        	0x96dda952 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x9320d167 pthread_kill + 101
2   libsystem_c.dylib             	0x9152729c abort + 155
3   libsystem_malloc.dylib        	0x90e2fdab free + 419
4   libmysqlclient.18.dylib       	0x04a87f9a void yaSSL::ysDelete<yaSSL::input_buffer>(yaSSL::input_buffer*) + 22
5   libmysqlclient.18.dylib       	0x04a95d17 yaSSL::Buffers::~Buffers() + 83
6   libmysqlclient.18.dylib       	0x04a8abd5 yaSSL::SSL::~SSL() + 59
7   libmysqlclient.18.dylib       	0x04a8ac6d void yaSSL::ysDelete<yaSSL::SSL>(yaSSL::SSL*) + 22
8   libmysqlclient.18.dylib       	0x04a665d1 vio_ssl_delete + 49
9   libmysqlclient.18.dylib       	0x04a43d27 end_server + 47
10  libmysqlclient.18.dylib       	0x04a43e16 cli_safe_read + 56
11  libmysqlclient.18.dylib       	0x04a45be8 cli_read_query_result + 26
12  libmysqlclient.18.dylib       	0x04a4547c mysql_real_query + 96
13  libmysqlcppconn.7.1.1.3.dylib 	0x049a4805 sql::mysql::NativeAPI::LibmysqlStaticProxy::real_query(st_mysql*, char const*, unsigned long) + 31
14  libmysqlcppconn.7.1.1.3.dylib 	0x049a5ab5 sql::mysql::NativeAPI::MySQL_NativeConnectionWrapper::query(sql::SQLString const&) + 55
15  libmysqlcppconn.7.1.1.3.dylib 	0x049a09e8 sql::mysql::MySQL_Statement::do_query(sql::SQLString const&) + 52
16  libmysqlcppconn.7.1.1.3.dylib 	0x049a0ead sql::mysql::MySQL_Statement::executeQuery(sql::SQLString const&) + 49
17  libwbpublic.be.dylib          	0x00911315 AutoCompleteCache::refresh_columns_w(std::string const&, std::string const&) + 243
18  libwbpublic.be.dylib          	0x0090f85a AutoCompleteCache::refresh_cache_thread() + 300
19  libwbpublic.be.dylib          	0x009116c1 AutoCompleteCache::_refresh_cache_thread(void*) + 17
20  libglib-2.0.0.dylib           	0x0012f4f5 g_thread_proxy + 161
21  libsystem_pthread.dylib       	0x9320c5fb _pthread_body + 144
22  libsystem_pthread.dylib       	0x9320c485 _pthread_start + 130
23  libsystem_pthread.dylib       	0x93211cf2 thread_start + 34
[15 May 2014 23:15] Alfredo Kojima
The pasted stack seems to be from SSL. Can you paste a stack from when it crashes *without* SSL?
[19 May 2014 17:04] Rahman Syed
The issue is intermittent for me; next time I experience a crash in our environment which is not SSL-enabled, I'll capture the content.

Anecdotally, the issue seems to appear more frequently when connecting to SSL-enabled MySQL servers.
[27 May 2014 17:41] Rahman Syed
I've upgraded to MySQL Workbench 6.1.6 and this crash still occurs.  Again it's intermittent; several queries succeed in a given session before all subsequent queries result in a crash (even after re-opening MySQL Workbench, no queries can be issued to the same MySQL server).

Sorry, I don't yet have a stacktrace for a crash when a MySQL server without SSL is being used.
[2 Jun 2014 18:54] Sicco Naets
I get this error almost continuously - it's basically making MySQL Workbench for Mac unusable. Specific version is 6.1.4.11773 build 1454, running against MySQL 5.5.13
[2 Jun 2014 19:33] Adriel Menezes
Below the stacktrace with the 6.1.6 version and no without SSL

0   libsystem_kernel.dylib        	0x918eea6a __pthread_kill + 10
1   libsystem_c.dylib             	0x92b83b2f pthread_kill + 101
2   libsystem_c.dylib             	0x92bba631 abort + 168
3   libsystem_c.dylib             	0x92b9ce03 free + 428
4   libmysqlclient.18.dylib       	0x04c2f94a net_end + 21
5   libmysqlclient.18.dylib       	0x04c274c9 end_server + 201
6   libmysqlclient.18.dylib       	0x04c2751e cli_safe_read + 56
7   libmysqlclient.18.dylib       	0x04c27a3b cli_read_rows + 546
8   libmysqlclient.18.dylib       	0x04c2948e cli_read_query_result + 440
9   libmysqlclient.18.dylib       	0x04c28b84 mysql_real_query + 96
10  libmysqlcppconn.7.1.1.3.dylib 	0x04b88805 sql::mysql::NativeAPI::LibmysqlStaticProxy::real_query(st_mysql*, char const*, unsigned long) + 31
11  libmysqlcppconn.7.1.1.3.dylib 	0x04b89ab5 sql::mysql::NativeAPI::MySQL_NativeConnectionWrapper::query(sql::SQLString const&) + 55
12  libmysqlcppconn.7.1.1.3.dylib 	0x04b849e8 sql::mysql::MySQL_Statement::do_query(sql::SQLString const&) + 52
13  libmysqlcppconn.7.1.1.3.dylib 	0x04b84ead sql::mysql::MySQL_Statement::executeQuery(sql::SQLString const&) + 49
14  libwbpublic.be.dylib          	0x00912165 AutoCompleteCache::refresh_columns_w(std::string const&, std::string const&) + 243
15  libwbpublic.be.dylib          	0x009106aa AutoCompleteCache::refresh_cache_thread() + 300
16  libwbpublic.be.dylib          	0x00912519 AutoCompleteCache::_refresh_cache_thread(void*) + 25
17  libglib-2.0.0.dylib           	0x0012f4f5 g_thread_proxy + 161
18  libsystem_c.dylib             	0x92b825b7 _pthread_start + 344
19  libsystem_c.dylib             	0x92b6cdce thread_start + 34
[2 Jun 2014 19:37] Adriel Menezes
The full description of the crash

Attachment: full crash report.txt (text/plain), 71.23 KiB.

[3 Jun 2014 20:38] Alfredo Kojima
Duplicate of bug #72486