calling inspect on an actor with FSM hangs then crashes #149

Closed
grantr opened this Issue Jan 15, 2013 · 2 comments

2 participants

@grantr
require 'celluloid'
class StateActor
  include Celluloid
  include Celluloid::FSM

  def initialize
    super
    attach Actor.current
  end
end

a = StateActor.new
a.inspect

Call to inspect hangs for a while, then crashes with this trace:


E, [2013-01-15T13:42:10.706506 #11377] ERROR -- : TestActor crashed!
Celluloid::DeadTaskError: cannot resume a dead task (mprotect failed)
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/tasks/task_fiber.rb:55:in `rescue in resume'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/tasks/task_fiber.rb:50:in `resume'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:414:in `task'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:328:in `handle_message'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:195:in `run'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:183:in `block in initialize'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/thread_handle.rb:17:in `block in initialize'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/internal_pool.rb:55:in `call'
/home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/internal_pool.rb:55:in `block in create'
Celluloid::Task::TerminatedError: task was terminated
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/tasks/task_fiber.rb:42:in `suspend'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/tasks.rb:19:in `suspend'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:70:in `call'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/proxies/actor_proxy.rb:30:in `inspect'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid.rb:283:in `block in inspect'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid.rb:281:in `each'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid.rb:281:in `inspect'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/calls.rb:11:in `public_send'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/calls.rb:11:in `dispatch'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/calls.rb:60:in `dispatch'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:328:in `block in handle_message'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/tasks/task_fiber.rb:28:in `block in initialize'
    from (celluloid): remote procedure call
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/actor.rb:80:in `call'
    from /home/grantr/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/celluloid-b5803bb047ef/lib/celluloid/proxies/actor_proxy.rb:30:in `inspect'
    from (irb):24
    from /home/grantr/.rbenv/versions/1.9.3-p327/bin/irb:12:in `<main>'>
@tarcieri
Celluloid member

I'm guessing this is a duplicate of #22. I'm about 75% of the way there towards solving this. Would definitely like to get a fix into 0.13

@grantr

I'll close this one as a dupe then

@grantr grantr closed this Jan 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment