Bug #41991 COM_REFRESH is not supported by mysql-proxy, causes abort()
Submitted: 9 Jan 2009 8:38 Modified: 22 May 2009 13:44
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S1 (Critical)
Version:0.6.1, 0.7.0r1073. 2.0.2.7128 OS:Any
Assigned to: MC Brown CPU Architecture:Any
Tags: COM_REFRESH

[9 Jan 2009 8:38] Shane Bester
Description:
[sbester@box1 sbin]$  ./mysql-proxy --proxy-backend-addresses=192.168.250.3:3306
network-mysqld-proxy.c.3524: COM_(0x07) is not handled
Aborted (core dumped)

(gdb) bt
0x00b1b402 in ?? ()
0x00cbaf30 in raise () from /lib/i686/nosegneg/libc.so.6
0x00cbc811 in abort () from /lib/i686/nosegneg/libc.so.6
0x08061efc in IA__g_logv at gmessages.c:497
0x08061f66 in IA__g_log  at gmessages.c:517
0x08054645 in proxy_read_query_result  at network-mysqld-proxy.c:3522
0x0804c5f4 in plugin_call  at network-mysqld.c:977
0x0804d45a in network_mysqld_con_handle at network-mysqld.c:1520
0x08057cb9 in event_process_active (base=0x978b260) at event.c:331
0x08057e64 in event_base_loop (base=0x978b260, flags=0) at event.c:449
0x08057d1c in event_base_dispatch (event_base=0x978b260) at event.c:351
0x0804d9d0 in network_mysqld_thread (_srv=0x9789008) at network-mysqld.c:1768
0x0804b84a in main (argc=1, argv=0xbfc4fe84) at mysql-proxy.c:615

How to repeat:
./mysql-proxy --proxy-backend-addresses=192.168.250.3:3306

mysqladmin -uroot refresh -P4040

Suggested fix:
implement COM_REFRESH
[9 Jan 2009 8:52] Valeriy Kravchuk
Verified with mysql-proxy 0.7.0 (from MEM) on Windows.
[16 Jan 2009 20:06] Mark Matthews
Maybe we should consider just being opaque about COM_* we don't understand? We're not building a "firewall" for mysqld....
[29 Apr 2009 19:08] Mark Leith
Increasing priority - proxy should not crash.
[13 May 2009 12:07] Jan Kneschke
Pushed to lp:mysql-proxy should be in 0.7.1

------------------------------------------------------------
revno: 656
committer: jan@mysql.com
branch nick: trunk
timestamp: Wed 2009-05-13 14:06:18 +0200
message:
  fixed connection close on COM_REFRESH as the packet type was unknown (fixes #41991)
------------------------------------------------------------
revno: 655
committer: jan@mysql.com
branch nick: trunk
timestamp: Wed 2009-05-13 14:01:01 +0200
message:
  added a (failing) test to reproduce #41991
[14 May 2009 2:27] Keith Russell
Patch installed in versions => 2.1.0.1039.
[18 May 2009 14:04] Diego Medina
* Verified fixed on Agent 2.1.0.1042
* Verified fixed on mysql proxy from launchpad rev. 656 (May 13, 2009 )
[22 May 2009 13:44] Tony Bedford
An entry has been added to the 2.1.0 changelog:

OM_REFRESH was not supported by MySQL Proxy, it caused an abort().

shell>  ./mysql-proxy --proxy-backend-addresses=192.168.250.3:3306
network-mysqld-proxy.c.3524: COM_(0x07) is not handled
Aborted (core dumped)

(gdb) bt
0x00b1b402 in ?? ()
0x00cbaf30 in raise () from /lib/i686/nosegneg/libc.so.6
0x00cbc811 in abort () from /lib/i686/nosegneg/libc.so.6
0x08061efc in IA__g_logv at gmessages.c:497
0x08061f66 in IA__g_log  at gmessages.c:517
0x08054645 in proxy_read_query_result  at network-mysqld-proxy.c:3522
0x0804c5f4 in plugin_call  at network-mysqld.c:977
0x0804d45a in network_mysqld_con_handle at network-mysqld.c:1520
0x08057cb9 in event_process_active (base=0x978b260) at event.c:331
0x08057e64 in event_base_loop (base=0x978b260, flags=0) at event.c:449
0x08057d1c in event_base_dispatch (event_base=0x978b260) at event.c:351
0x0804d9d0 in network_mysqld_thread (_srv=0x9789008) at network-mysqld.c:1768
0x0804b84a in main (argc=1, argv=0xbfc4fe84) at mysql-proxy.c:615