unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: ghazel@gmail.com
To: Eric Wong <normalperson@yhbt.net>
Cc: unicorn list <mongrel-unicorn@rubyforge.org>, James Cox <james@imaj.es>
Subject: Re: Issue with unicorn not starting via bluepill?
Date: Wed, 26 May 2010 01:31:13 -0700	[thread overview]
Message-ID: <AANLkTin65ePJ9yjM2-0SkP3SgXmS4njwAfevVjpVsvso@mail.gmail.com> (raw)
In-Reply-To: <20100319085759.GA3323@dcvr.yhbt.net>

On Fri, Mar 19, 2010 at 1:57 AM, Eric Wong <normalperson@yhbt.net> wrote:
> Eric Wong <normalperson@yhbt.net> wrote:
>> James Cox <james@imaj.es> wrote:
>> > trying to start my unicorn via bluepill, and running into this :
>
>> > master failed to start, check stderr log for details

For reference, this is not the error I get. I'm running "upgrade",
which is sig USR2, and getting two masters (one marked (old)) and two
sets of children.

> Both of you:
>
> Was there anything useful in stderr_path?  The daemomized
> process can never output to the terminal, so it had to
> log somewhere... There's also strace, but looking at the
> Unicorn code I haven't been able to find much (I'm very
> sleep deprived right now, though).

The only thing out of the ordinary I see in the log is:

retrying in 5 seconds (infinite tries left)
adding listener failed addr=127.0.0.1:9011 (in use)

as each of the admin interface TCP socket listeners fails on the
workers because there are still the old workers running.


> @Greg: I got through to /v6lUsuzD finally, can you put some
> debug statements around your before_fork hook and print out
> the pid path name and whether it exists or not?

server.config[:pid]: "/data/myapp/shared/pids/unicorn.pid"
exists?: true
old_pid: "/data/myapp/shared/pids/unicorn.pid.oldbin"
exists?: true
server.pid: "/data/myapp/shared/pids/unicorn.pid"
old_pid: "/data/myapp/shared/pids/unicorn.pid.oldbin"
server.pid != old_pid: true

It looks like trying to send a SIGQUIT to the old master does nothing.
Sending it a SIGTTOU does seem to reduce the number of workers, but
even when there are 0 left it does not die after a SIGQUIT.

Looking at the Unicorn source and my config:
http://codepad.org/v6lUsuzD I'm not sure what from the 0.96.1 was
supposed to be sending SIGTTOU. There are not any being sent, from
what I can tell. In the 0.96.1 to 0.96.1 upgrade case, I see the old
master get a bunch of SIGQUITs and reap its own children. In the
0.99.0 case I see no SIGQUITs arrive at the old master... In fact,
just running 0.99.0 and trying to send it a SIGQUIT does nothing.
SIGINT works fine, so do TTOU, TTIN, USR1 etc. I added a log message
to the trap handler registered in trap_deferred, and it is never being
called...

Turns out, I had query_trace installed, and the change in to trap
handler initialization registered it before query_trace initialized.
Later, query_trace registered a QUIT handler and did not call any
existing handlers. I have since uninstalled that broken junk.

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

      parent reply	other threads:[~2010-05-26  8:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 21:12 Issue with unicorn not starting via bluepill? James Cox
2010-03-19  8:26 ` Eric Wong
2010-03-19  8:57   ` Eric Wong
2010-03-23 18:54     ` Eric Wong
2010-03-24 19:14       ` James Cox
2010-05-26  8:31     ` ghazel [this message]

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=AANLkTin65ePJ9yjM2-0SkP3SgXmS4njwAfevVjpVsvso@mail.gmail.com \
    --to=ghazel@gmail.com \
    --cc=james@imaj.es \
    --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).