Skip to content

Commit

Permalink
[PROF-7409] Document Ruby profiler incompatibility with rugged gem
Browse files Browse the repository at this point in the history
 ### What does this PR do?

This PR extends the troubleshooting steps added in #17370 with a new
known incompatiblity with the `rugged` gem.

(Originally reported in
DataDog/dd-trace-rb#2721 )

 ### Motivation

Document the known incompatibility.
  • Loading branch information
ivoanjo committed Apr 4, 2023
1 parent 596c312 commit f7ae707
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion content/en/profiler/profiler_troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ Starting from `dd-trace-rb` 1.11.0, the "CPU Profiling 2.0" profiler gathers dat
Sending `SIGPROF` is a common profiling approach, and may cause system calls from native extensions/libraries to be interrupted with a system [`EINTR` error code][8].
Rarely, native extensions or libraries called by them may have missing or incorrect error handling for the `EINTR` error code.

One known instance of this issue is when using the `mysql2` gem together with versions of libmysqlclient [older than 8.0.0][9]. The affected libmysqlclient version is known to be present on Ubuntu 18.04, but not 20.04 and later releases. For this case, the profiler auto-detects when the `mysql2` gem is in use and auto-applies the solution described below.
There are a few known instances of this issue. For these gems, the auto-detects the incompatibility and automatically applies the workaround documented below:
* Using the `mysql2` gem together with versions of libmysqlclient [older than 8.0.0][9]. The affected libmysqlclient version is known to be present on Ubuntu 18.04, but not 20.04 and later releases.
* [Using the `rugged` gem.][10]

If you encounter run-time failures or errors from Ruby gems that use native extensions, you can revert back to the legacy profiler which does not use `SIGPROF` signals. To revert to the legacy profiler, set the `DD_PROFILING_FORCE_ENABLE_LEGACY` environment variable to `true`, or in code:

Expand All @@ -262,6 +264,7 @@ Doing this enables Datadog to add them to the auto-detection list, and to work w
[7]: https://github.com/DataDog/dd-trace-rb/issues/1799
[8]: https://man7.org/linux/man-pages/man7/signal.7.html#:~:text=Interruption%20of%20system%20calls%20and%20library%20functions%20by%20signal%20handlers
[9]: https://bugs.mysql.com/bug.php?id=83109
[10]: https://github.com/DataDog/dd-trace-rb/issues/2721
{{< /programming-lang >}}
{{< programming-lang lang="dotnet" >}}

Expand Down

0 comments on commit f7ae707

Please sign in to comment.