From: Ville Mattila Date: 2001-11-28T19:10:45+09:00 Subject: [ruby-talk:26763] Re: TCP hang problem "Harry Ohlsen" writes: > In article , "Ville Mattila" > wrote: > > > "Harry Ohlsen" writes: > > > >> Sorry, I should have said, this is under Linux 2.4.13, in case that > >> makes a difference. > > > > There at least two serious select related bug which could cause your > > problems. I have sent a patch to fix rb_thread_select timeout issue > > > > http://www.ruby-talk.com/cgi-bin/scat.rb/ruby/ruby-talk/25914 > > > > and Jakub Travnik has fix proposal for select issue in io.c > > > > http://www.ruby-talk.com/cgi-bin/scat.rb/ruby/ruby-talk/26370 > > > > - Ville > > Do you know whether either of those patches have been implemented in > recent snapshots? The problem I'm having is much worse (happens on the > first write) with recent snapshots (currently, I'm trying 1.7.2 > 2001-11-25). My fix is partly in the latest snapshot. Unfortunately this part was not merged please try the following patch. Matz could apply this one to cvs too? This is against 1.7.0 branch. -- eval.c 2001/11/27 10:00:30 1.231 +++ eval.c 2001/11/28 09:46:28 @@ -7912,7 +7912,7 @@ case ERESTART: #endif if (timeout) { - double d = timeofday() - limit; + double d = limit - timeofday(); tv.tv_sec = (unsigned int)d; tv.tv_usec = (long)((d-(double)tv.tv_sec)*1e6);