argobots icon indicating copy to clipboard operation
argobots copied to clipboard

dump of ULTs stacks only works one time for the same execution context

Open bfaccini opened this issue 1 year ago • 2 comments

Trying to dump ULTs stacks by calling ABT_info_trigger_print_all_thread_stacks() in DAOS code, I have found that this can only be done one time in a same process/execution context.

The reason of such buggy behaviour is that, in ABTI_info_check_print_all_thread_stacks(), a NULL/0 test of the return value of the ABTD_atomic_fetch_sub_int() function, basically doing an atomic_fetch_sub(), applied to the print_stack_barrier atomic variable where the number of previously "parked" XStreams (to stop all ABT-related activity during execution of all ULTs stacks dump in the context of an elected “master” XStream) is used to detect when the print_stack_flag can be reset to PRINT_STACK_FLAG_UNSET to allow for a next dump to be started.

The problem is that 1 should be tested instead of 0, since the atomic_fetch_sub() returned value is the one BEFORE the sub not after !

bfaccini avatar Aug 31 '23 13:08 bfaccini

PR-394 should fix.

bfaccini avatar Aug 31 '23 14:08 bfaccini

This has been fixed with the PR #397 . @yfguo , please could you close this ticket.

knard-intel avatar Jun 18 '24 06:06 knard-intel