You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
debug_printf(1, "initializing spindle for use with flux");
The problem is that the log message occurs before a call to setenv() (transferring the value of SPINDLE_TEST from the flux shell to the regular shell). The log message triggers initialization of the logging system, which checks for the SPINDLE_TEST environment variable, which isn't present, thus run_tests=0. After initialization completes and the message is logged, the remaining code in sp_init() executes, which includes setting SPINDLE_TEST=1. Subsequent processes see this different value and set up the test environment, but as the first process never did, the result is a hang.
In the two runs I looked at, only the smallest pid had run_test=0, which probably means flux calls sp_init() serially.
A simple solution is to move all of the setenv() code into flux_plugin_init() along with a note to not log anything until all calls to setenv() complete.
The text was updated successfully, but these errors were encountered:
rountree
changed the title
Logging before call to LOGGING_INIT in flux-spindle.c results in hang
Logging early in sp_init() causes hang.
Apr 21, 2025
This information log message in
flux-spindle.c
hangs.Spindle/src/flux/flux-spindle.c
Line 479 in d2dd15c
The problem is that the log message occurs before a call to
setenv()
(transferring the value ofSPINDLE_TEST
from the flux shell to the regular shell). The log message triggers initialization of the logging system, which checks for theSPINDLE_TEST
environment variable, which isn't present, thusrun_tests=0
. After initialization completes and the message is logged, the remaining code insp_init()
executes, which includes settingSPINDLE_TEST=1
. Subsequent processes see this different value and set up the test environment, but as the first process never did, the result is a hang.In the two runs I looked at, only the smallest pid had
run_test=0
, which probably means flux callssp_init()
serially.A simple solution is to move all of the
setenv()
code intoflux_plugin_init()
along with a note to not log anything until all calls tosetenv()
complete.The text was updated successfully, but these errors were encountered: