Skip to content

Logging early in sp_init() causes hang. #79

Open
@rountree

Description

@rountree

This information log message in flux-spindle.c hangs.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions