The last time I upgraded Net-SNMP it wasn't reporting the hrSystemProcesses OID. I wrote about that here. This time around I've upgraded to v5.7 and discovered two issues so far.
I was able to reproduce both of these issues on OpenBSD/i386 5.0.
Update 2011-11-29: Net-SNMP 5.7.1 + fixes has been pushed to the OpenBSD 5.0-stable ports collection as well as 5.0-current ports. OpenBSD users should sync their ports tree and rebuild ports/net/net-snmp to alleviate the issues below.
#1 - Values returned by hrStorageUsed are incorrect⌗
The first is with respect to the values returned via hrStorageUsed in the HOST-RESOURCES-MIB. The numbers are way off. For example, prior to the upgrade a disk that reported hrStorageUsed of 1873784 units (3.8GB) now reports 23920757 units (49GB). The Net-SNMP git repo shows there's been some changes since v5.6.1 in the code that gathers disk stats. Looks like a bug was introduced somewhere.
Solution: Use Net-SNMP v5.7.1. The hrStorageUsed values in v5.7.1 are consistent with the values returned from v5.6.x. OpenBSD users, the net/net-snmp port in CVS HEAD is already updated to 5.7.1. Sync up and go.
#2 - Segfault when querying hrStorageTable⌗
The second issue is a segfault in snmpd when querying the hrStorageTable. The segfault is happening on the memcpy() call(s) in netsnmp_fsys_arch_load(). The segfault is inconsistent. Sometimes you can get a handful of good queries and responses before it happens. Other times it happens on the first query. I don't know why the segfault is happening, but I know that replacing memcpy() with strncpy() eliminates it. This is pretty hackish but I'm not skilled enough to debug this any further.
Solution: Apply the patch here. On OpenBSD you should be able to save the patch into ports/net/net-snmp/patches/ and rebuild the port. You will need this on Net-SNMP v5.7 and 5.7.1.
Am I the only one?⌗
Are other Net-SNMP users seeing these issues? Does anyone even use Net-SNMP anymore (particularly on OpenBSD)? Please leave a comment and let me know.
I'm crossing my fingers that I won't have to write another patch file the next time I upgrade Net-SNMP.