On Apr 23, 8:19=A0pm, Ezra Zygmuntowicz <ezmob... / gmail.com> wrote:
> =A0 =A0 =A0 =A0 What version and patch level of ruby do you have? If you h=
ave ruby =A0
> 1.8.6 and the patch level is less than p111 then you have a faulty =A0
> ruby interpreter with broken threading that can cause these deadlocks. =A0=

> Make sure you are using ruby 1.8.5 or ruby 1.8.6p11 minimum.

Had the same problem with 1.8.6p111. I finally tracked down the
problem to a bug in Process.create from the 'win32-process' gem. Some
code added to this function afterversion 0.5.5 would call CloseHandle
on something that was not a handle but a process or thread ID. When
these are the same as socket handles, etc, the process would sometimes
deadlock, sometimes simply close a listening socket, fail in
Socket#accept, or go into infinte loops.

http://rubyforge.org/tracker/index.php?func=3Ddetail&aid=3D19753&group_id=3D=
85&atid=3D411.

I was able to work around it by setting :close_handles =3D> false in the
call to Process#create.

Lars