From: Raul Parolari Date: 2010-07-02T22:19:52+09:00 Subject: Re: Networking: select() blocks for seconds (> timeout) Brian Candler wrote: > Raul Parolari wrote: >> and then this "Time thief" >> appearing every hour and taking away chunks of 5 or 10 seconds... only a >> sudden flash of that conversation with the JPL engineer ("the GC misses >> Mars landing!") gave me a clue (and kept me sane, barely). >> >> I will recreate the example using 2 macs connected via Ethernet (I must >> rewrite the code though, as it stays with the company). I will use Ruby >> on one side and C on the other, and hopefully it will happen again; and >> then I will disable/enable the Gc (not that those statements fix >> anything as some seem to think, as they will just shift the problem from >> one place to another of the program, but they will indicate if it is the >> GC). > > I cannot see any possible mechanism how the GC would pause for exactly a > multiple of 5 seconds. But a DNS query, if it loses a packet or two, > could certainly pause for exactly 5 or 10 seconds until it retries. So we have either: a) a GC problem b) or that to read a packet from a queue, Ruby 1.9.2 makes a reverse dns query. The second is so sad (and so unlike what I have seen from Ruby) that I almost prefer the first (although it can't be fixed). But enough speculation. Raul Parolari -- Posted via http://www.ruby-forum.com/.