Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell: signal plugin fails to get job expiration and aborts job #6521

Closed
grondo opened this issue Dec 18, 2024 · 2 comments · Fixed by #6522
Closed

shell: signal plugin fails to get job expiration and aborts job #6521

grondo opened this issue Dec 18, 2024 · 2 comments · Fixed by #6522

Comments

@grondo
Copy link
Contributor

grondo commented Dec 18, 2024

On recent versions of flux, the --signal option, when used, causes jobs to abort immediately with an error about fetching the job expiration:

$ flux run --signal=USR1 hostname
1.671s: flux-shell[0]: ERROR: signal: unable to get job expiration: No such file or directory
1.671s: flux-shell[0]: ERROR: plugin 'signal': shell.init failed
1.677s: flux-shell[0]: FATAL: shell_init: No such file or directory
1.678s: job.exception type=exec severity=0 shell_init: No such file or directory

Somehow the tests in the testsuite are still working.

@grondo
Copy link
Contributor Author

grondo commented Dec 18, 2024

D'oh, this is the code that is failing:

    if (flux_shell_info_unpack (sig->shell,
                                "{s:{s:{s:f}}}",
                                "R",
                                "execution",
                                "expiration", &expiration) < 0) {
        shell_log_errno ("unable to get job expiration");
        return -1;
    }

Since Fluxion uses integers for expiration and starttime, the plugin should have used an F instead of f. 😞

@garlick
Copy link
Member

garlick commented Dec 18, 2024

Good catch!

grondo added a commit to grondo/flux-core that referenced this issue Dec 18, 2024
Problem: The shell signal plugin doesn't work with Fluxion because
it expects a float value for expiration in R and Fluxion encodes
an integer.

Update the format specifier in the signal plugin's use of json_unpack
on R to use `s:F` instead of `s:f` so that the plugin works with
Fluxion.

Fixes flux-framework#6521
@mergify mergify bot closed this as completed in #6522 Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants