From: John Carter Date: 2006-01-24T04:54:56+09:00 Subject: Re: Debugging endless loops On Mon, 23 Jan 2006, Alexey Verkhovsky wrote: > John Carter wrote: > >>> Say, we have a Ruby app going into an endless loop (or perhaps a thread >>> deadlock) mode. Let us further assume that it happens in production and >>> you don't know how to reproduce it anywhere else. How would you debug >>> this? >> >> Thread.abort_on_exception = true > > Neither endless loop, nor deadlock are exception conditions. Yup, but if a thread dies and you don't have a handler of last resort nor have set abort on exception, it just dies silently. ie. You may think your problem is a deadlock or infinite loop, but your actual problem may be a needed thread has quietly died. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand Carter's Clarification of Murphy's Law. "Things only ever go right so that they may go more spectacularly wrong later." From this principle, all of life and physics may be deduced.