Skip to content

UnboundMethod#arity compatibility issue with Ruby 3.4.4 causes deployment failures #4

@SeanLF

Description

@SeanLF

Description of the issue

After upgrading from Ruby 3.4.3 to 3.4.4, my Sinatra application fails to start with Falcon when deployed via Dokku. The failure occurs specifically in UnboundMethod#arity inside async-service gem.

Environment

  • Ruby version: 3.4.4
  • async-service gem version: 0.13.0
  • async-container gem version: 0.24.0
  • falcon gem version: 0.51.1
  • Deployment: Dokku (container-based)

Error details

The application fails during initialization with the following error:

-----> Executing 2 healthchecks
       Running healthcheck name='web check' delay=0 path='/health/ready' retries=9 timeout=5 type='path'
       Running healthcheck name='port listening check' attempts=3 port=5000 retries=2 timeout=5 type='listening' wait=5
remote:  !     Failure in name='web check': Get "http://172.17.0.5:5000/health/ready": dial tcp 172.17.0.5:5000: connect: connection refused
       Healthcheck succeeded name='port listening check'
04a9a989668db9f48ebf9be034cabc39b15c59d498d78d54f37612f6586e8665
remote:  !     Could not start due to 1 failed checks (web.1)
=====> Start of *********** container output (04a9a989668d web.1)
       {"time":"2025-05-17T23:18:59+00:00","severity":"info","oid":1024,"pid":12,"subject":"Falcon::Command::Host","message":"Falcon Host v0.51.1 taking flight!\n- Configuration: falcon.rb\n- To terminate: Ctrl-C or kill 12\n- To reload: kill -HUP 12\n"}
       {"time":"2025-05-17T23:19:00+00:00","severity":"info","oid":1032,"pid":12,"subject":"Async::Container::Notify::Console","message":{"status":"Initializing controller..."}}
       {"time":"2025-05-17T23:19:00+00:00","severity":"info","oid":1048,"pid":12,"subject":"Falcon::Service::Server","message":"Preloading preload.rb..."}
       {"time":"2025-05-17T23:19:00+00:00","severity":"info","oid":1048,"pid":12,"subject":"Falcon::Service::Server","message":"Starting app on #<Async::HTTP::Endpoint http://0.0.0.0:5000/ {protocol: Async::HTTP::Protocol::HTTP11}>"}
       {"time":"2025-05-17T23:19:00+00:00","severity":"info","oid":1224,"pid":12,"subject":"Async::Service::Controller","message":"Controller starting..."}
       {"time":"2025-05-17T23:19:00+00:00","severity":"info","oid":1248,"pid":12,"subject":"Async::Container::Group","message":"Sending terminate to 1 running processes..."}
       {"time":"2025-05-17T23:19:01+00:00","severity":"error","oid":1232,"pid":164,"subject":"Async::Container::Forked::Child","message":"SIGTERM","event":{"type":"failure","root":"/app","class":"Async::Container::Terminate","message":"SIGTERM","backtrace":["/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:105:in 'Thread#raise'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:105:in 'block (3 levels) in Async::Container::Forked::Child.fork'","/app/vendor/bundle/ruby/3.4.0/gems/async-service-0.13.0/lib/async/service/environment.rb:125:in 'UnboundMethod#arity'","/app/vendor/bundle/ruby/3.4.0/gems/async-service-0.13.0/lib/async/service/environment.rb:125:in 'block in Async::Service::Environment::Evaluator.wrap'","/app/vendor/bundle/ruby/3.4.0/gems/async-service-0.13.0/lib/async/service/environment.rb:121:in 'Array#each'","/app/vendor/bundle/ruby/3.4.0/gems/async-service-0.13.0/lib/async/service/environment.rb:121:in 'Async::Service::Environment::Evaluator.wrap'","/app/vendor/bundle/ruby/3.4.0/gems/async-service-0.13.0/lib/async/service/environment.rb:171:in 'Async::Service::Environment#evaluator'","/app/vendor/bundle/ruby/3.4.0/gems/falcon-0.51.1/lib/falcon/service/server.rb:59:in 'block in Falcon::Service::Server#setup'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:110:in 'block (3 levels) in Async::Container::Forked::Child.fork'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:109:in 'Thread.handle_interrupt'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:109:in 'block (2 levels) in Async::Container::Forked::Child.fork'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:102:in 'Process.fork'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:102:in 'block in Async::Container::Forked::Child.fork'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:146:in 'Async::Container::Forked::Child#initialize'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:101:in 'Class#new'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:101:in 'Async::Container::Forked::Child.fork'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/forked.rb:262:in 'Async::Container::Forked#start'","/app/vendor/bundle/ruby/3.4.0/gems/async-container-0.24.0/lib/async/container/generic.rb:176:in 'block in Async::Container::Generic#spawn'"]}}
       {"time":"2025-05-17T23:19:01+00:00","severity":"error","oid":1256,"pid":12,"subject":"Async::Container::Forked","status":"pid 164 exit 1"}
=====> End of ********* container output (04a9a989668d web.1)
remote: parallel: This job failed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions