Bug 222331 - net-mgmt/net-snmp: HOST-RESOURCES-MIB::hrSWInstalled* entries become unavailable after some time
Summary: net-mgmt/net-snmp: HOST-RESOURCES-MIB::hrSWInstalled* entries become unavaila...
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-14 15:44 UTC by Mathieu Arnold
Modified: 2024-09-29 09:18 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Arnold freebsd_committer freebsd_triage 2017-09-14 15:44:47 UTC
It appears that this MIB becomes unaccessible after a few minutes of starting snmpd.

If I restart it, I can get all the informations that are in it:

# snmpwalk -c local42 -v2c 127.0.0.1 .1.3.6.1.2.1.25.6.3.1|head
HOST-RESOURCES-MIB::hrSWInstalledIndex.1 = INTEGER: 1
HOST-RESOURCES-MIB::hrSWInstalledIndex.2 = INTEGER: 2
[...]

But after a few minutes, (less than 10), it becomes unavailable:

# snmpwalk -c local42 -v2c 127.0.0.1 .1.3.6.1.2.1.25.6.3.1
HOST-RESOURCES-MIB::hrSWInstalledEntry = No Such Object available on this agent at this OID
Comment 1 Ryan Steinmetz freebsd_committer freebsd_triage 2017-09-14 15:52:44 UTC
Can you provide me with some additional details on this?

This works fine for me using SNMPv3.  These are the details of one of the hosts:

10.3-RELEASE-p20
net-snmp-5.7.3_17
pkg-1.10.1

net-snmp was built with:
net-mgmt_net-snmp_UNSET=SMUX
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2017-09-14 15:56:45 UTC
The options I have are:

Options        :
        AX_DISABLE_TRAP: off
        AX_SOCKONLY    : off
        DOCS           : on
        DUMMY          : on
        IPV6           : on
        JAIL           : off
        MFD_REWRITES   : on
        MYSQL          : off
        PERL           : on
        PERL_EMBEDDED  : on
        PYTHON         : off
        SMUX           : on
        TKMIB          : off
        TLS            : off
        UNPRIVILEGED   : off


It happens on 10.3, 11.0 and 11.1.

and net-snmp-5.7.3_17.
Comment 3 Ryan Steinmetz freebsd_committer freebsd_triage 2017-09-14 20:31:08 UTC
Please try rebuilding without MFD_REWRITES.

Most people think that this option enables 64-bit interface counters, etc., but this isn't actually the case.  Those counters will still be there without it.

Your environment seems to match mine exactly with the only differences being the following:
- SNMPv2c vs SNMPv3
- MFD_REWRITES vs no MFD_REWRITES.

Once we narrow down which combination is causing the issue, I'll have an easier time getting this resolved with the upstream developers.

Thanks!
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2017-09-14 21:07:12 UTC
Mmmm, it is exactly what it says it does:

 │ │ [x] MFD_REWRITES     Build with 64-bit Interface Counters    │ │

If it does not do that, then the option description should reflect what it actually does :-)
Comment 5 Mathieu Arnold freebsd_committer freebsd_triage 2017-09-14 21:08:15 UTC
I will try to disable that option though.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-09-14 21:23:42 UTC
A commit references this bug:

Author: zi
Date: Thu Sep 14 21:23:14 UTC 2017
New revision: 449855
URL: https://svnweb.freebsd.org/changeset/ports/449855

Log:
  - Update MFD description

  PR:		222331

Changes:
  head/net-mgmt/net-snmp/Makefile
Comment 7 Ryan Steinmetz freebsd_committer freebsd_triage 2017-09-14 21:23:54 UTC
Fantastic point.  Committed!
Comment 8 Mathieu Arnold freebsd_committer freebsd_triage 2017-09-14 21:34:44 UTC
So, rebuilt it:

https://pkg.absolight.fr/data/11amd64-pkgng-default/20170914T231414Z/logs/net-snmp-5.7.3_17.log

I still have the same problem. It works for a few minutes, and then I get:

# snmpwalk -c local42 -v2c 127.0.0.1 .1.3.6.1.2.1.25.6.3.1
HOST-RESOURCES-MIB::hrSWInstalledEntry = No Such Object available on this agent at this OID
Comment 9 Ryan Steinmetz freebsd_committer freebsd_triage 2017-09-15 11:49:05 UTC
After investigating the debug log you provided, we're seeing this error:
SWInst: error opening pkgng db

Which means that this call to open the pkgdb is failing:
pkgdb_open(&db, PKGDB_DEFAULT)


We will need to figure out why the call to pkgdb_open() isn't returning EPKG_OK to solve this.
Comment 10 Dan Langille freebsd_committer freebsd_triage 2020-07-31 12:50:06 UTC
I've encountered this situation on FreeBSD 12.1 with net-snmp-5.7.3_20,1
Comment 11 Mark Linimon freebsd_committer freebsd_triage 2024-02-08 04:01:28 UTC
^Triage: bugmeister question: is this aging PR still relevant?
Comment 12 Mark Linimon freebsd_committer freebsd_triage 2024-09-29 09:18:02 UTC
^Triage: feedback timeout (> 6 months).