Skip to content

Commit a958df5

Browse files
committed
update(RSpec docs): update the backtrace debugging example for hanging CI node
1 parent 7803500 commit a958df5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docusaurus/docs/ruby/troubleshooting.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ Start logging 2 detected threads.
105105
Use the following backtrace(s) to find the line of code that got stuck if the CI node hung and terminated your tests.
106106
How to read the backtrace: https://knapsackpro.com/perma/ruby/backtrace-debugging
107107
108+
Hanging specs in the main thread:
109+
# highlight-start
110+
knapsack_pro-ruby/spec_integration/b_spec.rb:7:in `kill'
111+
# highlight-end
112+
knapsack_pro-ruby/spec_integration/b_spec.rb:7:in `block (3 levels) in <top (required)>'
113+
114+
115+
Non-main thread inspect: #<Thread:0x000000011e18f6e0 spec_integration/a_spec.rb:5 sleep>
116+
Hanging specs in non-main thread:
117+
# highlight-start
118+
knapsack_pro-ruby/spec_integration/a_spec.rb:6:in `sleep'
119+
# highlight-end
120+
knapsack_pro-ruby/spec_integration/a_spec.rb:6:in `block (3 levels) in <top (required)>'
121+
122+
108123
Main thread backtrace:
109124
knapsack_pro-ruby/lib/knapsack_pro/runners/queue/base_runner.rb:83:in `backtrace'
110125
knapsack_pro-ruby/lib/knapsack_pro/runners/queue/base_runner.rb:83:in `block in log_threads'
@@ -118,6 +133,7 @@ knapsack_pro-ruby/spec_integration/b_spec.rb:7:in `block (3 levels) in <top (req
118133
.rvm/gems/ruby-3.3.4/gems/rspec-core-3.13.0/lib/rspec/core/example.rb:263:in `instance_exec'
119134
...
120135
136+
121137
Non-main thread inspect: #<Thread:0x000000011e18f6e0 spec_integration/a_spec.rb:5 sleep>
122138
Non-main thread backtrace:
123139
# highlight-start

0 commit comments

Comments
 (0)