Your message dated Sun, 08 Nov 2026 21:25:47 +0000
with message-id <[email protected]>
and subject line Bug#1081948: fixed in minidlna 1.3.3+dfsg-2
has caused the Debian Bug report #1081948,
regarding minidlna cache reinit can fail due to SIGCHLD wait race
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1081948: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081948
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: minidlna
Version: 1.3.3+dfsg-1.1
Tags: patch
In two places in minidlna.c, there's a library call to system() to
delete files in minidlna's configured cache directory (by default
/var/cache/mindlna), via code of the form
snprintf(cmd, sizeof(cmd), "rm -rf %s/files.db %s/art_cache", db_path,
db_path);
if (system(cmd) != 0)
DPRINTF(E_FATAL, L_GENERAL, "Failed to clean old file cache!
Exiting...\n");
One instance of this code, in init(), is run in response to the -R
command line option. The other, in check_db(), is run whenever minidlna
has to build a new files.db from scratch, either because it's being run
for the first time, or because an old cache was incompatible with a new
version, or because the -R option deleted the old version.
The instance of this code in check_db() can fail due to a signal
handling goof, because by that time two other things have happened:
1. init() has installed process_handle_child_termination() as the
handler for SIGCHLD, which indiscriminately calls waitpid(-1, ...)
to reap any available child processes
2. a second thread has been started in the process, which according to
gdb is being done by blas_thread_init() in libopenblas (!).
glibc's implementation of system() blocks SIGCHLD while it's executing,
so that a SIGCHLD handler can't wait for its subprocess before it does.
But apparently that only blocks it in the current thread. Watching the
failure with a bpftrace script, the _second_ thread is receiving the
SIGCHLD and reaping the return code of the 'rm' command, before glibc's
wait call can do it. So the wait fails with ECHILD; system() reports
failure; minidlna aborts at startup.
This is a race condition, so it doesn't always happen. In particular,
I've found it depends on other conditions on the host OS, and also,
running under strace can perturb away the problem.
Additionally, the snprintf call shown above is careless in how it
constructs the rm command: the cache directory pathname from the
configuration file is used without quoting. It works OK as long as the
cache directory is the default /var/cache/minidlna, which contains no
spaces or other special shell characters. But it's a latent bug.
I attach a patch which solves both problems, by abandoning the strategy
of system("rm -rf stuff") completely, replacing it with an in-process
recursive deletion function.
Cheers,
Simon
--
import hashlib; print((lambda p,q,g,y,r,s,m: (lambda w:(pow(g,int(hashlib.sha1(
m.encode('ascii')).hexdigest(),16)*w%q,p)*pow(y,r*w%q,p)%p)%q)(pow(s,q-2,q))==r
and s%q!=0 and m)(12342649995480866419, 2278082317364501, 1670428356600652640,
5398151833726432125, 645223105888478, 1916678356240619, "<[email protected]>"))
0001-Replace-rm-rf-with-in-process-deletion-code.patch
Description: Binary data
--- End Message ---
--- Begin Message ---
Source: minidlna
Source-Version: 1.3.3+dfsg-2
Done: Alexander GQ Gerasiov <[email protected]>
We believe that the bug you reported is fixed in the latest version of
minidlna, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Alexander GQ Gerasiov <[email protected]> (supplier of updated minidlna package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 08 Nov 2026 22:17:04 +0200
Source: minidlna
Architecture: source
Version: 1.3.3+dfsg-2
Distribution: unstable
Urgency: high
Maintainer: Alexander GQ Gerasiov <[email protected]>
Changed-By: Alexander GQ Gerasiov <[email protected]>
Closes: 989828 1081948 1138586 1144655 1153446
Changes:
minidlna (1.3.3+dfsg-2) unstable; urgency=high
.
[ Barak A. Pearlmutter ]
* Update standards version to 4.7.0, no changes needed.
* patch for deletion race condition (closes: #1081948) many thanks
to Simon Tatham <[email protected]>
.
[ Luca Boccassi ]
* Install and use sysusers.d/tmpfiles.d config files
.
[ Alexander Gerasiov ]
* d/patches: Fix DFF parser memory safety issues (CVE-2026-29508).
Thanks to Sumit Verma (Closes: #1153446)
* d/patches: Do not abort on UPnP unsubscribe during notify connect.
(Closes: #1144655)
* d/patches: Fix select_del() crash in forked HTTP children.
(Closes: #989828, #1138586)
* d/patches: Fix FTBFS on GNU/Hurd.
* debian/minidlna.init: Create cache directory if missing.
* debian/copyright: Do not list COPYING license file.
* debian/copyright: Move DFSG repack explanation to Comment field.
* d/patches: Fix DSF parser division by zero and huge allocation.
* debian/minidlna.service: Fix man page section, restart on failure.
* debian/control: Add pkgconf to Build-Depends.
* Bump Standards-Version to 4.7.2, no changes needed.
* debian/copyright: Update packaging copyright years.
* Remove debian/minidlna.postinst.
* debian/rules: Take OS version from dpkg-vendor.
* debian/minidlna.init: Use the pidfile for status.
* debian/minidlna.conf.5: Fix wording, typos and wrong defaults.
Checksums-Sha1:
34266c09ca5b3152d3e3fad16aa2ce883035ca8e 2354 minidlna_1.3.3+dfsg-2.dsc
e90538bd33b23792b5af1ae0c8e6626c6002194a 36564
minidlna_1.3.3+dfsg-2.debian.tar.xz
601da25e47e8524cd48f4971c8bc29da2752da56 691944
minidlna_1.3.3+dfsg-2.git.tar.xz
6f263859499e3cdaa0769f305a970aea407cdc3d 17761
minidlna_1.3.3+dfsg-2_source.buildinfo
Checksums-Sha256:
e06ab497c31d06f495b3e21ec3afdfb1374dbc76b903abcea2473bf60bae59b4 2354
minidlna_1.3.3+dfsg-2.dsc
48608ce97810e77bf2baeaebb696a412b5439493812f45c616f1eb486a44f398 36564
minidlna_1.3.3+dfsg-2.debian.tar.xz
30a3fa9d6ea32bf325122096c48c8f1534e16eef27b49fa1dc02bb2c8f75f8fe 691944
minidlna_1.3.3+dfsg-2.git.tar.xz
629de6c0594b6e90e89095cfa9859c04afb636eafa4c465154610c7c1bbbefab 17761
minidlna_1.3.3+dfsg-2_source.buildinfo
Files:
657b8ffed2d51590b46b737f87d041b6 2354 net optional minidlna_1.3.3+dfsg-2.dsc
ebeb40b9c77386ec449a5d691c30d0ea 36564 net optional
minidlna_1.3.3+dfsg-2.debian.tar.xz
eb68a1a026e82c8d73f2498600bda035 691944 net optional
minidlna_1.3.3+dfsg-2.git.tar.xz
3a1101b65d67e090c5b0b7a3bc7b9c3e 17761 net optional
minidlna_1.3.3+dfsg-2_source.buildinfo
Git-Tag-Info: tag=742839717c893f4e36f7c286cb25f89c006a41af
fp=04b59d90df7cc2abcd49baeaca87e9e82aac33f1
Git-Tag-Tagger: Alexander Gerasiov <[email protected]>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmrw3swACgkQYG0ITkaD
wHmbCxAAiALzsF8pj3zG0ZZF7Rxb6w7J8eVKdB3sYG4msEEFNSQIIkqEe3Q/DDil
k7pYGGW6n3stkPIiaKc+70Kv4MCxAiG1IUr+VgxniCsH5GSggAp26HUEbfQRCUm8
8r04BCm5a+Nn0XpoQPLI+Cb8cqGFfevhf76FbWkISLi1zLbYm0ugC6mACX8d7CsT
P/tna1fEAbr7hyw2AC4d9Ow4aa8n6HYVEr5xhriillaw3MGuvgXAjMqo6lZFxHY0
79EW9kRR8zNLyGMBrlWDgJCkwPtfJpPdxVaDHzp+t5qSoXzvxiitXuV3D1tSvGSa
dO494mnl8NwRngCPPgNJVE9TgeWe6sQUdiMK4O+yiypDEOjdA0ceGgOaTYHWBBDE
YE7BYsmuyRkOsp38jkRrYAjySTrgwpCifrd+2Hkw1uBgcwalR5Z0BjnTMTt5ndGk
eNeLpeYCKoe9NZHSXEK8D8O+w1XUSqLPXb0GVKwr6Cb5EteQTcSdRyWxQ1lYKJZS
KcOpJlafRFeUB9KC7OdXTaagMKDzKZ1pW4mOzoIdrXf+MPdQL7yqmptb09uO95gf
TKE99ZeVuqmnDZMSj9xb9OaBkHFQg3ukskh5eSEgGP7NoxfbOgtjgHHnMr13o0HF
CeLqQHKPHLOOPeFuqyKdLwT02ClXG8pm1dELSYWhShjN9igVErQ=
=w4MV
-----END PGP SIGNATURE-----
pgpNRVakouZ99.pgp
Description: PGP signature
--- End Message ---