Created attachment 443476 [details] Patch net-snmpd-5.3.2.2-9 We are monitoring the processes running on a CentOS host through snmpd. Every 3secs it will verify the value of the prErrorFlag. On some moments the prErrorFlag tells us that the process is not running, although it is running without any problems. The next check the prErrorFlag gives the actual situation again. The problem is located in the sh_count_procs function in agent/mibgroup/ucd-snmp/proc.c The patch is attached. Problem description: if ((status = fopen(cmdline, "r")) == NULL) { ==> The file will be opened, if it cannot be opened, we go to the next file with continue. if (fgets(cmdline, sizeof(cmdline), status) == NULL) { ==> The file is read, if it cannot be read, we should not abort (break) but go to the next file (continue) The situation that a file can be opened but not read can be that a process is running in the first if, but is stopped in the 2nd if. This should not result in the situation where it aborts the checking of the processes.
I've fixed it upstream, SVN rev. 19893.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1076.html