Any signal other than -9 causes full CPU utilization by master unicorn process on FreeBSD
Mark.Mccraw at sas.com
Tue Jul 17 21:23:22 UTC 2012
On Jul 17, 2012, at 7:56 AM, Mark McCraw wrote:
> On Jul 16, 2012, at 10:05 PM, Eric Wong wrote:
>> Mark Mccraw <Mark.Mccraw at sas.com> wrote:
>>> Hi There!
>>> I'm having a devil of a time figuring out a weird issue I'm running
>>> into. I have unicorn configured to start 4 worker processes, and that
>>> works great. However, when it's time to cycle the app, everything
>>> goes haywire. By trial and error, I have narrowed it down to this:
>>> sending any signal to the master process other than SIGKILL fails
>>> miserably. No new master process is created, as described in the
>>> documentation, nothing happens to the existing workers, nothing gets
>>> written to any log, and if I run top -u, I can see that very quickly
>>> the master ramps up to 100% CPU utilization. This happens if I run
>>> 'kill -HUP <master pid>', 'kill -USR2 <master pid>', even 'kill -QUIT
>>> <master pid>'.
>> This sounds like a Ruby/FreeBSD bug we've seen before. My script
>> in http://mid.gmane.org/20120201181445.GA31624@dcvr.yhbt.net should
>> reproduce the issue w/o unicorn.
> You are absolutely correct! Your script replicates the problem perfectly.
>>> ruby 1.9.3p0 (2011-10-30 revision 33570) [amd64-freebsd9]
>> I think this is a Ruby bug that was fixed in 1.9.3-p30 according to
>> Since 1.9.3 p194 is the latest, can you try that out and confirm the
>> fix? I don't remember the other bug reported confirmed this issue was
>> fixed by upgrading Ruby.
> We're upgrading now to see what happens. I'm so glad you knew about this.
> There's no telling how long it would have taken me to question the ruby interpreter implementation, and
> since it's FreeBSD, I never would have found it by googling.
> Thanks for hours (days?) of my life back.
Just to follow up and close out the thread - Eric's recollection was spot on.
We upgraded ruby on our FreeBSD server to the latest thing, and the problem completely disappeared. Thanks again!
More information about the mongrel-unicorn