Activity log for bug #1835818

Date Who What changed Old value New value Message
2019-07-08 18:06:51 Ioanna Alifieraki bug added bug
2019-07-08 18:07:06 Ioanna Alifieraki nominated for series Ubuntu Eoan
2019-07-08 18:07:06 Ioanna Alifieraki bug task added net-snmp (Ubuntu Eoan)
2019-07-08 18:07:06 Ioanna Alifieraki nominated for series Ubuntu Bionic
2019-07-08 18:07:06 Ioanna Alifieraki bug task added net-snmp (Ubuntu Bionic)
2019-07-08 18:07:06 Ioanna Alifieraki nominated for series Ubuntu Disco
2019-07-08 18:07:06 Ioanna Alifieraki bug task added net-snmp (Ubuntu Disco)
2019-07-08 18:07:06 Ioanna Alifieraki nominated for series Ubuntu Xenial
2019-07-08 18:07:06 Ioanna Alifieraki bug task added net-snmp (Ubuntu Xenial)
2019-07-08 18:07:06 Ioanna Alifieraki nominated for series Ubuntu Cosmic
2019-07-08 18:07:06 Ioanna Alifieraki bug task added net-snmp (Ubuntu Cosmic)
2019-07-11 13:19:53 Ioanna Alifieraki description [Impact] Autofs direct maps trigger mounts are visible in /etc/mtab. snmpd iterate over mounts and performs statfs() on them. This trigger automount to mount them. [Test Case] TBD [Regression Potential] TBD [Impact] Autofs direct map triggers are visible in /etc/mtab. On boot, when snmpd starts, it iterates over the entries in /etc/mtab and performs statfs() on them. This trigger automount to mount autofs mounts even if the user does not explicitly access them. However this happens only if autofs service is started before snmpd. If snmpd stars first /etc/mtab is not yet populated with autofs mounts and therefore are not mounted. When there a few autofs mount points the impact is insignificant. However when there are thousands of them, this causes unnecessary overhead on operations such as df. This also delays the system shutdown time since everything needs to be unmounted. [Test Case] *** Test Case 1 - During boot: The user that brought this issue to our attention would observe all autofs mounts be mounted at boot, because in their environment autofs would start first. In my environment snmpd starts first so to reproduce I had to add a small delay in snmpd init script. In /etc/init.d/snmp : @@ -36,6 +36,8 @@ cd / case "$1" in start) + # Delay snmp start + sleep 2 log_daemon_msg "Starting SNMP services:" # remove old symlink with previous version if [ -L /var/run/agentx ]; then $cat /etc/auto.master /- /etc/auto.nfs --timeout=30 $cat /etc/auto.nfs /home/test1 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test1 /home/test2 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test2 Reboot vm, syslog entries : # Autofs starts Jul 11 11:04:16 xenial-vm3 autofs[1295]: * Starting automount... Jul 11 11:04:16 xenial-vm3 automount[1357]: Starting automounter version 5.1.1, master map /etc/auto.master Jul 11 11:04:16 xenial-vm3 automount[1357]: using kernel protocol version 5.02 # Mount triggers, now visible in mtab Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test1 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test2 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 autofs[1295]: ...done. ... # SNMP starts Jul 11 11:04:18 xenial-vm3 snmpd[1294]: * Starting SNMP services: Jul 11 11:04:18 xenial-vm3 systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1394 (snmpd) Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounting Arbitrary Executable File Formats File System... Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounted Arbitrary Executable File Formats File System. Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 8.880685] FS-Cache: Loaded Jul 11 11:04:18 xenial-vm3 kernel: [ 8.889318] FS-Cache: Netfs 'nfs' registered for caching Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902672] NFS: Registering the id_resolver key type Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902680] Key type id_resolver registered Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902682] Key type id_legacy registered Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test1 <========== Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 9.163011] random: nonblocking pool is initialized Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test2 <=========== *** Test Case 2 - Restart snmpd : To reproduce this case, autofs mounts should not be mounted to begin with. (restart autofs or let it expire) #systemctl restart snmpd.service Syslog entries : Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopping LSB: SNMP agents... Jul 11 11:15:40 xenial-vm3 snmpd[1668]: * Stopping SNMP services: Jul 11 11:15:40 xenial-vm3 snmpd[1434]: Received TERM or STOP signal... shutting down... Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopped LSB: SNMP agents. Jul 11 11:15:40 xenial-vm3 systemd[1]: Starting LSB: SNMP agents... Jul 11 11:15:42 xenial-vm3 snmpd[1677]: * Starting SNMP services: Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 145: Warning: Unknown token: defaultMonitors. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 147: Warning: Unknown token: linkUpDownNotifications. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: Turning on AgentX master support. Jul 11 11:15:42 xenial-vm3 systemd[1]: Started LSB: SNMP agents. Jul 11 11:15:42 xenial-vm3 snmpd[1708]: NET-SNMP version 5.7.3 [Regression Potential] TBD [Other] Similar problem : https://sourceforge.net/p/net-snmp/patches/1350/ I built a test package with this patch. PPA : https://launchpad.net/~joalif/+archive/ubuntu/sf227130-test - The user reported back that the problem would still persist even with the test package. - Initially while testing it in my environment it would seem that the test package would not solve the problem entirely. However, after further rigorous testing I doubt the integrity of my first test results. I had not taken into account the expiration of mounts. Autofs mount points were already mounted before installing the test package, the expiration time was long enough not to be unmounted and therefore when installing the test package autofs mounts were there which was misleading. Now after careful testing it seems that the test package is working. However, I would like more people to test as well to make sure whether the test package is actually working or not.
2019-07-11 13:20:07 Ioanna Alifieraki tags sts
2019-07-11 13:41:28 Ioanna Alifieraki net-snmp (Ubuntu Xenial): assignee Ioanna Alifieraki (joalif)
2019-07-11 13:41:30 Ioanna Alifieraki net-snmp (Ubuntu Bionic): assignee Ioanna Alifieraki (joalif)
2019-07-11 13:41:32 Ioanna Alifieraki net-snmp (Ubuntu Cosmic): assignee Ioanna Alifieraki (joalif)
2019-07-11 13:41:35 Ioanna Alifieraki net-snmp (Ubuntu Disco): assignee Ioanna Alifieraki (joalif)
2019-07-11 13:41:39 Ioanna Alifieraki net-snmp (Ubuntu Eoan): assignee Ioanna Alifieraki (joalif)
2019-07-11 13:42:29 Ioanna Alifieraki bug added subscriber Chris Newcomer
2019-07-24 12:06:14 Ioanna Alifieraki net-snmp (Ubuntu Xenial): status New In Progress
2019-07-24 12:06:17 Ioanna Alifieraki net-snmp (Ubuntu Bionic): status New In Progress
2019-07-24 12:06:20 Ioanna Alifieraki net-snmp (Ubuntu Cosmic): status New In Progress
2019-07-24 12:06:23 Ioanna Alifieraki net-snmp (Ubuntu Disco): status New In Progress
2019-07-24 12:06:27 Ioanna Alifieraki net-snmp (Ubuntu Eoan): status New In Progress
2019-07-24 12:06:37 Ioanna Alifieraki net-snmp (Ubuntu Xenial): importance Undecided Medium
2019-07-24 12:06:39 Ioanna Alifieraki net-snmp (Ubuntu Bionic): importance Undecided Medium
2019-07-24 12:06:43 Ioanna Alifieraki net-snmp (Ubuntu Disco): importance Undecided Medium
2019-07-24 12:06:48 Ioanna Alifieraki net-snmp (Ubuntu Cosmic): importance Undecided Medium
2019-07-24 12:06:51 Ioanna Alifieraki net-snmp (Ubuntu Eoan): importance Undecided Medium
2019-07-24 12:16:47 Ioanna Alifieraki summary snmpd causes autofs mount points to be mounted on system start-up snmpd causes autofs mount points to be mounted on service start/restart
2019-07-31 14:58:22 Eric Desrochers net-snmp (Ubuntu Cosmic): status In Progress Won't Fix
2019-08-21 12:07:15 Ioanna Alifieraki attachment added lp1835818_eoan.debdiff https://bugs.launchpad.net/ubuntu/eoan/+source/net-snmp/+bug/1835818/+attachment/5283678/+files/lp1835818_eoan.debdiff
2019-08-21 12:08:00 Ioanna Alifieraki attachment added lp1835818_disco.debdiff https://bugs.launchpad.net/ubuntu/eoan/+source/net-snmp/+bug/1835818/+attachment/5283679/+files/lp1835818_disco.debdiff
2019-08-21 12:08:38 Ioanna Alifieraki attachment added lp1835818_bionic.debdiff https://bugs.launchpad.net/ubuntu/eoan/+source/net-snmp/+bug/1835818/+attachment/5283680/+files/lp1835818_bionic.debdiff
2019-08-21 12:09:23 Ioanna Alifieraki attachment added lp1835818_xenial.debdiff https://bugs.launchpad.net/ubuntu/eoan/+source/net-snmp/+bug/1835818/+attachment/5283681/+files/lp1835818_xenial.debdiff
2019-08-21 12:10:22 Ioanna Alifieraki bug added subscriber STS Sponsors
2019-08-21 12:47:28 Ubuntu Foundations Team Bug Bot tags sts patch sts
2019-08-21 12:48:09 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Sponsors Team
2019-08-21 13:55:40 Thomas Ward removed subscriber Ubuntu Sponsors Team
2019-08-21 14:17:06 Ioanna Alifieraki description [Impact] Autofs direct map triggers are visible in /etc/mtab. On boot, when snmpd starts, it iterates over the entries in /etc/mtab and performs statfs() on them. This trigger automount to mount autofs mounts even if the user does not explicitly access them. However this happens only if autofs service is started before snmpd. If snmpd stars first /etc/mtab is not yet populated with autofs mounts and therefore are not mounted. When there a few autofs mount points the impact is insignificant. However when there are thousands of them, this causes unnecessary overhead on operations such as df. This also delays the system shutdown time since everything needs to be unmounted. [Test Case] *** Test Case 1 - During boot: The user that brought this issue to our attention would observe all autofs mounts be mounted at boot, because in their environment autofs would start first. In my environment snmpd starts first so to reproduce I had to add a small delay in snmpd init script. In /etc/init.d/snmp : @@ -36,6 +36,8 @@ cd / case "$1" in start) + # Delay snmp start + sleep 2 log_daemon_msg "Starting SNMP services:" # remove old symlink with previous version if [ -L /var/run/agentx ]; then $cat /etc/auto.master /- /etc/auto.nfs --timeout=30 $cat /etc/auto.nfs /home/test1 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test1 /home/test2 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test2 Reboot vm, syslog entries : # Autofs starts Jul 11 11:04:16 xenial-vm3 autofs[1295]: * Starting automount... Jul 11 11:04:16 xenial-vm3 automount[1357]: Starting automounter version 5.1.1, master map /etc/auto.master Jul 11 11:04:16 xenial-vm3 automount[1357]: using kernel protocol version 5.02 # Mount triggers, now visible in mtab Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test1 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test2 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 autofs[1295]: ...done. ... # SNMP starts Jul 11 11:04:18 xenial-vm3 snmpd[1294]: * Starting SNMP services: Jul 11 11:04:18 xenial-vm3 systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1394 (snmpd) Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounting Arbitrary Executable File Formats File System... Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounted Arbitrary Executable File Formats File System. Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 8.880685] FS-Cache: Loaded Jul 11 11:04:18 xenial-vm3 kernel: [ 8.889318] FS-Cache: Netfs 'nfs' registered for caching Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902672] NFS: Registering the id_resolver key type Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902680] Key type id_resolver registered Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902682] Key type id_legacy registered Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test1 <========== Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 9.163011] random: nonblocking pool is initialized Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test2 <=========== *** Test Case 2 - Restart snmpd : To reproduce this case, autofs mounts should not be mounted to begin with. (restart autofs or let it expire) #systemctl restart snmpd.service Syslog entries : Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopping LSB: SNMP agents... Jul 11 11:15:40 xenial-vm3 snmpd[1668]: * Stopping SNMP services: Jul 11 11:15:40 xenial-vm3 snmpd[1434]: Received TERM or STOP signal... shutting down... Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopped LSB: SNMP agents. Jul 11 11:15:40 xenial-vm3 systemd[1]: Starting LSB: SNMP agents... Jul 11 11:15:42 xenial-vm3 snmpd[1677]: * Starting SNMP services: Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 145: Warning: Unknown token: defaultMonitors. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 147: Warning: Unknown token: linkUpDownNotifications. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: Turning on AgentX master support. Jul 11 11:15:42 xenial-vm3 systemd[1]: Started LSB: SNMP agents. Jul 11 11:15:42 xenial-vm3 snmpd[1708]: NET-SNMP version 5.7.3 [Regression Potential] TBD [Other] Similar problem : https://sourceforge.net/p/net-snmp/patches/1350/ I built a test package with this patch. PPA : https://launchpad.net/~joalif/+archive/ubuntu/sf227130-test - The user reported back that the problem would still persist even with the test package. - Initially while testing it in my environment it would seem that the test package would not solve the problem entirely. However, after further rigorous testing I doubt the integrity of my first test results. I had not taken into account the expiration of mounts. Autofs mount points were already mounted before installing the test package, the expiration time was long enough not to be unmounted and therefore when installing the test package autofs mounts were there which was misleading. Now after careful testing it seems that the test package is working. However, I would like more people to test as well to make sure whether the test package is actually working or not. [Impact] Autofs direct map triggers are visible in /etc/mtab. On boot, when snmpd starts, it iterates over the entries in /etc/mtab and performs statfs() on them. This trigger automount to mount autofs mounts even if the user does not explicitly access them. However this happens only if autofs service is started before snmpd. If snmpd stars first /etc/mtab is not yet populated with autofs mounts and therefore are not mounted. When there a few autofs mount points the impact is insignificant. However when there are thousands of them, this causes unnecessary overhead on operations such as df. This also delays the system shutdown time since everything needs to be unmounted. [Test Case] *** Test Case 1 - During boot: The user that brought this issue to our attention would observe all autofs mounts be mounted at boot, because in their environment autofs would start first. In my environment snmpd starts first so to reproduce I had to add a small delay in snmpd init script. In /etc/init.d/snmp : @@ -36,6 +36,8 @@ cd /  case "$1" in    start) + # Delay snmp start + sleep 2      log_daemon_msg "Starting SNMP services:"      # remove old symlink with previous version      if [ -L /var/run/agentx ]; then $cat /etc/auto.master /- /etc/auto.nfs --timeout=30 $cat /etc/auto.nfs /home/test1 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test1 /home/test2 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test2 Reboot vm, syslog entries : # Autofs starts Jul 11 11:04:16 xenial-vm3 autofs[1295]: * Starting automount... Jul 11 11:04:16 xenial-vm3 automount[1357]: Starting automounter version 5.1.1, master map /etc/auto.master Jul 11 11:04:16 xenial-vm3 automount[1357]: using kernel protocol version 5.02 # Mount triggers, now visible in mtab Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test1 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test2 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 autofs[1295]: ...done. ... # SNMP starts Jul 11 11:04:18 xenial-vm3 snmpd[1294]: * Starting SNMP services: Jul 11 11:04:18 xenial-vm3 systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1394 (snmpd) Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounting Arbitrary Executable File Formats File System... Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounted Arbitrary Executable File Formats File System. Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 8.880685] FS-Cache: Loaded Jul 11 11:04:18 xenial-vm3 kernel: [ 8.889318] FS-Cache: Netfs 'nfs' registered for caching Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902672] NFS: Registering the id_resolver key type Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902680] Key type id_resolver registered Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902682] Key type id_legacy registered Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test1 <========== Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 9.163011] random: nonblocking pool is initialized Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test2 <=========== *** Test Case 2 - Restart snmpd : To reproduce this case, autofs mounts should not be mounted to begin with. (restart autofs or let it expire) #systemctl restart snmpd.service Syslog entries : Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopping LSB: SNMP agents... Jul 11 11:15:40 xenial-vm3 snmpd[1668]: * Stopping SNMP services: Jul 11 11:15:40 xenial-vm3 snmpd[1434]: Received TERM or STOP signal... shutting down... Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopped LSB: SNMP agents. Jul 11 11:15:40 xenial-vm3 systemd[1]: Starting LSB: SNMP agents... Jul 11 11:15:42 xenial-vm3 snmpd[1677]: * Starting SNMP services: Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 145: Warning: Unknown token: defaultMonitors. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 147: Warning: Unknown token: linkUpDownNotifications. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: Turning on AgentX master support. Jul 11 11:15:42 xenial-vm3 systemd[1]: Started LSB: SNMP agents. Jul 11 11:15:42 xenial-vm3 snmpd[1708]: NET-SNMP version 5.7.3 [Regression Potential] The regression potential of these patch is low. The patch essentially adds support for autofs mounts in order to detect them and treat them separately when calling stafs; autofs entries are skipped to prevent them from being mounting every time snmpd is restarted. Therefore, any regression that may be caused by this patch will be autofs related. [Other] Similar problem : https://sourceforge.net/p/net-snmp/patches/1350/ I built a test package with this patch. PPA : https://launchpad.net/~joalif/+archive/ubuntu/sf227130-test - The user reported back that the problem would still persist even with the test package. - Initially while testing it in my environment it would seem that the test package would not solve the problem entirely. However, after further rigorous testing I doubt the integrity of my first test results. I had not taken into account the expiration of mounts. Autofs mount points were already mounted before installing the test package, the expiration time was long enough not to be unmounted and therefore when installing the test package autofs mounts were there which was misleading. Now after careful testing it seems that the test package is working. However, I would like more people to test as well to make sure whether the test package is actually working or not.
2019-08-21 16:00:43 Ioanna Alifieraki bug watch added https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935325
2019-08-21 16:00:43 Ioanna Alifieraki bug task added net-snmp (Debian)
2019-08-21 16:04:38 Ioanna Alifieraki description [Impact] Autofs direct map triggers are visible in /etc/mtab. On boot, when snmpd starts, it iterates over the entries in /etc/mtab and performs statfs() on them. This trigger automount to mount autofs mounts even if the user does not explicitly access them. However this happens only if autofs service is started before snmpd. If snmpd stars first /etc/mtab is not yet populated with autofs mounts and therefore are not mounted. When there a few autofs mount points the impact is insignificant. However when there are thousands of them, this causes unnecessary overhead on operations such as df. This also delays the system shutdown time since everything needs to be unmounted. [Test Case] *** Test Case 1 - During boot: The user that brought this issue to our attention would observe all autofs mounts be mounted at boot, because in their environment autofs would start first. In my environment snmpd starts first so to reproduce I had to add a small delay in snmpd init script. In /etc/init.d/snmp : @@ -36,6 +36,8 @@ cd /  case "$1" in    start) + # Delay snmp start + sleep 2      log_daemon_msg "Starting SNMP services:"      # remove old symlink with previous version      if [ -L /var/run/agentx ]; then $cat /etc/auto.master /- /etc/auto.nfs --timeout=30 $cat /etc/auto.nfs /home/test1 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test1 /home/test2 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test2 Reboot vm, syslog entries : # Autofs starts Jul 11 11:04:16 xenial-vm3 autofs[1295]: * Starting automount... Jul 11 11:04:16 xenial-vm3 automount[1357]: Starting automounter version 5.1.1, master map /etc/auto.master Jul 11 11:04:16 xenial-vm3 automount[1357]: using kernel protocol version 5.02 # Mount triggers, now visible in mtab Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test1 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test2 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 autofs[1295]: ...done. ... # SNMP starts Jul 11 11:04:18 xenial-vm3 snmpd[1294]: * Starting SNMP services: Jul 11 11:04:18 xenial-vm3 systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1394 (snmpd) Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounting Arbitrary Executable File Formats File System... Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounted Arbitrary Executable File Formats File System. Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 8.880685] FS-Cache: Loaded Jul 11 11:04:18 xenial-vm3 kernel: [ 8.889318] FS-Cache: Netfs 'nfs' registered for caching Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902672] NFS: Registering the id_resolver key type Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902680] Key type id_resolver registered Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902682] Key type id_legacy registered Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test1 <========== Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 9.163011] random: nonblocking pool is initialized Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test2 <=========== *** Test Case 2 - Restart snmpd : To reproduce this case, autofs mounts should not be mounted to begin with. (restart autofs or let it expire) #systemctl restart snmpd.service Syslog entries : Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopping LSB: SNMP agents... Jul 11 11:15:40 xenial-vm3 snmpd[1668]: * Stopping SNMP services: Jul 11 11:15:40 xenial-vm3 snmpd[1434]: Received TERM or STOP signal... shutting down... Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopped LSB: SNMP agents. Jul 11 11:15:40 xenial-vm3 systemd[1]: Starting LSB: SNMP agents... Jul 11 11:15:42 xenial-vm3 snmpd[1677]: * Starting SNMP services: Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 145: Warning: Unknown token: defaultMonitors. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 147: Warning: Unknown token: linkUpDownNotifications. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: Turning on AgentX master support. Jul 11 11:15:42 xenial-vm3 systemd[1]: Started LSB: SNMP agents. Jul 11 11:15:42 xenial-vm3 snmpd[1708]: NET-SNMP version 5.7.3 [Regression Potential] The regression potential of these patch is low. The patch essentially adds support for autofs mounts in order to detect them and treat them separately when calling stafs; autofs entries are skipped to prevent them from being mounting every time snmpd is restarted. Therefore, any regression that may be caused by this patch will be autofs related. [Other] Similar problem : https://sourceforge.net/p/net-snmp/patches/1350/ I built a test package with this patch. PPA : https://launchpad.net/~joalif/+archive/ubuntu/sf227130-test - The user reported back that the problem would still persist even with the test package. - Initially while testing it in my environment it would seem that the test package would not solve the problem entirely. However, after further rigorous testing I doubt the integrity of my first test results. I had not taken into account the expiration of mounts. Autofs mount points were already mounted before installing the test package, the expiration time was long enough not to be unmounted and therefore when installing the test package autofs mounts were there which was misleading. Now after careful testing it seems that the test package is working. However, I would like more people to test as well to make sure whether the test package is actually working or not. [Impact] Autofs direct map triggers are visible in /etc/mtab. On boot, when snmpd starts, it iterates over the entries in /etc/mtab and performs statfs() on them. This trigger automount to mount autofs mounts even if the user does not explicitly access them. However this happens only if autofs service is started before snmpd. If snmpd stars first /etc/mtab is not yet populated with autofs mounts and therefore are not mounted. When there a few autofs mount points the impact is insignificant. However when there are thousands of them, this causes unnecessary overhead on operations such as df. This also delays the system shutdown time since everything needs to be unmounted. [Test Case] *** Test Case 1 - During boot: The user that brought this issue to our attention would observe all autofs mounts be mounted at boot, because in their environment autofs would start first. In my environment snmpd starts first so to reproduce I had to add a small delay in snmpd init script. In /etc/init.d/snmp : @@ -36,6 +36,8 @@ cd /  case "$1" in    start) + # Delay snmp start + sleep 2      log_daemon_msg "Starting SNMP services:"      # remove old symlink with previous version      if [ -L /var/run/agentx ]; then $cat /etc/auto.master /- /etc/auto.nfs --timeout=30 $cat /etc/auto.nfs /home/test1 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test1 /home/test2 -fstype=nfs,hard,intr,nosuid,no-subtree-check,tcp <NFS server IP>:/srv/export/test2 Reboot vm, syslog entries : # Autofs starts Jul 11 11:04:16 xenial-vm3 autofs[1295]: * Starting automount... Jul 11 11:04:16 xenial-vm3 automount[1357]: Starting automounter version 5.1.1, master map /etc/auto.master Jul 11 11:04:16 xenial-vm3 automount[1357]: using kernel protocol version 5.02 # Mount triggers, now visible in mtab Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test1 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 automount[1357]: mounted direct on /home/test2 with timeout 300, freq 75 seconds Jul 11 11:04:16 xenial-vm3 autofs[1295]: ...done. ... # SNMP starts Jul 11 11:04:18 xenial-vm3 snmpd[1294]: * Starting SNMP services: Jul 11 11:04:18 xenial-vm3 systemd[1]: proc-sys-fs-binfmt_misc.automount: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 1394 (snmpd) Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounting Arbitrary Executable File Formats File System... Jul 11 11:04:18 xenial-vm3 systemd[1]: Mounted Arbitrary Executable File Formats File System. Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 8.880685] FS-Cache: Loaded Jul 11 11:04:18 xenial-vm3 kernel: [ 8.889318] FS-Cache: Netfs 'nfs' registered for caching Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902672] NFS: Registering the id_resolver key type Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902680] Key type id_resolver registered Jul 11 11:04:18 xenial-vm3 kernel: [ 8.902682] Key type id_legacy registered Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test1 <========== Jul 11 11:04:18 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <========== Jul 11 11:04:18 xenial-vm3 kernel: [ 9.163011] random: nonblocking pool is initialized Jul 11 11:04:18 xenial-vm3 automount[1357]: mounted /home/test2 <=========== *** Test Case 2 - Restart snmpd : To reproduce this case, autofs mounts should not be mounted to begin with. (restart autofs or let it expire) #systemctl restart snmpd.service Syslog entries : Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopping LSB: SNMP agents... Jul 11 11:15:40 xenial-vm3 snmpd[1668]: * Stopping SNMP services: Jul 11 11:15:40 xenial-vm3 snmpd[1434]: Received TERM or STOP signal... shutting down... Jul 11 11:15:40 xenial-vm3 systemd[1]: Stopped LSB: SNMP agents. Jul 11 11:15:40 xenial-vm3 systemd[1]: Starting LSB: SNMP agents... Jul 11 11:15:42 xenial-vm3 snmpd[1677]: * Starting SNMP services: Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test1 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: attempting to mount entry /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 automount[1357]: mounted /home/test2 <=========== Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 145: Warning: Unknown token: defaultMonitors. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: /etc/snmp/snmpd.conf: line 147: Warning: Unknown token: linkUpDownNotifications. Jul 11 11:15:42 xenial-vm3 snmpd[1684]: Turning on AgentX master support. Jul 11 11:15:42 xenial-vm3 systemd[1]: Started LSB: SNMP agents. Jul 11 11:15:42 xenial-vm3 snmpd[1708]: NET-SNMP version 5.7.3 [Regression Potential] The regression potential of these patch is low. The patch essentially adds support for autofs mounts in order to detect them and treat them separately when calling stafs; autofs entries are skipped to prevent them from being mounting every time snmpd is restarted. Therefore, any regression that may be caused by this patch will be autofs related. [Other] Upstream bug : https://sourceforge.net/p/net-snmp/bugs/2968/ Upstream patches : https://sourceforge.net/p/net-snmp/patches/1350/ https://sourceforge.net/p/net-snmp/code/ci/a0df31c18c513a0d79f4d526b1af7fad48748e57/ Debian Bug : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935325
2019-08-21 21:17:19 Dan Streetman tags patch sts patch sts sts-sponsor sts-sponsor-ddstreet
2019-08-22 23:06:51 Launchpad Janitor net-snmp (Ubuntu Eoan): status In Progress Fix Released
2019-08-29 11:59:04 Eric Desrochers bug added subscriber Eric Desrochers
2019-08-29 11:59:44 Eric Desrochers tags patch sts sts-sponsor sts-sponsor-ddstreet patch sts
2019-08-29 12:02:00 Eric Desrochers removed subscriber STS Sponsors
2019-08-29 13:31:49 Łukasz Zemczak bug added subscriber Ubuntu Server
2019-08-29 14:40:29 Łukasz Zemczak net-snmp (Ubuntu Disco): status In Progress Fix Committed
2019-08-29 14:40:31 Łukasz Zemczak bug added subscriber Ubuntu Stable Release Updates Team
2019-08-29 14:40:35 Łukasz Zemczak bug added subscriber SRU Verification
2019-08-29 14:40:40 Łukasz Zemczak tags patch sts patch sts verification-needed verification-needed-disco
2019-08-29 14:42:41 Łukasz Zemczak net-snmp (Ubuntu Bionic): status In Progress Fix Committed
2019-08-29 14:43:06 Łukasz Zemczak tags patch sts verification-needed verification-needed-disco patch sts verification-needed verification-needed-bionic verification-needed-disco
2019-08-29 14:45:31 Łukasz Zemczak net-snmp (Ubuntu Xenial): status In Progress Fix Committed
2019-08-29 14:46:09 Łukasz Zemczak tags patch sts verification-needed verification-needed-bionic verification-needed-disco patch sts verification-needed verification-needed-bionic verification-needed-disco verification-needed-xenial
2019-09-03 13:21:43 Bug Watch Updater net-snmp (Debian): status Unknown New
2019-09-03 17:32:39 Chris Newcomer attachment added Xenial typescript output https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1835818/+attachment/5286498/+files/xenial_validate.txt
2019-09-03 17:33:04 Chris Newcomer attachment added Bionic typescript output https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1835818/+attachment/5286499/+files/bionic_validate.txt
2019-09-03 17:33:28 Chris Newcomer attachment added Disco typescript output https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1835818/+attachment/5286500/+files/disco_validate.txt
2019-09-03 17:37:46 Eric Desrochers tags patch sts verification-needed verification-needed-bionic verification-needed-disco verification-needed-xenial patch sts verification-done-bionic verification-done-disco verification-done-xenial verification-needed
2019-09-04 17:51:04 Bryce Harrington tags patch sts verification-done-bionic verification-done-disco verification-done-xenial verification-needed patch sts verification-done verification-done-bionic verification-done-disco verification-done-xenial
2019-09-05 09:36:44 Launchpad Janitor net-snmp (Ubuntu Disco): status Fix Committed Fix Released
2019-09-05 09:36:49 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team
2019-09-05 10:49:54 Launchpad Janitor net-snmp (Ubuntu Bionic): status Fix Committed Fix Released
2019-09-05 10:52:12 Launchpad Janitor net-snmp (Ubuntu Xenial): status Fix Committed Fix Released
2019-09-05 21:39:29 Lorenzo Portela Brazuna bug added subscriber Lorenzo Portela Brazuna
2019-09-09 07:24:42 Łukasz Zemczak net-snmp (Ubuntu Disco): status Fix Released Fix Committed
2019-09-09 07:24:46 Łukasz Zemczak bug added subscriber Ubuntu Stable Release Updates Team
2019-09-09 07:24:52 Łukasz Zemczak tags patch sts verification-done verification-done-bionic verification-done-disco verification-done-xenial patch sts verification-done-bionic verification-done-xenial verification-needed verification-needed-disco
2019-09-09 07:48:03 Łukasz Zemczak net-snmp (Ubuntu Bionic): status Fix Released Fix Committed
2019-09-09 07:48:10 Łukasz Zemczak tags patch sts verification-done-bionic verification-done-xenial verification-needed verification-needed-disco patch sts verification-done-xenial verification-needed verification-needed-bionic verification-needed-disco
2019-09-09 08:12:37 Łukasz Zemczak net-snmp (Ubuntu Xenial): status Fix Released Fix Committed
2019-09-09 08:12:44 Łukasz Zemczak tags patch sts verification-done-xenial verification-needed verification-needed-bionic verification-needed-disco patch sts verification-needed verification-needed-bionic verification-needed-disco verification-needed-xenial
2019-09-09 23:42:39 Eric Desrochers tags patch sts verification-needed verification-needed-bionic verification-needed-disco verification-needed-xenial patch sts verification-done-bionic verification-done-disco verification-done-xenial verification-needed
2019-09-12 08:06:55 Lars Kollstedt bug added subscriber Lars Kollstedt
2019-09-12 11:28:21 Launchpad Janitor net-snmp (Ubuntu Disco): status Fix Committed Fix Released
2019-09-12 11:28:32 Launchpad Janitor net-snmp (Ubuntu Bionic): status Fix Committed Fix Released
2019-09-12 11:28:41 Launchpad Janitor net-snmp (Ubuntu Xenial): status Fix Committed Fix Released
2019-12-13 05:50:34 Launchpad Janitor merge proposal linked https://code.launchpad.net/~rafaeldtinoco/+git/net-snmp/+merge/376740
2019-12-13 05:59:22 Launchpad Janitor merge proposal linked https://code.launchpad.net/~rafaeldtinoco/+git/net-snmp/+merge/376741
2019-12-13 18:10:36 Launchpad Janitor merge proposal linked https://code.launchpad.net/~rafaeldtinoco/ubuntu/+source/net-snmp/+git/net-snmp/+merge/376795
2021-03-24 08:29:30 Bug Watch Updater net-snmp (Debian): status New Incomplete
2022-06-21 22:16:55 Bug Watch Updater net-snmp (Debian): status Incomplete Fix Released