[PATCH] `kill -SIGTRAP <worker pid>`

Cedric Maion cedric at maion.com
Sun Jun 24 11:05:53 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> Please keep Subject lines a reasonable length (git recommends the commit
> message subject wrap at ~50 columns or so) and wrap code at <= 80
> columns
ok
> SIGKILL timeout is only a last line of defense when the Ruby VM itself
> is completely broken. Handling SIGTRAP implies the worker can still
> respond (and /can/ be rescued), so your SIGTRAP handler is worthless if
> SIGKILL is required to kill a process.
Sure. But if the VM is responding, being able to get a backtrace is nice.
And if it's stuck, you won't get anything indeed, but that's still an
information (in that case, one may eventually want to get a gdb
backtrace too). No?
> See http://unicorn.bogomips.org/Application_Timeouts.html
Yes, I'm well aware of this. However, when you still get rare unicorn
timeouts, debugging them is not obvious.
In my case, a server in a loadbalanced farm sometimes sees all it's
unicorn workers timeout in the same minute (approx once a day at what
seems a random time) -- other servers are fine. Couldn't correlate this
with any specific network/disk/misc system/user activity yet.

> Sleeping here is also unacceptable since it blocks the main loop,
> making masters signal handlers non-responsive for too long.
ok.
>
> Using the Logger class inside a signal handler can deadlock. Logger
> attempts to acquire a non-reentrant lock when called. Unicorn doesn't
> use threads itself, but the Rack app may use threads internally.
ok, can be replaced with a $stdout.write then.
> Thanks for your interest in unicorn!

Thanks for your feedback,
Kind regards,

    Cedric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP5vSRAAoJEA15MS+4e3PCyekH/2ffXVT5UrXt0t7iou6cH9kt
q2mDMIbotRZp2iB21K0H1QtPTgrU6h4TrfEyiz3bfgtMLDCbAcXQal6x78sjNqPh
lIzs78TKgjkzh5SfqwIAyVVXuuU5AtGJleQeG2opHTgrZUxDRSOpJGxq2sYZU/rC
OiCybOiYyh8nFudbg0v7BBTrYyCA/uWOO6zweGh0euJzrLrg0qeTMnexsEXzITkX
OWZS6ALNt6UUq/DRSfGk9ciuWes/za5NaXob/60qgyqOinDuMUaTrR+KXZfliCu0
69C/mh7qpSPc/n91qjzvjklfc9bTd2WiUPeODQLayyEZ5QVEVsLMS1zlCDlyXck=
=XeZq
-----END PGP SIGNATURE-----



More information about the mongrel-unicorn mailing list