From: Lloyd Zusman Date: 2004-11-27T09:06:49+09:00 Subject: Deadlock in borges sample apps I have installed borges-1.1.0, and I'm using it with the following version of ruby: % ruby --version ruby 1.9.0 (2004-08-03) [i386-freebsd4.0] The first thing I did after installation was to run this test app, as described in the README file (note that I changed "1.8" to "1.9"): ruby /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb I then went to my browser and entered the following URL, again as specified in the README file: http://localhost:7000/borges/counter The following message came back to my web browser: Internal Server Error deadlock; recursive locking WEBrick/1.3.1 (Ruby/1.9.0/2004-08-03) at localhost:7000 The borges process that I started printed the information at the bottom of this message. Note that I got the same "recursive locking" deadlock with the sample SushiNet application. Is borges-1.1.0 incompatible with ruby 1.9, perhaps? Here's the output from borges: [2004-11-26 18:55:06] INFO WEBrick 1.3.1 [2004-11-26 18:55:06] INFO ruby 1.9.0 (2004-08-03) [i386-freebsd4.0] [2004-11-26 18:55:06] INFO WEBrick::HTTPServer#start: pid=35885 port=7000 !! Exception in #: deadlock; recursive locking /usr/local/lib/ruby/1.9/thread.rb:96:in `lock' /usr/local/lib/ruby/1.9/thread.rb:132:in `synchronize' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:136:in `start_handler_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:135:in `loop' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:135:in `start_handler_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:127:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:127:in `start_handler_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:163:in `in_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:92:in `enter_session' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:105:in `enter_session_with' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Application.rb:7:in `handle_default_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Registry.rb:37:in `handle_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Dispatcher.rb:39:in `handle_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:35:in `do_GET' /usr/local/lib/ruby/1.9/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/local/lib/ruby/1.9/webrick/httpservlet/abstract.rb:35:in `service' /usr/local/lib/ruby/1.9/webrick/httpserver.rb:101:in `service' /usr/local/lib/ruby/1.9/webrick/httpserver.rb:62:in `run' /usr/local/lib/ruby/1.9/webrick/server.rb:153:in `start_thread' /usr/local/lib/ruby/1.9/webrick/server.rb:147:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:147:in `start_thread' /usr/local/lib/ruby/1.9/webrick/server.rb:97:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.9/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:79:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:79:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:85 !! /usr/local/lib/ruby/1.9/thread.rb:96:in `lock' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:171:in `in_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:165:in `synchronize' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:165:in `in_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:92:in `enter_session' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:105:in `enter_session_with' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Application.rb:7:in `handle_default_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Registry.rb:37:in `handle_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Dispatcher.rb:39:in `handle_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:35:in `do_GET' /usr/local/lib/ruby/1.9/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/local/lib/ruby/1.9/webrick/httpservlet/abstract.rb:35:in `service' /usr/local/lib/ruby/1.9/webrick/httpserver.rb:101:in `service' /usr/local/lib/ruby/1.9/webrick/httpserver.rb:62:in `run' /usr/local/lib/ruby/1.9/webrick/server.rb:153:in `start_thread' /usr/local/lib/ruby/1.9/webrick/server.rb:147:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:147:in `start_thread' /usr/local/lib/ruby/1.9/webrick/server.rb:97:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.9/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:79:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:79:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:85 !! [2004-11-26 18:55:14] ERROR ThreadError: deadlock; recursive locking /usr/local/lib/ruby/1.9/thread.rb:96:in `lock' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:171:in `in_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:165:in `synchronize' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:165:in `in_thread' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:92:in `enter_session' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Session.rb:105:in `enter_session_with' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Application.rb:7:in `handle_default_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Registry.rb:37:in `handle_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/RequestHandler/Dispatcher.rb:39:in `handle_request' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:35:in `do_GET' /usr/local/lib/ruby/1.9/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/local/lib/ruby/1.9/webrick/httpservlet/abstract.rb:35:in `service' /usr/local/lib/ruby/1.9/webrick/httpserver.rb:101:in `service' /usr/local/lib/ruby/1.9/webrick/httpserver.rb:62:in `run' /usr/local/lib/ruby/1.9/webrick/server.rb:153:in `start_thread' /usr/local/lib/ruby/1.9/webrick/server.rb:147:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:147:in `start_thread' /usr/local/lib/ruby/1.9/webrick/server.rb:97:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.9/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.9/webrick/server.rb:79:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:79:in `start' /usr/local/lib/ruby/site_ruby/1.9/Borges/WEBrick.rb:85 home.acholado.net - - [26/Nov/2004:18:55:14 EST] "GET /borges/counter HTTP/1.1" 500 312 - -> /borges/counter [2004-11-26 18:55:14] ERROR `/favicon.ico' not found. home.acholado.net - - [26/Nov/2004:18:55:14 EST] "GET /favicon.ico HTTP/1.1" 404 286 - -> /favicon.ico -- Lloyd Zusman ljz@asfast.com God bless you.