Skip to content

Commit 5474cf7

Browse files
committed
Fix GH-5278
1 parent 9d32011 commit 5474cf7

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

ext-src/php_swoole_library.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
/* $Id: 51d60adcf7beee32ef614c349fdd4a65ea2f3faf */
17+
/* $Id: 4d81858f42a199c1e7a68e13357dbe793da9e9e8 */
1818

1919
#ifndef SWOOLE_LIBRARY_H
2020
#define SWOOLE_LIBRARY_H
@@ -9570,9 +9570,10 @@ static const char* swoole_library_source_core_coroutine_functions =
95709570
"{\n"
95719571
" $all_coroutines = Coroutine::listCoroutines();\n"
95729572
" $count = Coroutine::stats()['coroutine_num'];\n"
9573-
" echo \"\\n===================================================================\",\n"
9574-
" \"\\n [FATAL ERROR]: all coroutines (count: {$count}) are asleep - deadlock!\",\n"
9575-
" \"\\n===================================================================\\n\";\n"
9573+
" echo \"\\n ===================================================================\",\n"
9574+
" \"\\n [FATAL ERROR]: all coroutines (count: {$count}) are asleep - deadlock!\",\n"
9575+
" \"\\n ===================================================================\",\n"
9576+
" \"\\n \";\n"
95769577
"\n"
95779578
" $options = Coroutine::getOptions();\n"
95789579
" if (empty($options['deadlock_check_disable_trace'])) {\n"
@@ -9581,9 +9582,9 @@ static const char* swoole_library_source_core_coroutine_functions =
95819582
" $depth = empty($options['deadlock_check_depth']) ? 32 : intval($options['deadlock_check_depth']);\n"
95829583
" foreach ($all_coroutines as $cid) {\n"
95839584
" echo \"\\n [Coroutine-{$cid}]\";\n"
9584-
" echo \"\\n--------------------------------------------------------------------\\n\";\n"
9585+
" echo \"\\n --------------------------------------------------------------------\\n\";\n"
95859586
" echo Coroutine::printBackTrace($cid, DEBUG_BACKTRACE_IGNORE_ARGS, $depth);\n"
9586-
" echo \"\\n\";\n"
9587+
" echo \"\\n \";\n"
95879588
" $index++;\n"
95889589
" // limit the number of maximum outputs\n"
95899590
" if ($index >= $limit) {\n"

ext-src/swoole_coroutine.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,10 @@ void PHPCoroutine::deadlock_check() {
477477
if (SWOOLE_G(enable_library)) {
478478
zend::function::call(R"(\Swoole\Coroutine\deadlock_check)", 0, nullptr);
479479
} else {
480-
printf("\n==================================================================="
481-
"\n [FATAL ERROR]: all coroutines (count: %lu) are asleep - deadlock!"
482-
"\n===================================================================\n",
480+
printf("\n ==================================================================="
481+
"\n [FATAL ERROR]: all coroutines (count: %lu) are asleep - deadlock!"
482+
"\n ==================================================================="
483+
"\n ",
483484
Coroutine::count());
484485
}
485486
}

0 commit comments

Comments
 (0)