Skip to content
Snippets Groups Projects
Commit 03cf4a5d authored by Sergey  Meirovich's avatar Sergey Meirovich Committed by Morris Jette
Browse files

Lock slurmstepd in memory

If slurmstepd had been swapped out before upgrade happened it could
  easily lead to SIGBUS at any time after upgrade. Prevent that by
  mlocking it.
bug 2334
parent f62b8493
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,8 @@ documents those changes that are of interest to users and administrators. ...@@ -17,6 +17,8 @@ documents those changes that are of interest to users and administrators.
that had a partition in them. that had a partition in them.
-- Don't return the extern step from sstat by default. -- Don't return the extern step from sstat by default.
-- In sstat print 'extern' instead of 4294967295 for the extern step. -- In sstat print 'extern' instead of 4294967295 for the extern step.
-- Lock slurmstepd in memory to avoid possible SIGBUS if the daemon is paged
out at the time of a Slurm upgrade (changing plugins).
* Changes in Slurm 16.05.3 * Changes in Slurm 16.05.3
========================== ==========================
......
...@@ -157,6 +157,17 @@ main (int argc, char *argv[]) ...@@ -157,6 +157,17 @@ main (int argc, char *argv[])
* on STDERR_FILENO for us. */ * on STDERR_FILENO for us. */
dup2(STDERR_FILENO, STDOUT_FILENO); dup2(STDERR_FILENO, STDOUT_FILENO);
/* slurmstepd is the only daemon that should survive upgrade. If it
* had been swapped out before upgrade happened it could easily lead
* to SIGBUS at any time after upgrade. Avoid that by locking it
* in-memory. */
#ifdef _POSIX_MEMLOCK
if (mlockall(MCL_FUTURE | MCL_CURRENT) < 0)
info("failed to mlock() slurmstepd pages: %m");
#else
info("mlockall() system call does not appear to be available");
#endif
/* This does most of the stdio setup, then launches all the tasks, /* This does most of the stdio setup, then launches all the tasks,
* and blocks until the step is complete */ * and blocks until the step is complete */
rc = job_manager(job); rc = job_manager(job);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment