fix(profiling): make GenInfo::create non-recursive#17548
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intoApr 27, 2026
Merged
Conversation
Contributor
Author
|
@codex review |
Codeowners resolved as |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
849e827 to
edd7420
Compare
Contributor
🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 180139b | Docs | Datadog PR Page | Give us feedback! |
edd7420 to
566a997
Compare
1c83381 to
6f6af88
Compare
6f6af88 to
180139b
Compare
r1viollet
approved these changes
Apr 27, 2026
r1viollet
left a comment
Contributor
There was a problem hiding this comment.
LGTM,
thanks for looking into this and iterating on proposals
brettlangdon
pushed a commit
that referenced
this pull request
Apr 29, 2026
## Description This PR fixes the [following crash](https://app.datadoghq.com/error-tracking/issue/a7910426-126f-11f1-8982-da7ad0900002) that is still happening in recent versions of `ddtrace` and that we attribute to small max stack sizes in certain circumstances. The updated version has the same behaviour without needing recursion, at the cost of having to reverse the container before returning. ``` Error UnixSignal: Process terminated with SEGV_MAPERR (SIGSEGV) #0 0x00007fc46c0e8b5a GenInfo::create_impl #1 0x00007fc46c0e8c28 GenInfo::create_impl #2 0x00007fc46c0e8c28 GenInfo::create_impl #3 0x00007fc46c0e8c28 GenInfo::create_impl #4 0x00007fc46c0e8c28 GenInfo::create_impl #5 0x00007fc46c0e8d2e GenInfo::create #6 0x00007fc46c0e8da3 TaskInfo::create_impl #7 0x00007fc46c0e8f90 TaskInfo::create #8 0x00007fc46c0e911c ThreadInfo::get_all_tasks #9 0x00007fc46c0e97e2 ThreadInfo::unwind_tasks #10 0x00007fc46c0edb21 ThreadInfo::sample #11 0x00007fc46c0edc50 std::_Function_handler<void (_ts*, ThreadInfo&), Datadog::Sampler::sampling_thread(unsigned long)::{lambda(InterpreterInfo&)#1}::operator()(InterpreterInfo&) const::{lambda(_ts*, ThreadInfo&)#1}>::_M_invoke #12 0x00007fc46c0ea8d0 for_each_thread #13 0x00007fc46c0ea968 std::_Function_handler<void (InterpreterInfo&), Datadog::Sampler::sampling_thread(unsigned long)::{lambda(InterpreterInfo&)#1}>::_M_invoke #14 0x00007fc46c0e76ad for_each_interp #15 0x00007fc46c0ead36 Datadog::Sampler::sampling_thread #16 0x00007fc46c0eaf9d call_sampling_thread #17 0x00007fc46eef0ea7 start_thread #18 0x00007fc46f006adf clone ``` Co-authored-by: thomas.kowalski <thomas.kowalski@datadoghq.com>
emmettbutler
pushed a commit
that referenced
this pull request
May 6, 2026
## Description This PR fixes the [following crash](https://app.datadoghq.com/error-tracking/issue/a7910426-126f-11f1-8982-da7ad0900002) that is still happening in recent versions of `ddtrace` and that we attribute to small max stack sizes in certain circumstances. The updated version has the same behaviour without needing recursion, at the cost of having to reverse the container before returning. ``` Error UnixSignal: Process terminated with SEGV_MAPERR (SIGSEGV) #0 0x00007fc46c0e8b5a GenInfo::create_impl #1 0x00007fc46c0e8c28 GenInfo::create_impl #2 0x00007fc46c0e8c28 GenInfo::create_impl #3 0x00007fc46c0e8c28 GenInfo::create_impl #4 0x00007fc46c0e8c28 GenInfo::create_impl #5 0x00007fc46c0e8d2e GenInfo::create #6 0x00007fc46c0e8da3 TaskInfo::create_impl #7 0x00007fc46c0e8f90 TaskInfo::create #8 0x00007fc46c0e911c ThreadInfo::get_all_tasks #9 0x00007fc46c0e97e2 ThreadInfo::unwind_tasks #10 0x00007fc46c0edb21 ThreadInfo::sample #11 0x00007fc46c0edc50 std::_Function_handler<void (_ts*, ThreadInfo&), Datadog::Sampler::sampling_thread(unsigned long)::{lambda(InterpreterInfo&)#1}::operator()(InterpreterInfo&) const::{lambda(_ts*, ThreadInfo&)#1}>::_M_invoke #12 0x00007fc46c0ea8d0 for_each_thread #13 0x00007fc46c0ea968 std::_Function_handler<void (InterpreterInfo&), Datadog::Sampler::sampling_thread(unsigned long)::{lambda(InterpreterInfo&)#1}>::_M_invoke #14 0x00007fc46c0e76ad for_each_interp #15 0x00007fc46c0ead36 Datadog::Sampler::sampling_thread #16 0x00007fc46c0eaf9d call_sampling_thread #17 0x00007fc46eef0ea7 start_thread #18 0x00007fc46f006adf clone ``` Co-authored-by: thomas.kowalski <thomas.kowalski@datadoghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the following crash that is still happening in recent versions of
ddtraceand that we attribute to small max stack sizes in certain circumstances. The updated version has the same behaviour without needing recursion, at the cost of having to reverse the container before returning.