Skip to content
Snippets Groups Projects
Commit 8079e28d authored by Morris Jette's avatar Morris Jette
Browse files

Fix for slurmctld agent watchdog logic

Was failing to run watchdog thread to make note of hung threads
and not completion of RPC, which is needed for node ping.
This bug was introduced in commit d87d1b50
parent c88641a0
No related branches found
No related tags found
No related merge requests found
...@@ -270,9 +270,10 @@ void *agent(void *args) ...@@ -270,9 +270,10 @@ void *agent(void *args)
/* start the watchdog thread */ /* start the watchdog thread */
if (getenv("SLURM_NO_WDOG")) { if (getenv("SLURM_NO_WDOG")) {
/* Development don't want threads be interrupted /* Test purposes only. Do not want threads to be interrupted
* by sigusr1. Remove later. * by SIGUSR1. Breaks normal operation */
*/ error("%s: Watchdog thread disabled", __func__);
} else {
slurm_attr_init(&attr_wdog); slurm_attr_init(&attr_wdog);
if (pthread_attr_setdetachstate if (pthread_attr_setdetachstate
(&attr_wdog, PTHREAD_CREATE_JOINABLE)) (&attr_wdog, PTHREAD_CREATE_JOINABLE))
...@@ -332,12 +333,10 @@ void *agent(void *args) ...@@ -332,12 +333,10 @@ void *agent(void *args)
slurm_mutex_unlock(&agent_info_ptr->thread_mutex); slurm_mutex_unlock(&agent_info_ptr->thread_mutex);
} }
/* wait for termination of remaining threads */ /* Wait for termination of remaining threads */
if (!getenv("SLURM_NO_WDOG")) {
if (getenv("SLURM_NO_WDOG")) { /* Test purposes only. Do not want threads to be interrupted
/* Development don't want threads be interrupted * by SIGUSR1 */
* by sigusr1. Remove later.
*/
pthread_join(thread_wdog, NULL); pthread_join(thread_wdog, NULL);
} }
......
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