main/bacula: fix SIGSEGV crash of bacula director
Summary
This patch fixes two crashes within bacula director, triggered when 1) connecting via bconsole
and 2) staring a backup job.
Both crashes are caused by a redundant call to pthread_detach()
(see: this post about pthread_detach()
on musl
).
Steps to reproduce
-
Install bacula (e.g.
bacula-pgsql
) andbacula-client
-
Run bacula director
-
Try to connect to the director via 'bconsole' (type 'bconsole')
Expected behavior
- bconsole connects to bacula-dir and displays a command line
Actual behavior: (without proposed patch)
- bacula-dir crashes. bconsole times out
Fix
- Removed redundant calls to
pthread_detach()
frombacula-11.0.6/src/dird/ua_server.c:129
andbacula-11.0.6/src/dird/job.c:411
, as both targeted threads are already detached before inbacula-11.0.6/src/lib/workq.c:74
Edited by leso-kn