Unicorn_rails ignores USR2 signal

Eric Wong normalperson at yhbt.net
Fri Mar 9 22:24:12 UTC 2012


"Yeung, Jeffrey" <Jeffrey.Yeung at polycom.com> wrote:
>  $ ruby -v
>  ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]
> 
> The Rails gem version is 2.3.14.  Unicorn gem version 4.2.0.

> I have done my best to debug it using strace and the stderr logs.  The
> unicorn_rails master process handles HUP, QUIT, and USR1 signals as
> expected, no problems.  However, the USR2 signal is being completely
> ignored.

> While monitoring the master with strace, there are no calls observed
> when sending a kill -USR2.  Nothing is logged to STDERR when sending
> this signal, either.

Really strange, especially since other signals seem to work...

Since you're on Ruby (>= 1.9.0 && < 1.9.3), are you stracing with -f?

If you're not already, try using: strace -f -e '!futex'

1.9.x versions use a dedicated timer thread to accept signals, so you
won't see system signal handlers in the VM without "strace -f".
The "-e '!futex'" filters out the noise from the polling wakeup in
<1.9.3 versions of Ruby.

Can you try Ruby 1.9.3?  The signal handling got completely reworked
(for the better) and you won't need "-e '!futex'"


More information about the mongrel-unicorn mailing list