Skip to content
Snippets Groups Projects
Commit ba3a865e authored by Moe Jette's avatar Moe Jette
Browse files

Unblock the SIGALRM so that hung I/O can be killed for each thread.

parent ca690c34
No related branches found
No related tags found
No related merge requests found
...@@ -127,6 +127,8 @@ typedef struct queued_request { ...@@ -127,6 +127,8 @@ typedef struct queued_request {
time_t last_attempt; /* Time of last xmit attempt */ time_t last_attempt; /* Time of last xmit attempt */
} queued_request_t; } queued_request_t;
static int agent_sigarray[] = { SIGALRM, 0 };
static void _alarm_handler(int dummy); static void _alarm_handler(int dummy);
static inline void _comm_err(char *node_name); static inline void _comm_err(char *node_name);
static void _list_delete_retry(void *retry_entry); static void _list_delete_retry(void *retry_entry);
...@@ -169,6 +171,7 @@ void *agent(void *args) ...@@ -169,6 +171,7 @@ void *agent(void *args)
goto cleanup; goto cleanup;
xsignal(SIGALRM, _alarm_handler); xsignal(SIGALRM, _alarm_handler);
xsignal_unblock(agent_sigarray);
/* initialize the agent data structures */ /* initialize the agent data structures */
agent_info_ptr = _make_agent_info(agent_arg_ptr); agent_info_ptr = _make_agent_info(agent_arg_ptr);
...@@ -590,7 +593,6 @@ static void *_thread_per_node_rpc(void *args) ...@@ -590,7 +593,6 @@ static void *_thread_per_node_rpc(void *args)
thread_ptr->state = DSH_ACTIVE; thread_ptr->state = DSH_ACTIVE;
slurm_mutex_unlock(task_ptr->thread_mutex_ptr); slurm_mutex_unlock(task_ptr->thread_mutex_ptr);
/* send request message */ /* send request message */
msg.address = thread_ptr->slurm_addr; msg.address = thread_ptr->slurm_addr;
msg.msg_type = msg_type; msg.msg_type = msg_type;
...@@ -689,7 +691,7 @@ static void *_thread_per_node_rpc(void *args) ...@@ -689,7 +691,7 @@ static void *_thread_per_node_rpc(void *args)
} }
/* /*
* SIGALRM handler. We are really interested in interrupting hung communictions * SIGALRM handler. We are really interested in interrupting hung communictions
* and causing them to return EINTR. Multiple interupts might be required. * and causing them to return EINTR. Multiple interupts might be required.
*/ */
static void _alarm_handler(int dummy) static void _alarm_handler(int dummy)
...@@ -697,7 +699,6 @@ static void _alarm_handler(int dummy) ...@@ -697,7 +699,6 @@ static void _alarm_handler(int dummy)
xsignal(SIGALRM, _alarm_handler); xsignal(SIGALRM, _alarm_handler);
} }
/* /*
* _queue_agent_retry - Queue any failed RPCs for later replay * _queue_agent_retry - Queue any failed RPCs for later replay
* IN agent_info_ptr - pointer to info on completed agent requests * IN agent_info_ptr - pointer to info on completed agent requests
......
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