~alpine/aports

Re: [PATCH] main/bacula: fix bacula-dir crash (pthread double detach)

Details
Message ID
<2ba904e7-3ca8-5d57-560c-310b32f711a4@lesosoftware.com>
DKIM signature
missing
Download raw message
Hello! A short elaboration on this patch:

Summary: It's a bug fix for a crash in bacula director caused by a redundant call to 'pthread_detach()'.


## Steps to reproduce: (without the proposed patch)

[see detailed instructions on how to quickly reproduce it via docker below]

1. On a fresh alpine setup, 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


--

Appendix

## Steps to quickly reproduce this bug inside docker:


- Create a blank alpine container: 'docker run --rm -ti alpine'

- Install bacula: 'apk add bacula-pgsql postgresql bacula-client'

- Initialize the database and bacula folders:

   > mkdir -p /run/bacula
   > chown bacula:bacula /run/bacula

   > mkdir -p /var/lib/postgresql/data /run/postgresql
   > chown -R postgres:postgres /var/lib/postgresql/data /run/postgresql
   > su - postgres -c "initdb /var/lib/postgresql/data"
   > echo "host all  all    0.0.0.0/0  md5" >> /var/lib/postgresql/data/pg_hba.conf
   > su - postgres -c "pg_ctl start -D /var/lib/postgresql/data -l /var/lib/postgresql/log.log && \
                       cd /etc/bacula/scripts && ./create_postgresql_database && ./make_postgresql_tables && \
                       ./grant_postgresql_privileges && psql --command \"ALTER USER bacula WITH ENCRYPTED PASSWORD 'bacula';\""

- Run bacula-sd (in the background): 'su bacula - -s /bin/sh -c "bacula-sd -fc /etc/bacula/bacula-sd.conf" &'

- Run bacula-dir (in the background): 'su bacula - -s /bin/sh -c "bacula-dir -m -fc /etc/bacula/bacula-dir.conf"'

- Let it crash! 'bconsole'


Kind regards,

leso-kn
Reply to thread Export thread (mbox)