Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't cleanly terminate all actors in 10 seconds w/ celluloid-io #199

Closed
azin634 opened this issue Sep 28, 2018 · 10 comments
Closed

Couldn't cleanly terminate all actors in 10 seconds w/ celluloid-io #199

azin634 opened this issue Sep 28, 2018 · 10 comments

Comments

@azin634
Copy link

azin634 commented Sep 28, 2018

Hello,

I've had a bot before but after updating the gem I've been seeing this error. I couldn't find any documentation/issue mentioning this. Any idea how to fix?

E, [2018-09-28T13:58:54.990388 #6215] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
/home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep': No live threads left. Deadlock? (fatal)
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:77:in `block in receive'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:76:in `receive'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:50:in `wait'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid.rb:141:in `suspend'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:41:in `response'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:45:in `value'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/celluloid-0.17.3/lib/celluloid/proxy/sync.rb:22:in `method_missing'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/client.rb:51:in `start!'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:37:in `start!'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:29:in `block (2 levels) in run'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:69:in `handle_exceptions'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:27:in `block in run'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:26:in `loop'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:26:in `run'
	from /home/edwin/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/bot.rb:6:in `run'
@dblock
Copy link
Collaborator

dblock commented Sep 28, 2018

Do you see this right away? It looks like something is blocking the execution and eventually it runs out of worker threads.

@dblock dblock added the bug? label Sep 28, 2018
@danmilleruk
Copy link

Seeing this also on a first install using the examples in README.md.

Relevant gems & versions:

celluloid-essentials (0.20.5, 0.20.2)
celluloid-extras (0.20.5, 0.20.0)
celluloid-fsm (0.20.5, 0.20.0)
celluloid-io (0.17.3)
celluloid-pool (0.20.5, 0.20.0)
celluloid-supervision (0.20.6, 0.20.1)
slack-ruby-bot (0.11.1)```

@dblock
Copy link
Collaborator

dblock commented Sep 29, 2018

This is just from running any sample? What's the easiest way to reproduce?

@danmilleruk
Copy link

Thanks for the quick response!

Yep, any sample. My steps are:
so running Ruby 2.5.0, 2.2.2 or 2.1.0 on OSX. Versions managed by RVM:

Added the following to a Gemfile:

source 'http://rubygems.org'

gem 'celluloid-io'
gem 'slack-ruby-bot'

bundle install output:

Fetching gem metadata from http://rubygems.org/..........
Fetching gem metadata from http://rubygems.org/.
Resolving dependencies...
Using concurrent-ruby 1.0.5
Using i18n 1.1.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.1
Using bundler 1.16.5
Using hitimes 1.3.0
Using timers 4.1.2
Fetching celluloid-essentials 0.20.5
Installing celluloid-essentials 0.20.5
Fetching celluloid-extras 0.20.5
Installing celluloid-extras 0.20.5
Fetching celluloid-fsm 0.20.5
Installing celluloid-fsm 0.20.5
Fetching celluloid-pool 0.20.5
Installing celluloid-pool 0.20.5
Fetching celluloid-supervision 0.20.6
Installing celluloid-supervision 0.20.6
Fetching celluloid 0.17.3
Installing celluloid 0.17.3
Using nio4r 2.3.1
Fetching celluloid-io 0.17.3
Installing celluloid-io 0.17.3
Using multipart-post 2.0.0
Using faraday 0.15.3
Using faraday_middleware 0.12.2
Using gli 2.18.0
Using hashie 3.6.0
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0
Fetching slack-ruby-client 0.13.0
Installing slack-ruby-client 0.13.0
Fetching slack-ruby-bot 0.11.1
Installing slack-ruby-bot 0.11.1
Bundle complete! 2 Gemfile dependencies, 26 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.

Added the following to test.rb:

require 'slack-ruby-bot'

class Bot < SlackRubyBot::Bot
  command 'ping' do |client, data, _match|
    client.say(text: 'pong', channel: data.channel)
  end
end

Bot.run

Executed via:

SLACK_API_TOKEN=redactedtoken bundle exec ruby pongbot.rb

Full stack trace:

I, [2018-09-29T16:42:02.590279 #51202]  INFO -- request: POST https://slack.com/api/rtm.start
D, [2018-09-29T16:42:02.590376 #51202] DEBUG -- request: Accept: "application/json; charset=utf-8"
User-Agent: "Slack Ruby Client/0.13.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2018-09-29T16:42:02.892289 #51202]  INFO -- response: Status 200
D, [2018-09-29T16:42:02.892387 #51202] DEBUG -- response: content-type: "application/json; charset=utf-8"
content-length: "4941"
connection: "close"
date: "Sat, 29 Sep 2018 15:42:03 GMT"
server: "Apache"
x-accepted-oauth-scopes: "rtm:stream,client"
x-content-type-options: "nosniff"
x-slack-router: "p"
expires: "Mon, 26 Jul 1997 05:00:00 GMT"
cache-control: "private, no-cache, no-store, must-revalidate"
x-oauth-scopes: "identify,read,post,client,apps"
pragma: "no-cache"
x-xss-protection: "0"
x-slack-req-id: "<redacted>"
x-slack-exp: "1"
x-slack-backend: "h"
referrer-policy: "no-referrer"
strict-transport-security: "max-age=31536000; includeSubDomains; preload"
vary: "Accept-Encoding"
access-control-allow-origin: "*"
x-via: "haproxy-www-s85z"
x-cache: "Miss from cloudfront"
via: "1.1 adc13b6f5827d04caa2efba65479257c.cloudfront.net (CloudFront)"
x-amz-cf-id: "<redacted>"
E, [2018-09-29T16:42:13.036940 #51202] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!
Traceback (most recent call last):
  25: from pongbot.rb:9:in `<main>'
  24: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/bot.rb:6:in `run'
  23: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:26:in `run'
  22: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:26:in `loop'
  21: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:27:in `block in run'
  20: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:69:in `handle_exceptions'
  19: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:29:in `block (2 levels) in run'
  18: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:37:in `start!'
  17: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/client.rb:51:in `start!'
  16: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/proxy/sync.rb:22:in `method_missing'
  15: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:45:in `value'
  14: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:41:in `response'
  13: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid.rb:141:in `suspend'
  12: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:50:in `wait'
  11: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:76:in `receive'
  10: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   9: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   8: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   7: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:77:in `block in receive'
   6: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   5: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   4: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   3: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   2: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   1: from /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep': No live threads left. Deadlock? (fatal)
7 threads, 7 sleeps current:0x00007f8a9cf699f0 main thread:0x00007f8a9cc0b790
* #<Thread:0x00007f8a9d085d48 sleep_forever>
   rb_thread_t:0x00007f8a9cc0b790 native:0x000000010dd595c0 int:0
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:77:in `block in receive'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:76:in `receive'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:50:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid.rb:141:in `suspend'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:41:in `response'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:45:in `value'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/proxy/sync.rb:22:in `method_missing'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/client.rb:51:in `start!'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:37:in `start!'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:29:in `block (2 levels) in run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:69:in `handle_exceptions'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:27:in `block in run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:26:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/server.rb:26:in `run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-bot-0.11.1/lib/slack-ruby-bot/bot.rb:6:in `run'
   pongbot.rb:9:in `<main>'
* #<Celluloid::Thread:0x00007f8a9dbbd4e0@/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:47 sleep_forever>
   rb_thread_t:0x00007f8a9f8cbe50 native:0x0000700000ad0000 int:0
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:155:in `block in run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/group.rb:68:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:152:in `run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:131:in `block in start'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor/system.rb:78:in `block in get_thread'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
* #<Celluloid::Thread:0x00007f8a9dbb6028@/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:47 sleep_forever>
   rb_thread_t:0x00007f8a9f9854b0 native:0x0000700000bd3000 int:0
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:155:in `block in run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/group.rb:68:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:152:in `run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:131:in `block in start'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor/system.rb:78:in `block in get_thread'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
* #<Celluloid::Thread:0x00007f8a9dbadd88@/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:47 sleep_forever>
   rb_thread_t:0x00007f8a9ccc5100 native:0x0000700000cd6000 int:0
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:155:in `block in run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/group.rb:68:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:152:in `run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:131:in `block in start'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor/system.rb:78:in `block in get_thread'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
* #<Celluloid::Thread:0x00007f8a9db9ed60@/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:47 sleep_forever>
   rb_thread_t:0x00007f8a9f8cb590 native:0x0000700000dd9000 int:0
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:155:in `block in run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/group.rb:68:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:152:in `run'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:131:in `block in start'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor/system.rb:78:in `block in get_thread'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
* #<Celluloid::Thread:0x00007f8a9db8c890@/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/group/spawner.rb:47 sleep_forever>
   rb_thread_t:0x00007f8a9fb02310 native:0x0000700000edc000 int:0
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/socket.rb:46:in `join'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/socket.rb:46:in `start_sync'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:16:in `dispatch'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
* #<Celluloid::Thread:0x00007f8a9db7ec90@/Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/concurrency/celluloid.rb:71 sleep_forever>
   rb_thread_t:0x00007f8a9cf699f0 native:0x0000700000fdf000 int:0
    depended by: tb_thread_id:0x00007f8a9fb02310
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `sleep'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:63:in `block in check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:58:in `check'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:77:in `block in receive'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:15:in `block in for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/timers-4.1.2/lib/timers/wait.rb:14:in `for'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/mailbox.rb:76:in `receive'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:50:in `wait'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid.rb:141:in `suspend'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:41:in `response'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:45:in `value'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/celluloid-0.17.3/lib/celluloid/proxy/sync.rb:22:in `method_missing'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/client.rb:82:in `run_loop'
   /Users/danmiller/.rvm/gems/ruby-2.5.0/gems/slack-ruby-client-0.13.0/lib/slack/real_time/concurrency/celluloid.rb:72:in `block in start_async'

@danmilleruk
Copy link

Also tested on a Centos 7 server with the same results, so it's not OSX specific.

@dblock
Copy link
Collaborator

dblock commented Sep 29, 2018

I can reproduce.

This is specific to celluloid and is caused by the replacement of the Actor by a Thread in slack-ruby/slack-ruby-client#224. I am confused though to why this is happening, as the synchronous slack-ruby-client examples without the bot wrappers work fine.

That was done entirely to make specs happy, so I am going to try and undo this in slack-ruby/slack-ruby-client#228 and work around that problem.

@dblock
Copy link
Collaborator

dblock commented Sep 30, 2018

Anyone care to try my branch?

gem 'slack-ruby-client', github: 'dblock/slack-ruby-client', branch: 'undo-224'

@dblock dblock added confirmed bug and removed bug? labels Sep 30, 2018
@dblock dblock changed the title Couldn't cleanly terminate all actors in 10 seconds! Couldn't cleanly terminate all actors in 10 seconds w/ celluloid-io Sep 30, 2018
@danmilleruk
Copy link

Thanks @dblock, that looks to work perfectly now.

@dblock
Copy link
Collaborator

dblock commented Sep 30, 2018

I released 0.13.2. I don't think we need to update the minimal version of slack-ruby-bot since it just affects celluloid. Everyone on this thread should bundle update slack-ruby-client.

@dblock dblock closed this as completed Sep 30, 2018
@azin634
Copy link
Author

azin634 commented Oct 1, 2018

Thank you both for the help! We updated to the latest and its working for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants