* unicorn segfaulting on Array.shuffle under ruby 1.9.1
@ 2010-03-14 22:00 Bharanee Rathna
2010-03-14 23:53 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Bharanee Rathna @ 2010-03-14 22:00 UTC (permalink / raw)
To: mongrel-unicorn
Hi Guys,
http://gist.github.com/332266
results in a segfault when run under unicorn. It seems to be fine
with webrick or thin. Any ideas ?
- bharanee
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: unicorn segfaulting on Array.shuffle under ruby 1.9.1
2010-03-14 22:00 unicorn segfaulting on Array.shuffle under ruby 1.9.1 Bharanee Rathna
@ 2010-03-14 23:53 ` Eric Wong
2010-03-15 0:44 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2010-03-14 23:53 UTC (permalink / raw)
To: unicorn list; +Cc: Bharanee Rathna
Bharanee Rathna <deepfryed@gmail.com> wrote:
> Hi Guys,
>
> http://gist.github.com/332266
>
> results in a segfault when run under unicorn. It seems to be fine
> with webrick or thin. Any ideas ?
Hi Bharanee, it looks like the random number generator needs to be
reinitialized after fork()...
Try putting "rand" anywhere before shuffle, you can reproduce
it below even without Unicorn:
------------------- 8< ----------------
pid = fork do
rand # removing this will segfault
(1..10).to_a.shuffle
end
p Process.waitpid2(pid)
------------------- 8< ----------------
I'll see if I can fix it and follow up with a report to ruby-core/redmine
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: unicorn segfaulting on Array.shuffle under ruby 1.9.1
2010-03-14 23:53 ` Eric Wong
@ 2010-03-15 0:44 ` Eric Wong
0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2010-03-15 0:44 UTC (permalink / raw)
To: unicorn list; +Cc: Bharanee Rathna
Eric Wong <normalperson@yhbt.net> wrote:
> I'll see if I can fix it and follow up with a report to ruby-core/redmine
I managed to report the issue here (and managed to not forget
the attachment, this might be a first)
http://redmine.ruby-lang.org/issues/show/2962
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-15 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-14 22:00 unicorn segfaulting on Array.shuffle under ruby 1.9.1 Bharanee Rathna
2010-03-14 23:53 ` Eric Wong
2010-03-15 0:44 ` Eric Wong
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).