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

`synchronize': can't be called from trap context (ThreadError) #565

Open
aaronjensen opened this issue Dec 21, 2022 · 0 comments
Open

`synchronize': can't be called from trap context (ThreadError) #565

aaronjensen opened this issue Dec 21, 2022 · 0 comments

Comments

@aaronjensen
Copy link

This particular warning happens in a Rails app when using Puma. I don't know that there is anything that Puma or Rails can do differently here to prevent this from happening, but I will report it in Rails as well (perhaps stopping listener in a finalizer is just wrong because of this). I believe it's happening when Puma is stopping a thread and a GC happens. The rest of the stack trace was application code, so it was clearly a signal.

my-app/gems/ruby/3.1.0/gems/actionview-7.0.4/lib/action_view/helpers/tag_helper.rb:189: warning: Exception in finalizer #<Proc:0x000000010852fb80 my-app/gems/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/evented_file_update_checker.rb:91>
my-app/gems/ruby/3.1.0/gems/listen-3.7.1/lib/listen/fsm.rb:80:in `synchronize': can't be called from trap context (ThreadError)
        from my-app/gems/ruby/3.1.0/gems/listen-3.7.1/lib/listen/fsm.rb:80:in `transition!'
        from my-app/gems/ruby/3.1.0/gems/listen-3.7.1/lib/listen/fsm.rb:104:in `transition_with_callbacks!'
        from my-app/gems/ruby/3.1.0/gems/listen-3.7.1/lib/listen/fsm.rb:72:in `transition'
        from my-app/gems/ruby/3.1.0/gems/listen-3.7.1/lib/listen/listener.rb:103:in `stop'
        from my-app/gems/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/evented_file_update_checker.rb:111:in `stop'
        from my-app/gems/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/evented_file_update_checker.rb:92:in `block in finalizer'
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

1 participant