From 105d9f8b87b0667686ba13960f734b90f3055977 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 24 Mar 2010 12:40:02 -0700 Subject: KNOWN_ISSUES: document Array#shuffle / Array#sample issue under 1.9 We're one of the few forking apps that run into this rarely used feature, so we'll document it here. --- KNOWN_ISSUES | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/KNOWN_ISSUES b/KNOWN_ISSUES index e83e34e..83a450d 100644 --- a/KNOWN_ISSUES +++ b/KNOWN_ISSUES @@ -3,6 +3,14 @@ Occasionally odd {issues}[link:ISSUES.html] arise without a transparent or acceptable solution. Those issues are documented here. +* Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will + segfault if called after forking. This is fixed in trunk (r26936) and + should be backported to the next 1.9.1 stable release (after p378). + Until then, it is advisable to call "Kernel.rand" in your after_fork + hook to reinitialize the random number generator. + + See http://redmine.ruby-lang.org/issues/show/2962 for more details + * When using "preload_app true", with apps using background threads need to restart them in the after_fork hook because threads are never shared with child processes. Additionally, any synchronization -- cgit v1.2.3-24-ge0c7