unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Philipp Bruell <Philipp.Bruell@skrill.com>,
	Charles Hornberger <Charles.Hornberger@skrill.com>
Subject: Re: FreeBSD jail and unicorn
Date: Thu, 2 Feb 2012 19:31:36 +0000	[thread overview]
Message-ID: <20120202193136.GA1478@dcvr.yhbt.net> (raw)
In-Reply-To: <CB5014D7.892%philipp.bruell@skrill.com>

Philipp Bruell <Philipp.Bruell@skrill.com> wrote:
> On 01/02/2012 19:14, "Eric Wong" <normalperson@yhbt.net> wrote:
> >Philipp Bruell <Philipp.Bruell@skrill.com> wrote:

> The scripts behaves exactly like unicorn. The master received the QUIT and
> passes it to the child. The child also receives it, but don't exit. While
> the master is waiting for the child to exit, it consumes all the cpu
> cycles.

Interesting, I suspect it's some bad interaction with fork() causing
signal handlers/pthreads to go bad.  I expect the following simple
script to work flawlessly since it doesn't fork:

----------------------------------------
trap(:QUIT) { exit(0) }
puts "Ready for SIGQUIT on #$$"
sleep
----------------------------------------

> I don't have the option, to test without jail, on a different FreeBSD
> version nor a different architecture (and FreeBSD - on Mac OS X everything
> works perfect). But I tried ruby version 1.9.2 and that works! So I guess
> it's a bug with 1.9.3 on FreeBSD.

Can you report this as a bug to the Ruby core folks on
https://bugs.ruby-lang.org/ and also to whereever the FreeBSD hackers
take bug reports?  Somebody from one of those camps should be able
to resolve the issue.

The good thing is my small sample script is enough to reproduce the
issue, so it should be easy for an experienced FreeBSD hacker to
track down.

> I've attached the truss -f output of the child process of the test script.
> But the observation with truss made the problem disappear again :-(

It could be a timing or race condition issue.  I've had strace on linux
find/hide bugs because it slowed the program down enough.
_______________________________________________
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:[~2012-02-02 19:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 17:22 FreeBSD jail and unicorn Philipp Bruell
2012-01-31 18:39 ` Eric Wong
2012-01-31 18:50   ` Charles Hornberger
2012-01-31 19:05     ` Eric Wong
     [not found]       ` <CB4EBD2A.7DF%philipp.bruell@skrill.com>
2012-02-01 18:14         ` Eric Wong
     [not found]           ` <CB5014D7.892%philipp.bruell@skrill.com>
2012-02-02 19:31             ` Eric Wong [this message]
2012-02-02 22:27               ` Eric Wong
2012-02-02 22:41                 ` Eric Wong
2012-02-02 23:41                   ` Eric Wong
2012-02-03  2:58                     ` Eric Wong
2012-02-07  5:21                       ` Eric Wong
2012-02-07  7:36                         ` Philipp Bruell
2012-02-07  9:59                           ` Charles Hornberger

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=20120202193136.GA1478@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=Charles.Hornberger@skrill.com \
    --cc=Philipp.Bruell@skrill.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /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).