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

Fix accounting bug (Andy Riebs, HP).

parent 9db915ee
No related branches found
No related tags found
No related merge requests found
This file describes changes in recent versions of SLURM. It primarily This file describes changes in recent versions of SLURM. It primarily
documents those changes that are of interest to users and admins. documents those changes that are of interest to users and admins.
* Changes in SLURM 0.5.0-pre20
==============================
-- Fix race condition in job accouting plugin, could hang slurmd
-- Report SlurmUser id over 16 bits as an error (fix on v0.6)
* Changes in SLURM 0.5.0-pre19 * Changes in SLURM 0.5.0-pre19
============================== ==============================
-- Fix memory management bug in federation driver -- Fix memory management bug in federation driver
......
...@@ -738,6 +738,7 @@ int slurmd_jobacct_task_exit(slurmd_job_t *job, pid_t pid, int status, struct ru ...@@ -738,6 +738,7 @@ int slurmd_jobacct_task_exit(slurmd_job_t *job, pid_t pid, int status, struct ru
if (prec_frequency) { /* if dynamic monitoring */ if (prec_frequency) { /* if dynamic monitoring */
slurm_mutex_lock(&precTable_lock); /* let watcher finish loop */ slurm_mutex_lock(&precTable_lock); /* let watcher finish loop */
pthread_cancel(_watch_tasks_thread_id); pthread_cancel(_watch_tasks_thread_id);
pthread_join(_watch_tasks_thread_id,NULL);
slurm_mutex_unlock(&precTable_lock); slurm_mutex_unlock(&precTable_lock);
jrec->max_psize = max_psize; jrec->max_psize = max_psize;
jrec->max_vsize = max_vsize; jrec->max_vsize = max_vsize;
...@@ -1585,10 +1586,15 @@ static int _unpack_jobrec(_jrec_t *outrec, _jrec_t *inrec) { ...@@ -1585,10 +1586,15 @@ static int _unpack_jobrec(_jrec_t *outrec, _jrec_t *inrec) {
static void *_watch_tasks(void *arg) { static void *_watch_tasks(void *arg) {
int tmp;
while(1) { /* Do this until slurm_jobacct_task_exit() stops us */ while(1) { /* Do this until slurm_jobacct_task_exit() stops us */
sleep(prec_frequency); sleep(prec_frequency);
pthread_testcancel();
slurm_mutex_lock(&precTable_lock); slurm_mutex_lock(&precTable_lock);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &tmp);
_get_process_data(); /* Update the data */ _get_process_data(); /* Update the data */
slurm_mutex_unlock(&precTable_lock); slurm_mutex_unlock(&precTable_lock);
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &tmp);
} }
} }
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