** Description changed: [Impact] snmpd does a statfs on every filesystem in /proc/mounts, and runs into permission problems in /sys, /proc, /run as the daemon runs as Debian-snmp which does not have root permissions. This results in a large amount of logspam, especially if devices are configured to be polled every 5 minutes or less. Messages such as: Oct 25 06:29:24 focal-test snmpd [1329]: Cannot statfs /run/user/1002/gvfs: Permission denied) [Testcase] $ sudo apt update $ sudo apt install snmp snmpd snmptrapd snmp-mibs-downloader + $ sudo vim /etc/snmpd/snmpd.conf + sysLocation Laptop + sysContact Me <[email protected]> + + sysServices 72 + + master agentx + + agentAddress udp:161,udp6:[::1]:161 + + #view systemonly included .1.3.6.1.2.1.1 + #view systemonly included .1.3.6.1.2.1.25.1 + view systemonly included .1 + + rocommunity user1 default -V systemonly + rocommunity6 user1 default -V systemonly + + rouser authPrivUser authpriv -V systemonly + + disk / -1 + disk /boot -1 + disk /swap -1 + disk /home -1 + disk /boot/efi -1 + $ sudo systemctl restart snmpd + $ sudo apt install ubuntu-desktop + $ sudo adduser ubuntu + $ sudo reboot + + Log in to the gnome-shell session as your new user. + + $ snmpwalk -v 2c -c twmdpipm 127.0.0.1 .1 Check journalctl / /var/log/syslog for entries from snmpd. Each poll will result in more log entries with Permission Denied messages. + + snmpd[780]: Cannot statfs /run/user/1001/gvfs: Permission denied There is a test package in the following ppa: https://launchpad.net/~mruffell/+archive/ubuntu/sf409283-test/ if you install the test package, the logs will occur once, and then never again. [Where problems can occur] We are changing how statfs failures are logged. Previously, all failures are logged, and this generates a lot of volume for special filesystems like /sys, /proc and /run, but now, it will only log the failures once and then never again, preventing logspam and making things easier to read. There will be decreased logging. Users will notice less failures being written - to their logs. + to their logs. If a regression were to occur, it would affect statfs entries being logged or being omitted from logs. [Other info] Upstream bug: https://github.com/net-snmp/net-snmp/issues/94 This was fixed in 5.8.1-rc1 by: commit 5f1986c79e8b9d3d8574fc73001d6e193bed7c79 From: Bart Van Assche <[email protected]> Date: Sat, 11 Apr 2020 20:11:35 -0700 Subject: HOST-MIB: Log statfs() failures once Link: https://github.com/net-snmp/net-snmp/commit/5f1986c79e8b9d3d8574fc73001d6e193bed7c79 It is included in jammy and later.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2126460 Title: statfs failures create large amounts of logspam To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-pro/+bug/2126460/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
