Bug #18251 "Lost connection to server" when connecting to remote mysqld
Submitted: 15 Mar 2006 10:35 Modified: 22 May 2006 16:05
Reporter: Björn Kahle Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.18 OS:Linux (Linux Suse 9.2)
Assigned to: CPU Architecture:Any

[15 Mar 2006 10:35] Björn Kahle
Description:
Hello,

I am trying to connect to the mysqld server on my colleague's computer by typing:

mysql -h 10.0.0.1 -u user -p db1

...receiving the following:

ERROR 2013 (HY000): Lost connection to MySQL server during query

Connections on the remove server itself are possible. "mysql -h localhost ..." Both systems have mysql 5.0.18 installed.

I followed the instructions at http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html and the dump is:

0x80ced92
0x825db40
0xb764ee66
0xb763e21f
0xb763e2dd
0xb770af9a
0xb770c0b7
0x828f719
0x828f480
0x80d5294
0x80ee9a1
0x82585e7
0x828d0da 

Resolved:

0x80ced92 _Z8key_copyPcS_P6st_keyj + 530
0x825db40 handle_options + 912
0xb764ee66 __stop___libc_freeres_ptrs + -1356716574
0xb763e21f __stop___libc_freeres_ptrs + -1356785253
0xb763e2dd __stop___libc_freeres_ptrs + -1356785063
0xb770af9a __stop___libc_freeres_ptrs + -1355946218
0xb770c0b7 __stop___libc_freeres_ptrs + -1355941837
0x828f719 __init_des_r + 313
0x828f480 _ufc_dofinalperm_r + 496
0x80d5294 _ZNK13key_part_speceqERKS_ + 20
0x80ee9a1 _GLOBAL__I_bool_type_names + 15073
0x82585e7 qsort2 + 1671
0x828d0da _pthread_cleanup_pop + 58

With kind regards,
Bjoern Kahle

How to repeat:
Try to connect to a remove machine using the commands above.
[15 Mar 2006 11:03] Valeriy Kravchuk
Thank you for a problem report. Please, try to:

telnet 10.0.0.1 3306

and send the results you got.

Please, send also the my.cnf file content and the last part of the error log, having that stack trace inside.
[15 Mar 2006 11:17] Björn Kahle
Hello,

when I try to connect with telnet the result is returned after a few seconds, not immendiatelly - maybe this information helps you.

===================================================================
Telnet:
===================================================================

Trying 10.0.0.1...
Connected to 10.0.0.1.
Escape character is '^]'.
4
5.0.18d3q_hka(,>?aM?1ty#>OSConnection closed by foreign host.

===================================================================
my.cnf
===================================================================

[client]
port            = 3306
socket          = /var/mysql5/mysql.sock

[mysqld]
port            = 3306
socket          = /var/mysql5/mysql.sock
skip-locking
key_buffer = 8M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
default-character-set = latin1
default-collation = latin1_german1_ci
server-id       = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

===================================================================
Last part of error log
===================================================================

....
Number of processes running now: 1
060315 11:33:07  mysqld restarted
060315 11:33:07 [Note] /usr/local/mysql-5.0.18/libexec/mysqld: ready for connections.
Version: '5.0.18'  socket: '/var/mysql5/mysql.sock'  port: 3306  Source distribution
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8388608
read_buffer_size=258048
max_used_connections=1
max_connections=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 84591 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x843a2c0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbf5ff478, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80ced92
0x825db40
0xb758ae66
0xb757a21f
0xb757a2dd
0xb7646f9a
0xb76480b7
0x828f719
0x828f480
0x80d5294
0x80ee9a1
0x82585e7
0x828d0da
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do 
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at (nil)  is invalid pointer
thd->thread_id=2
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
060315 12:12:06  mysqld restarted
060315 12:12:06 [Note] /usr/local/mysql-5.0.18/libexec/mysqld: ready for connections.
Version: '5.0.18'  socket: '/var/mysql5/mysql.sock'  port: 3306  Source distribution

Best regards,
Bjoern Kahle
[22 Apr 2006 16:05] Valeriy Kravchuk
Sorry for a long delay with this report. I do not know how to repeat the behaviour you described. Please, try to install newer version of MySQL, 5.0.20a (our binaries, please), and connect to to it remotely. Inform about the results.
[22 May 2006 23: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".