{"action":"created","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/2703","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/2703/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/2703/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/2703/events","html_url":"https://github.com/mperham/sidekiq/issues/2703","id":121135563,"number":2703,"title":"Sidekiq 3.5.3 on JRuby 9.0.0.0 raises Celluloid::TaskTerminated when terminating via `sidekiqctl stop`","user":{"login":"RUN-CMD","id":1405950,"avatar_url":"https://avatars.githubusercontent.com/u/1405950?v=3","gravatar_id":"","url":"https://api.github.com/users/RUN-CMD","html_url":"https://github.com/RUN-CMD","followers_url":"https://api.github.com/users/RUN-CMD/followers","following_url":"https://api.github.com/users/RUN-CMD/following{/other_user}","gists_url":"https://api.github.com/users/RUN-CMD/gists{/gist_id}","starred_url":"https://api.github.com/users/RUN-CMD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RUN-CMD/subscriptions","organizations_url":"https://api.github.com/users/RUN-CMD/orgs","repos_url":"https://api.github.com/users/RUN-CMD/repos","events_url":"https://api.github.com/users/RUN-CMD/events{/privacy}","received_events_url":"https://api.github.com/users/RUN-CMD/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-09T00:48:37Z","updated_at":"2015-12-09T17:29:48Z","closed_at":null,"body":"Executing `bundle exec sidekiqctl stop tmp/pids/sidekiq.pid` against a running sidekiq process' pid produces the following stacktrace, while otherise appearing to exit cleanly:\r\n\r\n```stacktrace\r\nCelluloid::TaskTerminated: task was terminated\r\n              suspend at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task.rb:75\r\n              suspend at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task.rb:11\r\n              suspend at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid.rb:139\r\n                 wait at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/condition.rb:58\r\n        block in stop at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/sidekiq-3.5.3/lib/sidekiq/launcher.rb:56\r\n             watchdog at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/sidekiq-3.5.3/lib/sidekiq/util.rb:16\r\n                 stop at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/sidekiq-3.5.3/lib/sidekiq/launcher.rb:48\r\n          public_send at org/jruby/RubyKernel.java:1824\r\n             dispatch at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/calls.rb:28\r\n             dispatch at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/call/sync.rb:16\r\n    block in dispatch at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/cell.rb:50\r\n        block in task at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/cell.rb:76\r\n        block in task at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/actor.rb:339\r\n  block in initialize at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task.rb:44\r\n      block in create at /Users/ksandwich/src/ruby_agent_playground/rails4/sidekiq/vendor/bundle/jruby/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task/fibered.rb:14\r\nSidekiq shut down gracefully.\r\n```\r\n\r\nIssue occurs on at least these JRubies:\r\n```\r\nruby -v\r\njruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64]\r\n```\r\n\r\n```\r\nruby -v\r\njruby 9.0.1.0 (2.2.2) 2015-09-02 583f336 Java HotSpot(TM) 64-Bit Server VM 25.25-b02 on 1.8.0_25-b17 +jit [darwin-x86_64]\r\n```\r\n\r\nAnd with these Rails:\r\n```\r\nrails -v\r\nRails 4.2.5\r\n```\r\n\r\n```\r\nrails -v\r\nRails 3.2.22\r\n```\r\n\r\nWith this Sidekiq:\r\n```\r\nack sidekiq Gemfile.lock \r\n    sidekiq (3.5.3)\r\n```\r\nWith this Celluloid:\r\n```\r\n    celluloid (0.17.2)\r\n      celluloid-essentials\r\n      celluloid-extras\r\n      celluloid-fsm\r\n      celluloid-pool\r\n      celluloid-supervision\r\n      timers (>= 4.1.1)\r\n    celluloid-essentials (0.20.5)\r\n      timers (>= 4.1.1)\r\n    celluloid-extras (0.20.5)\r\n      timers (>= 4.1.1)\r\n    celluloid-fsm (0.20.5)\r\n      timers (>= 4.1.1)\r\n    celluloid-pool (0.20.5)\r\n      timers (>= 4.1.1)\r\n    celluloid-supervision (0.20.5)\r\n      timers (>= 4.1.1)\r\n```\r\n\r\nSidekiq invocation: `bundle exec sidekiq -L log/sidekiq.log -P tmp/pids/sidekiq.pid &`\r\n\r\nIssue **does not occur** on:\r\n```\r\nruby -v\r\nruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]\r\n```"},"comment":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/comments/163332896","html_url":"https://github.com/mperham/sidekiq/issues/2703#issuecomment-163332896","issue_url":"https://api.github.com/repos/mperham/sidekiq/issues/2703","id":163332896,"user":{"login":"RUN-CMD","id":1405950,"avatar_url":"https://avatars.githubusercontent.com/u/1405950?v=3","gravatar_id":"","url":"https://api.github.com/users/RUN-CMD","html_url":"https://github.com/RUN-CMD","followers_url":"https://api.github.com/users/RUN-CMD/followers","following_url":"https://api.github.com/users/RUN-CMD/following{/other_user}","gists_url":"https://api.github.com/users/RUN-CMD/gists{/gist_id}","starred_url":"https://api.github.com/users/RUN-CMD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RUN-CMD/subscriptions","organizations_url":"https://api.github.com/users/RUN-CMD/orgs","repos_url":"https://api.github.com/users/RUN-CMD/repos","events_url":"https://api.github.com/users/RUN-CMD/events{/privacy}","received_events_url":"https://api.github.com/users/RUN-CMD/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T17:29:48Z","updated_at":"2015-12-09T17:29:48Z","body":"Our same test suite does not run into this issue on Sidekiq 4.\r\n\r\nI believe it's a timing issue in Launcher#stop between:\r\n```\r\n        fire_event(:shutdown, true)\r\n        @condvar.wait\r\n```\r\nThis code no longer exists in Sidekiq 4."}}