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

v1.21.0 causes outages due to a nil error in rack middleware #3538

Closed
ejoubaud opened this issue Mar 19, 2024 · 3 comments · Fixed by #3539
Closed

v1.21.0 causes outages due to a nil error in rack middleware #3538

ejoubaud opened this issue Mar 19, 2024 · 3 comments · Fixed by #3539
Labels
bug Involves a bug community Was opened by a community member
Milestone

Comments

@ejoubaud
Copy link

ejoubaud commented Mar 19, 2024

Current behaviour

Nil error in ddtrace rack middleware when requesting any page on a Rails 7.1.3.2 app.

Steps to reproduce

  • upgrade to 1.21.0
  • start rails app (rails server)
  • try to load any page
  • get the following error:
Puma caught this error: undefined method `+' for nil:NilClass (NoMethodError)
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/ddtrace-1.21.0/lib/datadog/tracing/contrib/rack/middlewares.rb:134:in `call'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-cors-2.0.2/lib/rack/cors.rb:102:in `call'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/webpacker-6.0.0.rc.6/lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-proxy-0.7.6/lib/rack/proxy.rb:87:in `call'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.3.2/lib/rails/engine.rb:536:in `call'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/configuration.rb:272:in `call'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/request.rb:100:in `block in handle_request'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/request.rb:99:in `handle_request'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/server.rb:464:in `process_client'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/server.rb:245:in `block in run'
/Users/ejoubaud/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in `block in spawn_thread'

Looks like it was introduced here

Note also the commented out # binding.pry in that commit

Environment

  • ddtrace version: 1.21.0
  • Configuration block (Datadog.configure ...): happens even when block is entirely removed
  • Ruby version: 3.2.2
  • Operating system: Mac, Linux
  • Relevant library versions:
@ejoubaud ejoubaud added bug Involves a bug community Was opened by a community member labels Mar 19, 2024
@ejoubaud ejoubaud changed the title v1.21.0 causes outages due to a nil error: undefined method +' for nil:NilClass (NoMethodError)` v1.21.0 causes outages due to a nil error: undefined method +' for nil:NilClass (NoMethodError) Mar 19, 2024
@ejoubaud ejoubaud changed the title v1.21.0 causes outages due to a nil error: undefined method +' for nil:NilClass (NoMethodError) v1.21.0 causes outages due to a nil error: undefined method '+' for nil:NilClass (NoMethodError) Mar 19, 2024
@ejoubaud ejoubaud changed the title v1.21.0 causes outages due to a nil error: undefined method '+' for nil:NilClass (NoMethodError) v1.21.0 causes outages due to a nil error in rack middleware Mar 19, 2024
@TonyCTHsu TonyCTHsu linked a pull request Mar 19, 2024 that will close this issue
2 tasks
@TonyCTHsu TonyCTHsu added this to the 1.21.1 milestone Mar 19, 2024
@ivoanjo
Copy link
Member

ivoanjo commented Mar 19, 2024

Hey! Sorry that you ran into this 😰. We're going to publish 1.21.1 ASAP with a revert of this change, since it clearly was not ready (#3539).

Thanks for the patience.

@ivoanjo
Copy link
Member

ivoanjo commented Mar 20, 2024

(We've merged a fix for this, and we're in the final validation steps before publishing a 1.21.1 release with the fix. Because a lot of folks seem to be bitten by this, I'll go ahead and reopen the issue until we actually put the release out so folks can easily find this ticket)

@ivoanjo ivoanjo reopened this Mar 20, 2024
@TonyCTHsu
Copy link
Contributor

👋 @ejoubaud 1.21.1 has been released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants