From: Roger Pack Date: 2008-07-18T13:34:43+09:00 Subject: Re: weird deadlock message > > hrrrm - dunno. paste the code? > > a @ http://codeforpeople.com/ def log(message) begin newMessage = formatMessage(message) print newMessage unless @@output_to_file_only_not_screen if !@logFile or @logFile.closed? print "ERROR LOGGING THIS!!!" << newMessage << "\n\n\n" return end assert @logFile and !@logFile.closed? @logFile.write(newMessage) @logFile.flush # THIS LINE FAILS DEADLOCK. As a side note, I've had it fail on win32 for me on this line with an EBADF, but the instance in question is a deadlock in mac os x, using 1.8.6 or 1.8.7 SVN. rescue Exception => detail # obviously this does not catch the exception 'deadlock' :P ... end end An over aggressive deadlock bug? A faulty fastthread? It might be another of those cruddy OS X bugs. Knowing my luck. [1] Note that in a similar but slightly different configuration it actually has one thread 'freeze' when it is opening a file [like File.new 'abc', 'w']. The fix thus far has been to avoid using threads, as I have never seen it in a single threaded environment. Cross your fingers, anyway. Thanks for your help :) -R [1] http://www.ruby-forum.com/topic/153559 -- Posted via http://www.ruby-forum.com/.