diff --git a/NEWS b/NEWS index c56b09e8b211d1710dcef28fd753d13d98c473e1..3adb090be5d3e057a7dba8f477e5a2cac3ef8bd7 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ documents those changes that are of interest to users and admins. -- Applied patch from Mark Grondona that tests for a missing config file before any other processing in spank_init(). This now prevents fatal errors from being mistakenly treated as recoverable. + -- --enable-debug no longer has to be stated at configure time to have + the slurmctld or slurmstepd dump core on a seg fault. * Changes in SLURM 2.1.0-pre5 ============================= diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 61d3b25a1e65aa5dea29704c989c9727dde007f3..705d90535c2770b82fe6c8a0141b4dda99dea49b 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -254,12 +254,10 @@ int main(int argc, char *argv[]) if (license_init(slurmctld_conf.licenses) != SLURM_SUCCESS) fatal("Invalid Licenses value: %s", slurmctld_conf.licenses); -#ifndef NDEBUG -# ifdef PR_SET_DUMPABLE +#ifdef PR_SET_DUMPABLE if (prctl(PR_SET_DUMPABLE, 1) < 0) debug ("Unable to set dumpable to 1"); -# endif /* PR_SET_DUMPABLE */ -#endif /* !NDEBUG */ +#endif /* PR_SET_DUMPABLE */ /* * Create StateSaveLocation directory if necessary. diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 5bdc8e2f9ffd36ced28f2c056fb5425625908626..05d638ab8ce8c4e4a414ed35ea0a41df9c6f4550 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -844,12 +844,10 @@ job_manager(slurmd_job_t *job) goto fail1; } -#ifndef NDEBUG -# ifdef PR_SET_DUMPABLE +#ifdef PR_SET_DUMPABLE if (prctl(PR_SET_DUMPABLE, 1) < 0) debug ("Unable to set dumpable to 1"); -# endif /* PR_SET_DUMPABLE */ -#endif /* !NDEBUG */ +#endif /* PR_SET_DUMPABLE */ set_umask(job); /* set umask for stdout/err files */ if (job->user_managed_io) diff --git a/src/slurmdbd/slurmdbd.c b/src/slurmdbd/slurmdbd.c index f5d8f53eaaa3c4a04a0f5780644d78e4765fa110..1fa2c98ab6c1e062ad3e1ef75fe12c8bffaa6be9 100644 --- a/src/slurmdbd/slurmdbd.c +++ b/src/slurmdbd/slurmdbd.c @@ -122,10 +122,16 @@ int main(int argc, char *argv[]) _kill_old_slurmdbd(); if (foreground == 0) _daemonize(); + _init_pidfile(); _become_slurm_user(); log_config(); +#ifdef PR_SET_DUMPABLE + if (prctl(PR_SET_DUMPABLE, 1) < 0) + debug ("Unable to set dumpable to 1"); +#endif /* PR_SET_DUMPABLE */ + if (xsignal_block(dbd_sigarray) < 0) error("Unable to block signals");