Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Hangs querying OpenBSD #26

Open
1 task done
jwillikers opened this issue Jan 13, 2024 · 4 comments
Open
1 task done

[Bug]: Hangs querying OpenBSD #26

jwillikers opened this issue Jan 13, 2024 · 4 comments
Labels

Comments

@jwillikers
Copy link
Contributor

Please try to fill out as much of the information below as you can. Thank you!

  • Yes, I've searched similar issues on GitHub and didn't find any.

Which version contains the bug?

https://github.com/NETWAYS/check_interfaces/tree/feature/authentication-enhancements

Describe the bug

Querying an OpenBSD system causes the plugin to hang and eventually timeout attempting to obtain the first set of MIBs.
I don't think this issue is related to adding SHA-256 auth support.

The same exact query works with my Linux based systems.

Here is the output of snmpbulkget on the specific OID's being queried when it hangs.

snmpbulkget router .1.3.6.1.2.1.1.3 .1.3.6.1.2.1.2.1 .1.3.6.1.2.1.2.2.1.2
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (5852) 0:00:58.52
IF-MIB::ifNumber.0 = INTEGER: 16
IF-MIB::ifDescr.1 = STRING: em0
SNMPv2-MIB::sysContact.0 = STRING: [email protected]
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifDescr.2 = STRING: em1
SNMPv2-MIB::sysName.0 = STRING: router.lan.jwillikers.io
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.3 = STRING: em2
SNMPv2-MIB::sysLocation.0 = STRING: Living_Room
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.4 = STRING: em3
SNMPv2-MIB::sysServices.0 = INTEGER: 76
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifDescr.5 = STRING: em4
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifDescr.6 = STRING: em5
SNMPv2-MIB::sysORIndex.1 = INTEGER: 1
IF-MIB::ifIndex.6 = INTEGER: 6
IF-MIB::ifDescr.7 = STRING: enc0
SNMPv2-MIB::sysORIndex.2 = INTEGER: 2
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifDescr.8 = STRING: lo0
SNMPv2-MIB::sysORIndex.3 = INTEGER: 3
IF-MIB::ifIndex.8 = INTEGER: 8
IF-MIB::ifDescr.9 = STRING: veb0
SNMPv2-MIB::sysORIndex.4 = INTEGER: 4
IF-MIB::ifIndex.9 = INTEGER: 9
IF-MIB::ifDescr.10 = STRING: vlan2

How to recreate the bug?

$ check_interfaces --auth-proto='SHA-256'  --auth-phrase='****' -h router --priv-proto='AES' --priv-phrase='****' --user='user'
[Starting benchmark] Start SNMP session
[Finished benchmark after 13.318007 ms] Start SNMP session
[Starting benchmark] Send SNMP request for OIDs: .1.3.6.1.2.1.1.3, .1.3.6.1.2.1.2.1, .1.3.6.1.2.1.2.2.1.2
[Finished benchmark after 90080.147729 ms] Send SNMP request for OIDs: .1.3.6.1.2.1.1.3, .1.3.6.1.2.1.2.1, .1.3.6.1.2.1.2.2.1.2
Timeout while reading interface descriptions from router
@RincewindsHat
Copy link
Member

curious, on linux I would ask for trying that with strace to see where this is hanging.
Is there an equivalent tool on *bsd?

@jwillikers
Copy link
Contributor Author

curious, on linux I would ask for trying that with strace to see where this is hanging. Is there an equivalent tool on *bsd?

I think ktrace might be the tool for that. I'll try that. I'm using OpenBSD's native SNMP daemon, too, not Net-SNMP, which might have something to do with it.

@jwillikers
Copy link
Contributor Author

Okay, I've run ktrace on the snmpd process on the OpenBSD system while running the hanging query. Here's both the debug output of the process and the trace dump.

snmpd-log.txt
snmpd-ktrace-dump.txt.gz

@martialblog martialblog removed the needs-triage Needs to be triaged label Jan 17, 2024
@RincewindsHat
Copy link
Member

Sorry, for the delay. I had a look at the logs, but I can't find any good hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants