summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorMasataka Pocke Kuwabara <kuwabara@pocke.me>2025-02-14 16:31:58 +0900
committerGitHub <noreply@github.com>2025-02-14 16:31:58 +0900
commit0cab608d3a7791c229eea2ebe276494f063c8176 (patch)
treea2d4bf5612a61b794de0bbf84df48d404b1ac33c /thread.c
parentb4ed6db096b5876b547646307aa41e008fdca8ea (diff)
[Bug #21127] Thread deadlock does not display backtraces (#12721)
Previously, Ruby displayed backtraces for each thread on deadlock. However, it has not been shown since Ruby 3.0. It should display the backtrace for debugging. Co-authored-by: Jeremy Evans <code@jeremyevans.net>
Notes
Notes: Merged-By: pocke <p.ck.t22@gmail.com>
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index c4e304231d..359671ba9e 100644
--- a/thread.c
+++ b/thread.c
@@ -5588,7 +5588,7 @@ debug_deadlock_check(rb_ractor_t *r, VALUE msg)
}
}
rb_str_catf(msg, "\n ");
- rb_str_concat(msg, rb_ary_join(rb_ec_backtrace_str_ary(th->ec, 0, 0), sep));
+ rb_str_concat(msg, rb_ary_join(rb_ec_backtrace_str_ary(th->ec, RUBY_BACKTRACE_START, RUBY_ALL_BACKTRACE_LINES), sep));
rb_str_catf(msg, "\n");
}
}