Public bug reported: [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 Check journalctl / /var/log/syslog for entries from snmpd. Each poll will result in more log entries with Permission Denied messages. 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. 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. ** Affects: ubuntu-pro Importance: Medium Assignee: Matthew Ruffell (mruffell) Status: In Progress ** Affects: ubuntu-pro/20.04 Importance: Medium Assignee: Matthew Ruffell (mruffell) Status: In Progress ** Affects: net-snmp (Ubuntu) Importance: Undecided Status: Fix Released ** Affects: net-snmp (Ubuntu Focal) Importance: Undecided Status: Won't Fix ** Tags: sts ** Also affects: net-snmp (Ubuntu Focal) Importance: Undecided Status: New ** Changed in: net-snmp (Ubuntu) Status: New => Fix Released ** Also affects: ubuntu-pro Importance: Undecided Status: New ** Also affects: ubuntu-pro/20.04 Importance: Undecided Status: New ** Changed in: net-snmp (Ubuntu Focal) Status: New => Won't Fix ** Changed in: ubuntu-pro/20.04 Status: New => In Progress ** Changed in: ubuntu-pro/20.04 Importance: Undecided => Medium ** Changed in: ubuntu-pro/20.04 Assignee: (unassigned) => Matthew Ruffell (mruffell) ** Tags added: sts -- 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
