termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.18k stars 3.02k forks source link

[Bug]: Samba server won't honnor max log file = 50 #21899

Open bugith opened 17 hours ago

bugith commented 17 hours ago

Problem description

This morning I find my phone is out of storage. du -a .| sort -nr| head -n20 ran from com.termux/files dir shows the culprit is usr/var/log/samba/log.smbd (190GB)

Removed then restarting some crashed apps and everything seems OK.

What steps will reproduce the bug?

I imagine maybe just restart smbd -i and let run until phone turns into sleep mode or something similar, because I saw twice the termux screen spitting error messages I could stop (Ctrl+C did not work) and I had to force-kill from Android Settings Application

What is the expected behavior?

Don't fill the storage, respect the directive

System information

Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=15607
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
Updatable packages:
c-ares/stable 1.34.2 aarch64 [upgradable from: 1.34.1]
command-not-found/stable 2.4.0-47 aarch64 [upgradable from: 2.4.0-45]
libnettle/stable 3.10 aarch64 [upgradable from: 3.9.1]
libssh2/stable 1.11.1 aarch64 [upgradable from: 1.11.0]
libtirpc/stable 1.3.6 aarch64 [upgradable from: 1.3.5]
libunbound/stable 1.22.0 aarch64 [upgradable from: 1.21.1-1]
libunistring/stable 1.3 aarch64 [upgradable from: 1.1]
termux-am/stable 0.8.0-1 all [upgradable from: 0.8.0]
termux-tools/stable 1.44.1 aarch64 [upgradable from: 1.43.6]
termux-tools version:
1.43.6
Android version:
14
Kernel build information:
Linux localhost 5.4.242-qgki-g3f7ff67280a0 #1 SMP PREEMPT Fri Jul 5 16:49:09 CST 2024 aarch64 Android
Device manufacturer:
Nothing
Device model:
A063
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.widget versionCode:13
bugith commented 15 hours ago

Some more info : this happened too with smbd -D testparm output, followed with log file head:

Global parameters

[global] add group script = /data/data/com.termux/files/usr/bin/true add machine script = /data/data/com.termux/files/usr/bin/true add user script = /data/data/com.termux/files/usr/bin/true add user to group script = /data/data/com.termux/files/usr/bin/true allow dns updates = disabled bind interfaces only = Yes dcerpc endpoint servers = rpcecho deadtime = 15 delete group script = /data/data/com.termux/files/usr/bin/true delete user from group script = /data/data/com.termux/files/usr/bin/true delete user script = /data/data/com.termux/files/usr/bin/true disable spoolss = Yes dns proxy = No dns update command = /data/data/com.termux/files/usr/bin/false enable core files = No host msdfs = No interfaces = 127.0.0.0/8 wlan0 lm announce = No load printers = No local master = No max log size = 50 max smbd processes = 8 max stat cache size = 1024 min receivefile size = 16384 multicast dns register = No name resolve order = lmhosts host bcast passwd program = /data/data/com.termux/files/usr/bin/true preferred master = No printcap name = /dev/null rename user script = /data/data/com.termux/files/usr/bin/true restrict anonymous = 2 security = USER server role = standalone server server services = smb server string = Samba on Termux show add printer wizard = No smb ports = 1139 4445 socket options = TCP_NODELAY SO_KEEPALIVE unix extensions = No idmap config * : backend = tdb aio write size = 0 delete readonly = Yes ea support = No inherit permissions = Yes lpq command = /data/data/com.termux/files/usr/bin/false lprm command = /data/data/com.termux/files/usr/bin/false map archive = No max connections = 6 max print jobs = 0 nt acl support = No print command = /data/data/com.termux/files/usr/bin/false store dos attributes = No strict locking = No use sendfile = Yes

[internal] browseable = No comment = Internal storage path = @TERMUX_HOME@/storage/shared read only = No vfs objects = aio_pthread aio_pthread:aio open = yes

The log file is flooded with these messages: [2024/10/20 11:44:39.459452, 0] ../../source3/smbd/server.c:1741(main) smbd version 4.16.11 started. Copyright Andrew Tridgell and the Samba Team 1992-2022 [2024/10/20 11:54:50.435054, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.435805, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.435994, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.436238, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.436428, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.436722, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.436898, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.437073, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) accept: Invalid argument [2024/10/20 11:54:50.437245, 0] ../../source3/smbd/server.c:981(smbd_accept_connection) ...