Commit 370e828e authored by Nicolas Joly's avatar Nicolas Joly Committed by Morris Jette
Browse files

Fix scancel(1) uninitialized condition variable

Still testing 16.05 on my NetBSD/amd64 workstation ...
Just encountered a crash with scancel(1).
njoly@lanfeust [~]> sbatch --wrap "sleep 3600"
Submitted batch job 4680
njoly@lanfeust [~]> scancel 4680
scancel: Error detected by libpthread: Invalid condition variable.
Detected by file "/local/src/NetBSD/src/lib/libpthread/pthread_cond.c", line 140, function "pthread_cond_timedwait".
See pthread(3) for information.
zsh: abort (core dumped)  scancel 4680
Checking the code show indeed that pthread_cond_wait() call from scancel.c:_signal_job_by_str() use an uninitialised condition variable "num_active_threads_cond"
The attached patch, which add the missing pthread_cond_init() seems to fix it.
bug 2753
parent d378b297
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment