Bug #30198 Auth with old_password -> Segmentation fault
Submitted: 2 Aug 2007 7:05 Modified: 7 Aug 2007 12:59
Reporter: Christopher Hubrich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Scripts Severity:S3 (Non-critical)
Version:0.6.0 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any
Tags: old_password

[2 Aug 2007 7:05] Christopher Hubrich
Description:
Hi,

ive got a "Segmentation fault" if i try your r/w splitting lua script.

[connect_server]
[1].connected_clients = 0
[1].idling_connections = 0
[1].type = 1
[1].state = 0
[1] open new connection
Segmentation fault

Start params:
/mysql-proxy --no-daemon --proxy-lua-script=/1/tutorial-keepalive.lua --proxy-address=192.168.210.1:3306 --proxy-backend-addresses=192.168.210.15:3306 --proxy-read-only-backend-addresses=192.168.208.12:3306

Its the last lua script from the repository.

Env:
MySQL - 5.0.27-max-log

Debug:
==12471== Memcheck, a memory error detector.
==12471== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==12471== Using LibVEX rev 1732, a library for dynamic binary translation.
==12471== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==12471== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==12471== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==12471== For more details, rerun with: -v
==12471==
[1].connected_clients = 0
[1].idling_connections = 0
[1].type = 1
[1].state = 0
[1] open new connection
==12471== Invalid read of size 8
==12471== at 0x403A30: plugin_call (network-mysqld.c:743)
==12471== by 0x404D68: network_mysqld_con_handle (network-mysqld.c:1097)
==12471== by 0x4E2ADF4: event_base_loop (in /usr/lib64/libevent-1.1.so.1.0.2)
==12471== by 0x4054A5: network_mysqld_thread (network-mysqld.c:1478)
==12471== by 0x40325B: main (mysql-proxy.c:380)
==12471== Address 0x138 is not stack'd, malloc'd or (recently) free'd
==12471==
==12471== Process terminating with default action of signal 11 (SIGSEGV)
==12471== Access not within mapped region at address 0x138
==12471== at 0x403A30: plugin_call (network-mysqld.c:743)
==12471== by 0x404D68: network_mysqld_con_handle (network-mysqld.c:1097)
==12471== by 0x4E2ADF4: event_base_loop (in /usr/lib64/libevent-1.1.so.1.0.2)
==12471== by 0x4054A5: network_mysqld_thread (network-mysqld.c:1478)
==12471== by 0x40325B: main (mysql-proxy.c:380)
==12471==
==12471== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1)
==12471== malloc/free: in use at exit: 92,918 bytes in 706 blocks.
==12471== malloc/free: 961 allocs, 255 frees, 181,863 bytes allocated.
==12471== For counts of detected errors, rerun with: -v
==12471== searching for pointers to 706 not-freed blocks.
==12471== checked 228,576 bytes.
==12471==
==12471== LEAK SUMMARY:
==12471== definitely lost: 0 bytes in 0 blocks.
==12471== possibly lost: 0 bytes in 0 blocks.
==12471== still reachable: 92,918 bytes in 706 blocks.
==12471== suppressed: 0 bytes in 0 blocks.
==12471== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault 

How to repeat:
Use the old password generation on the mysql server.
[2 Aug 2007 8:26] Sveta Smirnova
Thank you for the report.

Verified as described.
[7 Aug 2007 12:58] Jan Kneschke
fixed in revision [146].