On 16 Jun 2005, at 11:51, Michel Pastor wrote:

> Hi,
> it seems I discovered a bug since I can get a reproducible segfault  
> on different hardware when trying to use a freshly created rails  
> application using a sqlite3 database running on a webrick. I didn't  
> test with other db so I dont know if that comes from sqlite3-ruby  
> gem. The following instructions triggers the problem on the two  
> systems I tested them on:

> deadlock 0xb75e5000: run:-  - :0
> deadlock 0xb7e73798: sleep:ST(1118944246.320441) (main) - /usr/lib/ 
> ruby/1.8/webrick/server.rb:88
> deadlock 0xb774d104: sleep:T(1118944275.021337)  - /usr/lib/ruby/ 
> 1.8/timeout.rb:41
> [2005-06-16 19:50:45] ERROR fatal: Thread(0xb774d104): deadlock
>         /usr/lib/ruby/1.8/timeout.rb:41:in `start'

It is probably not a bug in ruby, because ruby protects itself  
against deadlock by immediately exitting.

All the threads were probably told to go to sleep:

$ ruby -e 'Thread.start { Thread.stop }; Thread.stop'
deadlock 0x8076b0c: sleep:-  - -e:1
deadlock 0x8082790: sleep:- (main) - -e:1
-e:1:in `stop': Thread(0x8082790): deadlock (fatal)
         from -e:1

-- 
Eric Hodel - drbrain / segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04