Package: minidlna Version: 1.3.0+dfsg-2.2+deb12u1 Severity: important Dear Maintainer,
`minidlna` has filled up all space on my partition by writing a 82G log file /var/log/minidlna/minidlna.log. ```console $ grep -cF 'minidlna.c:166: error: accept(http): Too many open files' minidlna.log 1_534_835_206 ``` Some bad behaving client seems to open too many connections, which `minidlna` does not seem to close and so gets into a situation, where no new connections can be opened. As the client continues doing that, each attempt logs a line until the partition if full. This has happened to me several times by now: Other services then stop working as they have no free space left. In the past other actions like re-scanning all media files has also lead to the situation, where too many log messages used up all available space. Sadly `minidlna` disables logging to `journald`: https://sources.debian.org/patches/minidlna/1.3.0%2Bdfsg-2.2%2Bdeb12u1/09-do-not-disable-logs-with-systemd.patch/ 1. `minidlna` should close idle connections after some (configurable) timeout. 2. `minidlna` could crash in such a situation, so it get restarted by `systemd` with a clean environment where all previous connections are closed. 3. `minidlna` should log to `journald` which allows log^Wjournal file rotation without the need to reload or restart `minidlna`. 4. `minidlna` could have some DoS prevention and block bad behaving clients. PS: Spelling mistake in <man:minidlna.conf>: > serial Set the serial number reported to clients. > Defaults to MAC address od network interface. ^ od -> of (the) -- System Information: Debian Release: 12.8 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable') Architecture: arm64 (aarch64) Foreign Architectures: armhf Kernel: Linux 6.6.51+rpt-rpi-v8 (SMP w/4 CPU threads; PREEMPT) Kernel taint flags: TAINT_CRAP Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages minidlna depends on: ii adduser 3.134 ii init-system-helpers 1.65.2 ii libavformat59 8:5.1.6-0+deb12u1+rpt1 ii libavutil57 8:5.1.6-0+deb12u1+rpt1 ii libc6 2.36-9+rpt2+deb12u8 ii libexif12 0.6.24-1+b1 ii libflac12 1.4.2+ds-2 ii libid3tag0 0.15.1b-14 ii libjpeg62-turbo 1:2.1.5-2 ii libogg0 1.3.5-3 ii libsqlite3-0 3.40.1-2+deb12u1 ii libvorbis0a 1.3.7-1 ii sysvinit-utils [lsb-base] 3.06-4 minidlna recommends no packages. minidlna suggests no packages. -- Configuration Files: /etc/minidlna.conf changed: media_dir=A,/srv/media/Music log_dir= log_level=general,artwork,database,inotify,scanner,metadata,ssdp,tivo=warn,http=warn port=8200 presentation_url=http://pi4:8200/ friendly_name=pi4 serial=242606376224096 album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title wide_links=yes -- no debconf information