Bug #42128 MySQL-Proxy crashed.
Submitted: 15 Jan 2009 9:22 Modified: 15 Jan 2009 10:23
Reporter: Matthias Schulz Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Proxy: Core Severity:S1 (Critical)
Version:0.6.1 OS:Solaris (Solaris 10 (SPARC 64 bit))
Assigned to: CPU Architecture:Any
Tags: crash, mysql proxy, network-mysqld-proto.c

[15 Jan 2009 9:22] Matthias Schulz
Description:
Hi all.

I think i hit a bug.

MySQL-Server:
Server-Version: 5.0.74-enterprise-gpl-log
OS: SunOS myserver 5.10 Generic_137137-09 sun4v sparc SUNW,SPARC-Enterprise-T2000

MySQL-Client:
Client-Version: /usr/sfw/bin/mysql  Ver 12.22 Distrib 4.0.31, for sun-solaris2.10 (sparc)
OS: SunOS myclient 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire-280R

Starting the proxy:
/usr/local/mysql/proxy/current/sbin/mysql-proxy --proxy-address=10.0.0.1:3306 --admin-address=127.0.0.1:3306 --pid-file=/var/run/mysql-proxy-test.pid --proxy-backend-addresses=192.168.0.101:3306

Try to connect:
mysql -h myserver.localnet -P 3306 -u root -p
Enter password: 
ERROR 2013: Lost connection to MySQL server during query

The Proxy failed with the following error:
file network-mysqld-proto.c: line 191: assertion failed: (*_off + size <= packet->len)
Abort

How to repeat:
Do the same thing again.

Suggested fix:
-
[15 Jan 2009 9:55] Sveta Smirnova
Thank you for the report.

Do you run MySQL server with option old-passwords?
[15 Jan 2009 9:58] Sveta Smirnova
Also:

> Client-Version: /usr/sfw/bin/mysql  Ver 12.22 Distrib 4.0.31

This looks like you use old client. MySQL Proxy would not work with client from 4.0 distribution. Please upgrade client. See also bug #31419 and http://dev.mysql.com/doc/refman/5.1/en/mysql-proxy-platforms.html
[15 Jan 2009 10:11] Matthias Schulz
> Do you run MySQL server with option old-passwords?
Yes and No. 1 Instance run with the option old.passwords, the rest doesn't. No difference if the options is set.

> This looks like you use old client. MySQL Proxy would not work with client from 4.0 distribution. Please upgrade client.
I would like to do so but I can't do it. ;) 
This Proxy is reachable from more then 500 hosts (university-network). It is ok, if a old client cannot connect but the proxy should not crash if a old client connect them.
[15 Jan 2009 10:23] Sveta Smirnova
Thank you for the feedback.

I agree Proxy should now crash. But this is same thing bug #31419 is about. So I mark this report as duplicate of bug #31419.
[15 Jan 2009 16:03] Diego Medina
Matthias,

We have recently published an updated proxy code, which fixes this particular bug as well. You can find it at Launchpad.

https://launchpad.net/mysql-proxy/+announcement/1798

See http://forge.mysql.com/wiki/MySQL_Proxy_Compiling  for compiling help.