unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Cedric Maion <cedric@maion.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: [PATCH] `kill -SIGTRAP <worker pid>`
Date: Sun, 24 Jun 2012 13:05:53 +0200	[thread overview]
Message-ID: <4FE6F491.6070108@maion.com> (raw)
In-Reply-To: <20120623185534.GA17517@dcvr.yhbt.net>


-----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-----

_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

  reply	other threads:[~2012-06-24 11:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 16:12 `kill -SIGTRAP <worker pid>` to get a live ruby backtrace + generate backtrace when murdering worker due to timeout Cedric Maion
2012-06-23 16:12 ` [PATCH] `kill -SIGTRAP <worker pid>` to get a live ruby backtrace + generate backtrace when murdered " Cedric Maion
2012-06-23 18:55   ` [PATCH] `kill -SIGTRAP <worker pid>` Eric Wong
2012-06-24 11:05     ` Cedric Maion [this message]
2012-06-25  3:59       ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE6F491.6070108@maion.com \
    --to=cedric@maion.com \
    --cc=mongrel-unicorn@rubyforge.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).