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

Profiler broken on ruby-head (after preview2) with "RuntimeError pthread_id_for() self-test failed" #3208

Closed
ivoanjo opened this issue Oct 20, 2023 · 2 comments
Assignees
Labels
bug Involves a bug community Was opened by a community member

Comments

@ivoanjo
Copy link
Member

ivoanjo commented Oct 20, 2023

Current behaviour

The profiler is broken on latest ruby-head:

$ ruby -v
ruby 3.3.0dev (2023-10-20T07:33:23Z master 0061eaddc9) [x86_64-linux]

Failing with this issue:

W, [2023-10-20T10:43:58.474250 #74964] WARN -- ddtrace: [ddtrace] Profiling was requested but is not supported, profiling disabled: There was an error loading the profiling native extension due to 'RuntimeError pthread_id_for() self-test failed' at 'dd-trace-rb/lib/datadog/profiling.rb:111:in `native_working?''

This failure happens at run-time (when trying to enable the profiler) so it does not impact the application in any way, other than not having profiling.

Thus:

  • The app will continue to work fine
  • Other features of dd-trace-rb (tracing, asm, ...) will continue to work fine

Expected behaviour

Profiling should be working.

Steps to reproduce

Install dd-trace-rb and try to profile an app running on Ruby 3.3.

Environment

  • ddtrace version: master
  • Configuration block (Datadog.configure ...): N/A
  • Ruby version: ruby 3.3.0dev (2023-10-20T07:33:23Z master 0061eaddc9) [x86_64-linux]
  • Operating system: Ubuntu 22.04.3 LTS
  • Relevant library versions: N/A
@ivoanjo ivoanjo added bug Involves a bug community Was opened by a community member labels Oct 20, 2023
@ivoanjo
Copy link
Member Author

ivoanjo commented Oct 24, 2023

Good news! It looks like this issue is fixed by refreshing the Ruby VM headers from debase-ruby_core_source. So once they pick up the next Ruby release (probably -preview3 or -rc1), we'll be able to upgrade and should be able to run fine again on 3.3.

@ivoanjo ivoanjo self-assigned this Oct 31, 2023
@ivoanjo
Copy link
Member Author

ivoanjo commented Jan 11, 2024

This is fixed by #3284. For profiling Ruby 3.3.0, we recommend using the latest dd-trace-rb, which as of this writing is v1.19.0 :)

@ivoanjo ivoanjo closed this as completed Jan 11, 2024
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

1 participant