unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: ghazel@gmail.com
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: [ANN] unicorn 3.6.0 - small fixes, PRNG workarounds
Date: Tue, 26 Apr 2011 15:38:10 -0700	[thread overview]
Message-ID: <BANLkTikr2+4gjqUTH5LfJokwZjWmR7ADMQ@mail.gmail.com> (raw)
In-Reply-To: <20110421065649.GA20263@dcvr.yhbt.net>

Is it possible there is a problem with this change? Since I upgraded
to 3.6.0 I have encountered two collisions on
ActiveSupport::SecureRandom.hex(64), which seems very unlikely, since
it has never happened in the history of my app otherwise.

-Greg

On Wednesday, April 20, 2011, Eric Wong <normalperson@yhbt.net> wrote:
> Changes:
>
> Mainly small fixes, improvements, and workarounds for fork() issues
> with pseudo-random number generators shipped with Ruby (Kernel#rand,
> OpenSSL::Random (used by SecureRandom and also by Rails).
>
> The PRNG issues are documented in depth here (and links to Ruby Redmine):
>
>   http://bogomips.org/unicorn.git/commit?id=1107ede7
>   http://bogomips.org/unicorn.git/commit?id=b3241621
>
> If you're too lazy to upgrade, you can just do this in your after_fork
> hooks:
>
>   after_fork do |server,worker|
>     tmp = srand
>     OpenSSL::Random.seed(tmp.to_s) if defined?(OpenSSL::Random)
>   end
>
> There are also small log reopening (SIGUSR1) improvements:
>
> * relative paths may also be reopened, there's a small chance this
>   will break with a handful of setups, but unlikely.  This should
>   make configuration easier especially since the "working_directory"
>   configurator directive exists.  Brought up by Matthew Kocher:
>   http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/900
>
> * workers will just die (and restart) if log reopening fails for
>   any reason (including user error).  This is to workaround the issue
>   reported by Emmanuel Gomez:
>   http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/906
>
>
> * http://unicorn.bogomips.org/
> * mongrel-unicorn@rubyforge.org
> * git://bogomips.org/unicorn.git
>
> --
> Eric Wong
> _______________________________________________
> 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
>
_______________________________________________
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:[~2011-04-26 22:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  6:56 [ANN] unicorn 3.6.0 - small fixes, PRNG workarounds Eric Wong
2011-04-26 22:38 ` ghazel [this message]
2011-04-26 23:01   ` Eric Wong
2011-04-26 23:17 ` 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=BANLkTikr2+4gjqUTH5LfJokwZjWmR7ADMQ@mail.gmail.com \
    --to=ghazel@gmail.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).