Skip to content

chore(libdatadog): turn on collecting all threads#5724

Merged
gyuheon0h merged 4 commits into
masterfrom
gyuheon0h/turn-on-all-threads
May 11, 2026
Merged

chore(libdatadog): turn on collecting all threads#5724
gyuheon0h merged 4 commits into
masterfrom
gyuheon0h/turn-on-all-threads

Conversation

@gyuheon0h

@gyuheon0h gyuheon0h commented May 9, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?
Crashtracking now allows collection of all threads for crash reports. We should turn it on.

Motivation:

Change log entry
N/A

Additional Notes:

How to test the change?

{
  "counters": {
    "profiler_unwinding": 0,
    "profiler_serializing": 0,
    "profiler_collecting_sample": 0,
    "profiler_inactive": 0
  },
  "data_schema_version": "1.7",
  "error": {
    "is_crash": true,
    "kind": "UnixSignal",
    "message": "Process terminated with SEGV_MAPERR (SIGSEGV)",
    "thread_name": "ruby3.0",
    "source_type": "Crashtracking",
    "stack": {
      "format": "Datadog Crashtracker 1.0",
      "frames": [
        {
          "ip": "0x77acca55bb19",
          "module_base_address": "0x77acca4b5000",
          "sp": "0x7ffc2891d648",
          "symbol_address": "0x77acca55bb10",
          "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
          "build_id_type": "GNU",
          "file_type": "ELF",
          "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
          "relative_address": "0x00000000000a6b19",
          "column": 10,
          "file": "./malloc/malloc.c",
          "function": "__malloc_usable_size",
          "line": 5141
        },
        ...
        {
          "ip": "0x605eebd6a1c5",
          "module_base_address": "0x605eebd69000",
          "sp": "0x7ffc28920bd0",
          "symbol_address": "0x605eebd6a1a0",
          "build_id": "d370348709ffc775a462d34f8be84120b62b0c97",
          "build_id_type": "GNU",
          "file_type": "ELF",
          "path": "/usr/bin/ruby3.0",
          "relative_address": "0x00000000000011c5",
          "function": "_start"
        }
      ],
      "incomplete": false
    },
    "threads": {
      "threads": [
        {
          "crashed": false,
          "name": "test-thread-1",
          "stack": {
            "format": "Datadog Crashtracker 1.0",
            "frames": [
              {
                "ip": "0x77acca546117",
                "sp": "0x77acc50d3620",
                "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
                "build_id_type": "GNU",
                "file_type": "ELF",
                "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
                "relative_address": "0x0000000000091117",
                "column": 10,
                "file": "./nptl/futex-internal.c",
                "function": "__GI___futex_abstimed_wait_cancelable64",
                "line": 139
              },
              ...
              {
                "ip": "0x77acca549ac3",
                "sp": "0x77acc51d3e60",
                "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
                "build_id_type": "GNU",
                "file_type": "ELF",
                "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
                "relative_address": "0x0000000000094ac3",
                "column": 8,
                "file": "./nptl/pthread_create.c",
                "function": "start_thread",
                "line": 442
              },
              {
                "ip": "0x77acca5db8c0",
                "sp": "0x77acc51d3f00",
                "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
                "build_id_type": "GNU",
                "file_type": "ELF",
                "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
                "relative_address": "0x00000000001268c0",
                "column": 0,
                "file": "./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S",
                "function": "__clone3",
                "line": 83
              }
            ],
            "incomplete": false
          },
          "state": "S"
        },
        {
          "crashed": false,
          "name": "test-thread-2",
          "stack": {
            "format": "Datadog Crashtracker 1.0",
            "frames": [
              {
                "ip": "0x77acca546117",
                "sp": "0x77acc52d4620",
                "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
                "build_id_type": "GNU",
                "file_type": "ELF",
                "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
                "relative_address": "0x0000000000091117",
                "column": 10,
                "file": "./nptl/futex-internal.c",
                "function": "__GI___futex_abstimed_wait_cancelable64",
                "line": 139
              },
             ...
              {
                "ip": "0x77acca549ac3",
                "sp": "0x77acc53d4e60",
                "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
                "build_id_type": "GNU",
                "file_type": "ELF",
                "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
                "relative_address": "0x0000000000094ac3",
                "column": 8,
                "file": "./nptl/pthread_create.c",
                "function": "start_thread",
                "line": 442
              },
              {
                "ip": "0x77acca5db8c0",
                "sp": "0x77acc53d4f00",
                "build_id": "4f7b0c955c3d81d7cac1501a2498b69d1d82bfe7",
                "build_id_type": "GNU",
                "file_type": "ELF",
                "path": "/usr/lib/x86_64-linux-gnu/libc.so.6",
                "relative_address": "0x00000000001268c0",
                "column": 0,
                "file": "./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S",
                "function": "__clone3",
                "line": 83
              }
            ],
            "incomplete": false
          },
          "state": "S"
        }
      ],
      "count": 2,
      "incomplete": false
    }
  },
  "experimental": {
    "runtime_stack": {
      "format": "Datadog Runtime Callback 1.0",
      "frames": [
        {
          "file": "<C extension>",
          "function": "free"
        },
        {
          "file": "/home/bits/go/src/github.com/DataDog/dd-trace-rb/spec/datadog/core/crashtracking/component_spec.rb",
          "function": "<top (required)>",
          "line": 287
        },
       ...
        {
          "file": "/var/lib/gems/3.0.0/gems/rspec-core-3.13.6/exe/rspec",
          "function": "<top (required)>",
          "line": 4
        },
        {
          "file": "<C extension>",
          "function": "load"
        },
        {
          "file": "/usr/local/bin/rspec",
          "function": "<main>",
          "line": 25
        }
      ]
    }
  },
  "files": {
    "/proc/self/maps": [
      "605eebd69000-605eebd6a000 r--p 00000000 00:33 1067653                    /usr/bin/ruby3.0",
      ...
      "ffffffffff600000-ffffffffff601000 --xp 00000000 00:00 0                  [vsyscall]",
      ""
    ]
  },
  "incomplete": false,
  "metadata": {
    "library_name": "dd-trace-rb",
    "library_version": "2.33.0",
    "family": "ruby",
    "tags": [
      "tag1:value1",
      "tag2:value2",
      "language:ruby-testing-123",
      "service:ruby-testing-123"
    ]
  },
  "os_info": {
    "architecture": "x86_64",
    "bitness": "64-bit",
    "os_type": "Ubuntu",
    "version": "22.4.0"
  },
  "proc_info": {
    "pid": 3378017,
    "tid": 3378017
  },
  "sig_info": {
    "si_addr": "0x0000000000000022",
    "si_code": 1,
    "si_code_human_readable": "SEGV_MAPERR",
    "si_signo": 11,
    "si_signo_human_readable": "SIGSEGV"
  },
  "timestamp": "2026-05-09 06:10:31.076849895 UTC",
  "ucontext": {
    "arch": "x86_64",
    "registers": {
      "r9": "0x0000000000000000",
      "rbx": "0x0000000055550083",
      "rsi": "0x0000000000000000",
      "rip": "0x000077acca55bb19",
      "rcx": "0x000077acc69b9580",
      "rdx": "0x000077acc9f07c40",
      "rsp": "0x00007ffc2891d648",
      "rax": "0x0000605f0b1d3ba0",
      "rdi": "0x000000000000002a",
      "r13": "0x0000605f0b1d6220",
      "r11": "0x0000000000000001",
      "r8": "0x0000000000000000",
      "r10": "0x0000605f0e1eced0",
      "r12": "0x0000605f0c3efb40",
      "r15": "0x000077acca006018",
      "rbp": "0x000000000000002a",
      "r14": "0x0000000000000001"
    },
    "raw": "ucontext_t { uc_flags: 7, uc_link: 0x0, uc_stack: stack_t { ss_sp: 0x605f0b2cb900, ss_flags: 0, ss_size: 16384 }, uc_mcontext: mcontext_t { gregs: [0, 0, 105961375059664, 1, 105961343613760, 105961324634656, 1, 131584007102488, 42, 0, 42, 1431634051, 131584006061120, 105961324624800, 131583950165376, 140720989132360, 131584012696345, 66050, 12103423998558259, 4, 14, 0, 34], fpregs: 0x605f0b2cee40, __private: [0, 0, 0, 0, 0, 0, 0, 0] }, uc_sigmask: sigset_t { __val: [0, 11, 1, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, __private: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 31, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 252, 108, 202, 172, 119, 0, 0, 224, 252, 108, 202, 172, 119, 0, 0, 224, 202, 13, 14, 95, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 208, 213, 145, 40, 252, 127, 0, 0, 208, 213, 145, 40, 252, 127, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 224, 252, 108, 202, 172, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 123, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 208, 119, 227, 13, 95, 96, 0, 0, 168, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 88, 80, 70, 140, 10, 0, 0, 255, 2, 0, 0, 0, 0, 0, 0, 136, 10, 0, 0, 0, 0, 0, 0], __ssp: [0, 0, 0, 675] }"
  },
  "uuid": "2f44e4de-c3bb-471d-a04e-b37d3a16609d"
}

