From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011023 Description of problem: I upgraded ucd-snmp to 4.2.1-4.7.x from 4.2-12 and it now segfaults if the "disk" directive is uncommented from the configuration file. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.uncomment disk directive in /etc/snmp/snmpd.conf 2.startup snmpd from command line without forking to see output (snmpd -P /var/run/snmpd -s -a -D -f) Actual Results: segmentation fault while Parsing: disk / 10000 Additional info:
*** Bug 55538 has been marked as a duplicate of this bug. ***
RH 7.0 does it too. My original config had a disk directive in it, and when the RPM was installed automatically last night, it brought down snmpd. Thanks for posting this bug report. At least I knew what to do to get SNMP back up on it's feet.
This is a problem with the machine on which the new ucd-snmp RPMs were build. From that version's configure.in: AC_CACHE_CHECK(for mount table location,ac_cv_ETC_MNTTAB, [ac_cv_ETC_MNTTAB="unknown" for i in /etc/mnttab /etc/mtab do if test -f $i; then ac_cv_ETC_MNTTAB="$i" break; fi done ]) If /etc/mtab or /etc/mnttab aren't present on the build host, it defaults to unknown. When you add a disk directive to snmpd.conf, ucd-snmp calls setmntent() on this file, which returns NULL (ENOENT). ucd-snmp doesn't check the return value of setmntent() (this should be kicked upstream) and passes it blindly to getmntent(), which segfaults on the NULL handle. Fix: re-build the SRPM on a machine with an /etc/mtab. The rawhide and/or RH 7.2 RPM might have been built on a machine with an /etc/mtab, so those RPMs might also work. 58131 and 57464 are duplicates of this bug.
The latest version (4.2.3) is available via rawhide now. This should fix this problem. Thanks, Read ya, Phil
Looks like this bug is back with the RHSA-2001-163 release of ucd-snmp-4.2.3-1.x.x.3.i386.rpm. I've tried the 6.x, 7.1, and 7.2 releases of the RPM. With "disk / 10000" uncommented snmpd will not start. With it commented, snmpd runs fine.
*** Bug 57464 has been marked as a duplicate of this bug. ***
*** Bug 60683 has been marked as a duplicate of this bug. ***
OK, i've reopened the 'original' disk bug and will fix in somehow for the next release. Read ya, Phil
*** Bug 58959 has been marked as a duplicate of this bug. ***
*** Bug 61977 has been marked as a duplicate of this bug. ***
*** Bug 58131 has been marked as a duplicate of this bug. ***
The latest ucd-snmp package now has a final fix for this. It is using /etc/mtab hardcoded as the ETC_MNTTAB file. Verified with Skipjack beta and the latest build. The package ucd-snmp-4.2.4.pre3-4 should appear soon via rawhide. Hopefully closing this bug once and for all. :-) Read ya, Phil