Bug #43595 signals are being masked/lost/forgotten when using event threads

Submitted: 12 Mar 2009 13:15 Modified: 19 Mar 2009 18:43
Reporter: Nick Loeve (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:0.8 OS:Any
Assigned to: CPU Architecture:Any

[12 Mar 2009 13:15] Nick Loeve
Description:
It takes a few times before a signal (SIGINT or SIGTERM) sent to the proxy is caught and acted upon.

Sometimes you may be lucky and it is caught first go. 

How to repeat:
Start the 0.8 version of proxy and send it a SIGINT.

Suggested fix:
In my branch on lp, I just stopped using libevent for signal handling and SIGINT and SIGTERM are caught reliably.
[17 Mar 2009 10:50] Sveta Smirnova
Thank you for the report.

Where did you download version 0.8?
[17 Mar 2009 11:33] Nick Loeve
I am developing a plugin based on the 0.8 branch at launchpad: https://code.launchpad.net/~jan-kneschke/mysql-proxy/threaded-io
[17 Mar 2009 20:52] Sveta Smirnova
Thank you for the feedback.

Which revision do you use? I ask, because this branch shows 0.7.0 for me:

$bzr info
Checkout (format: rich-root-pack)
Location:
       checkout root: .
  checkout of branch: http://bazaar.launchpad.net/%7Ejan-kneschke/mysql-proxy/threaded-io/

$./src/mysql-proxy --version
mysql-proxy 0.7.0
  glib2: 2.16.3
  libevent: 1.4.8-stable

$bzr up
Tree is up to date at revision 640.

Also, please, indicate, if you start Proxy with some options and/or there is workload on Proxy when you call kill -SIGINT: I can stop Proxy successfully from the first try.
[18 Mar 2009 8:08] Nick Loeve
Hmm, I was running the proxy under load with the event-threads option set to 4.

It seems that now I cannot reproduce with that branch (which although it says 0.7.0, is the start of the 0.8 series according to launchpad), where as the other day I could. Sorry for the time waster, Ill close this now.
[19 Mar 2009 13:39] Nick Loeve
I found the issue:

I was able to reproduce again. The difference is on the machine where I noticed we were using libevent-1.4.7, and locally I am using libevent-1.4.9.

Using the latest libevent the issue disappears. I re-opened because this will affect the minimal version a dependency. Feel free to close this bug if it is not necessary.
[19 Mar 2009 18:43] Sveta Smirnova
Thank you for the feedback.

Closed as "Can't repeat".

Minimum version of libevent required should be documented somewhere though.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.