File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1136,6 +1136,8 @@ JL_DLLEXPORT void jl_print_backtrace(void) JL_NOTSAFEPOINT
11361136 jlbacktrace ();
11371137}
11381138
1139+ extern int gc_first_tid ;
1140+
11391141// Print backtraces for all live tasks, for all threads.
11401142// WARNING: this is dangerous and can crash if used outside of gdb, if
11411143// all of Julia's threads are not stopped!
@@ -1144,6 +1146,10 @@ JL_DLLEXPORT void jl_print_task_backtraces(int show_done) JL_NOTSAFEPOINT
11441146 size_t nthreads = jl_atomic_load_acquire (& jl_n_threads );
11451147 jl_ptls_t * allstates = jl_atomic_load_relaxed (& jl_all_tls_states );
11461148 for (size_t i = 0 ; i < nthreads ; i ++ ) {
1149+ // skip GC threads since they don't have tasks
1150+ if (gc_first_tid <= i && i < gc_first_tid + jl_n_gcthreads ) {
1151+ continue ;
1152+ }
11471153 jl_ptls_t ptls2 = allstates [i ];
11481154 arraylist_t * live_tasks = & ptls2 -> heap .live_tasks ;
11491155 size_t n = live_tasks -> len ;
You can’t perform that action at this time.
0 commit comments