elcuervo / airplay

Airplay bindings to Ruby
MIT License
1.07k stars 69 forks source link

Airplay::Connection crashed!, ThreadError: can't create Thread (35) #37

Closed bobbyduhbrain closed 10 years ago

bobbyduhbrain commented 10 years ago

Turned up while testing today.

Airplay::Connection crashed! ThreadError: can't create Thread (35) /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:innew' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in create' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:69:inblock in get' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:in synchronize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:inget' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:10:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:innew' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:innew' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection/persistent.rb:16:ininitialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:inpersistent' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:32:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:inpublic_send' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:indispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create' Airplay::Protocol::Player crashed! ThreadError: can't create Thread (35) /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:innew' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:97:in create' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:69:inblock in get' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:in synchronize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:63:inget' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:10:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:innew' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:155:in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:innew' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid.rb:188:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection/persistent.rb:16:ininitialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:in new' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:23:inpersistent' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/connection.rb:32:in close' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:inpublic_send' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:indispatch' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create' (celluloid):0:in remote procedure call' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:invalue' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in method_missing' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/protocol/player.rb:123:incleanup' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/bundler/gems/airplay-11af0c98ac6a/lib/airplay/protocol/player.rb:139:in block in check_for_playback_status' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:inblock in task' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/Mike/.rvm/gems/ruby-2.0.0-p195/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:inblock in create'

elcuervo commented 10 years ago

Mmm, this is traced back to Celluloid. Can you provide some context on how did it happen?

bobbyduhbrain commented 10 years ago

The videos were playing in sequence and this error came up as the server was attempting to queue the next video in the sequence.

elcuervo commented 10 years ago

I think the timers clean up was the root of this (https://github.com/elcuervo/airplay/commit/3ce1f72d3f5f678867c06bca65bcd28f1ca1ce7a). I'll close it for now. If the problem reappears please open another issue.