Description
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 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.