Hello all, The HOST-RESOURCES-MIB::hrSWInstalled support for FreeBSD pkg stops working after so many queries and requires an snmpd process restart. I have been observing this for quite some time and have only recently started to debug it. The code in question is at:
agent/mibgroup/host/data_access/swinst_pkginfo.c When debugging I see it throw either: snmp_log( LOG_ERR, "SWInst: error initializing pkgng db\n" ); or snmp_log( LOG_ERR, "SWInst: error opening pkgng db\n" ); neither of which should be true as nothing on the system changes. After seeing one of these for a few times there are no further messages at which point I believe it's having issues before it hits /* if we are using FreeBSD's pkgng */ if (pkgng) { if ((it = pkgdb_query(db, NULL, MATCH_ALL)) == NULL) { snmp_log( LOG_ERR, "SWInst: error querying pkgng db\n" ); return 1; } It seems that if the system has fewer packages installed it can be queried more times before it stops working. I was able to reproduce the issue every time at 19 queries on one test host. Could anyone provide any possible insight or ideas on what could be the issue here? I have compared the code with that used internally in FreeBSD pkg tool and it's nearly identical. The only thing that I felt was missing was declaring a readonly lock on the database but even adding that into the snmp code had no effect... Thanks -- Mark Felder ports-secteam & portmgr member f...@freebsd.org ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders