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

ddtrace breaks Dir.glob on gcsfuse filesystems #3450

Closed
dbuckley opened this issue Feb 8, 2024 · 4 comments
Closed

ddtrace breaks Dir.glob on gcsfuse filesystems #3450

dbuckley opened this issue Feb 8, 2024 · 4 comments
Labels
bug Involves a bug community Was opened by a community member

Comments

@dbuckley
Copy link

dbuckley commented Feb 8, 2024

Current behaviour

irb(main):001:0> Dir.ancestors
=> [Dir, Enumerable, ActiveSupport::Dependencies::ZeitwerkIntegration::RequireDependency, Datadog::Profiling::Ext::Forking::Kernel, ActiveSupport::ForkTracker::CoreExtPrivate, ActiveSupport::ForkTracker::CoreExt, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, Delayed::MessageSending, PP::ObjectMixin, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Dependencies::Loadable, ActiveSupport::Tryable, Kernel, BasicObject]
irb(main):002:0> Dir.glob('/gcsfuse/t*')
=> []

Expected behaviour

irb(main):001:0> Dir.ancestors
=> [Dir, Enumerable, ActiveSupport::Dependencies::ZeitwerkIntegration::RequireDependency, ActiveSupport::ForkTracker::CoreExtPrivate, ActiveSupport::ForkTracker::CoreExt, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, Delayed::MessageSending, PP::ObjectMixin, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Dependencies::Loadable, ActiveSupport::Tryable, Kernel, BasicObject]
irb(main):002:0> Dir.glob('/gcsfuse/t*')
=> ["/gcsfuse/test.html", "/gcsfuse/test.txt"]

Steps to reproduce
Mount bucket via gcsfuse, load rails with ddtrace, call Dir.glob on any path under the gcsfuse mount point (other fs work as expected).

Environment

  • ddtrace version: 1.20.0
  • Configuration block (Datadog.configure ...):
Datadog.configure do |c|
 if (service_name = ENV["DD_SERVICE"])
   c.tracing.instrument :rails, service_name: service_name
   c.env = ENV.fetch("DD_ENV")
 end
end
  • Ruby version: 2.7.7
  • Operating system: Debian 11
  • Relevant library versions: Rails 6.1.7.6
@dbuckley dbuckley added bug Involves a bug community Was opened by a community member labels Feb 8, 2024
@ivoanjo
Copy link
Member

ivoanjo commented Mar 7, 2024

Hey! 👋

This is a really interesting issue -- I wouldn't expect ddtrace to have any impact on globbing; we don't particularly monkey patch anything related to accessing files.

Can you reproduce this outside a Rails app? And are you enabling any other features (profiling, asm, etc) via environment variables, or are you only setting up distributed tracing?

@ivoanjo
Copy link
Member

ivoanjo commented Mar 8, 2024

Oh, I just spotted there's a support ticket about this. Let's focus the debugging there, so I'm going to go ahead and close this issue :)

@ivoanjo ivoanjo closed this as completed Mar 8, 2024
@ivoanjo
Copy link
Member

ivoanjo commented Jun 14, 2024

As a record, here's some details about this:

We're also preparing a better fix that will be applied automatically.

@TonyCTHsu
Copy link
Contributor

TonyCTHsu commented Jul 11, 2024

👋 @dbuckley We just released v2.2.0. Give it a try!

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

No branches or pull requests

3 participants