Bug #71358 mutex required fot network-connection-pool object.
Submitted: 13 Jan 2014 1:27 Modified: 12 Apr 2014 10:51
Reporter: Fangxin Flou (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:0.8.4 OS:Any
Assigned to: CPU Architecture:Any
Tags: mysql proxy

[13 Jan 2014 1:27] Fangxin Flou
Without mutex, mysql-proxy will abort under high concurrency with proxy lua specified, for example: ro-pooling.lua, rw-splitting.lua it reported plugin call failed.

How to repeat:

Suggested fix:
Please check the attachment.

Maybe we could introduce two level of mutex.

one for the total connection pool, and each GQueue has it's own mutex.
[13 Jan 2014 10:27] Mark Leith
Verifying based on inspection and discussion with Proxy developers.

Fangxin, could you please sign the OCA, so that we can consider taking your patch? Please see the following for more details:


Do you have a test case that can be used to trigger this condition as well? That would also be appreciated.

Thanks for reporting the issue, and supplying a patch along with it.
[14 Jan 2014 7:12] Fangxin Flou

I have sign one for MySQL. Do I need to sign another one for Proxy only ?

[14 Jan 2014 11:39] Fangxin Flou

The problem is due to I use multple lua_state objects (each event_thread assign a dedicate lua_State object) for performance tuning, and then testing it with the default ro_pooling.lua or rw_splitting.lua script.

After this fix, it run fine.

[12 Apr 2014 10:51] Fangxin Flou
I made a lot of changes to mysql proxy to make it work better, just ignore this patch, it's useless.