@dd-octo-sts

dd-octo-sts Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

👋 Hey @DataDog/ruby-guild, please fill "Change log entry" section in the pull request description.

If changes need to be present in CHANGELOG.md you can state it this way

**Change log entry**

Yes. A brief summary to be placed into the CHANGELOG.md

(possible answers Yes/Yep/Yeah)

Or you can opt out like that

**Change log entry**

None.

(possible answers No/Nope/None)

Visited at: 2026-05-11 12:49:56 UTC

gyuheon0h commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gyuheon0h gyuheon0h changed the title Turn on collecting all threads chore(libdatadog): turn on collecting all threads May 9, 2026
@gyuheon0h
gyuheon0h force-pushed the gyuheon0h/turn-on-all-threads branch from fed7238 to a48acfe Compare May 9, 2026 06:13
@gyuheon0h
gyuheon0h marked this pull request as ready for review May 9, 2026 06:14
@gyuheon0h
gyuheon0h requested review from a team as code owners May 9, 2026 06:14
@pr-commenter

pr-commenter Bot commented May 9, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-11 13:33:31

Comparing candidate commit a0e8581 in PR branch gyuheon0h/turn-on-all-threads with baseline commit bc0b74d in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Base automatically changed from gyuheon0h/bump-libdatadog-v33 to master May 11, 2026 12:49
@gyuheon0h
gyuheon0h enabled auto-merge (squash) May 11, 2026 12:53
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented May 11, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 97.13% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a0e8581 | Docs | Datadog PR Page | Give us feedback!

@gyuheon0h
gyuheon0h merged commit 0421597 into master May 11, 2026
585 checks passed
@gyuheon0h
gyuheon0h deleted the gyuheon0h/turn-on-all-threads branch May 11, 2026 13:44
@dd-octo-sts dd-octo-sts Bot added this to the 2.33.0 milestone May 11, 2026
@Strech Strech mentioned this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants