On 7/18/07, ara.t.howard <Ara.T.Howard / noaa.gov> wrote:
>
>
> i've tested on several platforms (*nixes) all all will hang if run a few
> times
>
>   http://drawohara.tumblr.com/post/6123121
>
> can someone confirm?

FreeBSD 4.11-RELEASE-p11 #0 (P3-850Mhz)
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-freebsd4]

4th run with 10 threads hung.

---

FreeBSD 6.2-RELEASE-p5 #0 SMP (Athlon X2 3400+)
ruby 1.8.6 (2007-03-13 patchlevel 0) [amd64-freebsd6]

10, 20, 30, 40 threads no problem for 10 runs. 50 threads hung on 4th run.

---

As an aside, I've seen similar hangs with a utility I've written to do
mail processing from .qmail files that uses fork/exec with pipes.
Strangely (and I'm not sure how I stumbled upon this) adding a
"Thread.new { sleep 5 }" just prior to the fork resolved the problem
for me, but I've never bothered isolated simple reproducible test for
the hangs.