Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.218]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 6CADF7816B8 for ; Fri, 1 Apr 2022 00:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1648773081; s=strato-dkim-0002; d=lesosoftware.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=Ms1eWxELP4FeAPMCG9hsNlb5xFSnxdNKLNwqjYaf0tY=; b=OLoeeiAsICgRl4nQ7Jpn+dYWU5TvoVHo7sqCUVF8plDCwG4UC/IAoPtW5BSfzM2oZC K0+avjsfPMq8CjNUYZmv0UT8c9EXIIN20HAF8+N7cVeKlOhVifGAvXvPSHEtct2kAIZJ ieW+RqF7Jz3PzVu/CXzAxy5lxunuHveH/VsPCP8BM8MWP3TQRazx0DmlX8gDTWiMGt1v T3mPUHTf3FCP+EUiOqkSJIceqSLI3ac2rF7C8VTi+I90Pba8ivSyzPE/avCSyTmrhVD3 LuDVBJkpnVyv4jr7qjO5Qb9ar3huFYzmPWh8gVNRyeSTY2ZCViT1Lz/2pLRtdulVre/i xJ8Q== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JWICemCkfuxSVe/cpiMxv67bFc4Sd1Kb7jDWFq172/4KSevK/CJJ7m7nx0HHbOA/BO3TOxSWneJw9tCmgvH/erORqdY07hfA2tHyyNiwphaZOw==" X-RZG-CLASS-ID: mo00 Received: from lian-alpha.fritz.box by smtp.strato.de (RZmta 47.42.2 AUTH) with ESMTPSA id 406121y310VLBpS (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 1 Apr 2022 02:31:21 +0200 (CEST) From: leso-kn To: alpine-aports@lists.alpinelinux.org Cc: leso-kn Subject: [PATCH] main/bacula: fix bacula-dir crash (pthread double detach) Date: Fri, 1 Apr 2022 02:31:15 +0200 Message-Id: <20220401003115.270197-1-info@lesosoftware.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit --- main/bacula/APKBUILD | 2 ++ .../bacula-11.0.6-pthread-double-detach-fix.patch | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 main/bacula/bacula-11.0.6-pthread-double-detach-fix.patch diff --git a/main/bacula/APKBUILD b/main/bacula/APKBUILD index b164ac83fc..ad5bb75a57 100644 --- a/main/bacula/APKBUILD +++ b/main/bacula/APKBUILD @@ -21,6 +21,7 @@ source="https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkg bacula-sd.initd bacula-fd.initd bacula-7.4.0-path-mounted.patch + bacula-11.0.6-pthread-double-detach-fix.patch " options="!check" #no test suite provided @@ -161,4 +162,5 @@ bb954bb94bffa68ba80872046782a73012487291f019fb8d7ff77fc7f4325e25bee88612b3279b4d 0505b9a74520af6982d5df4390525976f8e009e641d0acfe8f24b2ec9f155166a65eecbabee9ff70ffe188d523effa64f958acd8f657410b1c002a6d736e8aee bacula-sd.initd 91a53cb566cfd91b42a319bd6ff9947047cae187c6ec198767853d1a0253667d6c2c58f0e72ed43a7b9f40b76e705cafde7a1d6ac86577fa0f64f44b031dec11 bacula-fd.initd 2d3757236aacca421261a8866ff04b5b0151538e1462559bd1240119b1bece1d456acbba9fee86dbc6aaec7af2a52eb2c0b7490c5f371b7deb478731c74342ff bacula-7.4.0-path-mounted.patch +e5b6e98e60a3aac9939b5d9a43419961277a6d22b8153c6c73d7571cb2f3ee5601675c9de11e122ceca26c6f3c4c0648f2409689aa3fa11ee230ea0f5f5ba85a bacula-11.0.6-pthread-double-detach-fix.patch " diff --git a/main/bacula/bacula-11.0.6-pthread-double-detach-fix.patch b/main/bacula/bacula-11.0.6-pthread-double-detach-fix.patch new file mode 100644 index 0000000000..8853c42f94 --- /dev/null +++ b/main/bacula/bacula-11.0.6-pthread-double-detach-fix.patch @@ -0,0 +1,14 @@ +diff --git a/src/dird/ua_server.c b/src/dird/ua_server.c +index 75342a3bfa..d8d767e81f 100644 +--- a/src/dird/ua_server.c ++++ b/src/dird/ua_server.c +@@ -126,7 +126,9 @@ static void *handle_UA_client_request(void *arg) + JCR *jcr; + BSOCK *user = (BSOCK *)arg; + +- pthread_detach(pthread_self()); ++ // Alpine: We know the thread is already detached (src/lib/workq.c:74). ++ // Detaching it again would crash on musl, so we disable this call ++ // pthread_detach(pthread_self()); + + jcr = new_control_jcr("-Console-", JT_CONSOLE); -- 2.27.0