Skip to content

main/bacula: fix SIGSEGV crash of bacula director

leso-kn requested to merge leso-kn/aports:bacula-fix-sigsegv into master

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

  1. Install bacula (e.g. bacula-pgsql) and bacula-client

  2. Run bacula director

  3. 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() from bacula-11.0.6/src/dird/ua_server.c:129 and bacula-11.0.6/src/dird/job.c:411, as both targeted threads are already detached before in bacula-11.0.6/src/lib/workq.c:74
Edited by leso-kn

Merge request reports

Loading