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

ThreadError: can't be called from trap context #39

Open
jsmestad opened this issue Sep 19, 2017 · 2 comments
Open

ThreadError: can't be called from trap context #39

jsmestad opened this issue Sep 19, 2017 · 2 comments

Comments

@jsmestad
Copy link
Contributor

I am not sure what is causing these errors, but maybe you can point me in the right direction. We get these errors once or twice a day (on the subscribe side). Any ideas what we are doing wrong?

ThreadError: can't be called from trap context
File "/app/vendor/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb" line 187 in lock
File "/app/vendor/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb" line 187 in mon_enter
File "/app/vendor/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb" line 212 in mon_synchronize
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/session.rb" line 530 in close_channel
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/channel.rb" line 236 in close
File "/app/vendor/bundle/ruby/2.4.0/gems/multiple_man-1.6.1/lib/multiple_man/runner.rb" line 31 in block in trap_signals!
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/consumer_work_pool.rb" line 77 in join
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/consumer_work_pool.rb" line 77 in block in join
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/consumer_work_pool.rb" line 77 in each
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/consumer_work_pool.rb" line 77 in join
File "/app/vendor/bundle/ruby/2.4.0/gems/bunny-2.7.0/lib/bunny/queue.rb" line 196 in subscribe
File "/app/vendor/bundle/ruby/2.4.0/gems/multiple_man-1.6.1/lib/multiple_man/consumers/general.rb" line 17 in listen
File "/app/vendor/bundle/ruby/2.4.0/gems/multiple_man-1.6.1/lib/multiple_man/runner.rb" line 19 in run
File "/app/vendor/bundle/ruby/2.4.0/gems/multiple_man-1.6.1/lib/multiple_man/tasks/worker.rake" line 4 in block (2 levels) in <top (required)>
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb" line 250 in block in execute
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb" line 250 in each
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb" line 250 in execute
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb" line 194 in block in invoke_with_call_chain
File "/app/vendor/ruby-2.4.1/lib/ruby/2.4.0/monitor.rb" line 214 in mon_synchronize
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb" line 187 in invoke_with_call_chain
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb" line 180 in invoke
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 152 in invoke_task
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 108 in block (2 levels) in top_level
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 108 in each
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 108 in block in top_level
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 117 in run_with_threads
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 102 in top_level
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 80 in block in run
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 178 in standard_exception_handling
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb" line 77 in run
File "/app/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake" line 27 in <top (required)>
File "/app/vendor/bundle/ruby/2.4.0/bin/rake" line 23 in load
File "/app/vendor/bundle/ruby/2.4.0/bin/rake" line 23 in <top (required)>
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb" line 74 in load
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb" line 74 in kernel_load
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb" line 27 in run
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb" line 360 in exec
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb" line 27 in run
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb" line 126 in invoke_command
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb" line 369 in dispatch
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb" line 20 in dispatch
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb" line 444 in start
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb" line 10 in start
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle" line 30 in block in <top (required)>
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb" line 121 in with_friendly_errors
File "/app/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle" line 22 in <top (required)>
File "/app/bin/bundle" line 3 in load
File "/app/bin/bundle" line 3 in <main>
@bradrobertson
Copy link
Contributor

Ya I just noticed this also. It seems to be from this commit. It's coming from Bunny itself so I'll have to see why you can't close a channel inside a Signal.trap

@cjea
Copy link

cjea commented Jun 20, 2018

any update on this?

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

No branches or pull requests

3 participants