Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

Top/ps/htop console hang with SNMP enabled

Description

After upgrading to 12 release i've noticed that i'm getting 3-10 second console hangs running top/htop with SNMP enabled, the snmp-agent.py script is always using ~35% CPU which is what drew me to narrowing it down to SNMP.

I'm exporting collectd data to an influxdb server and with SNMP enabled I see similar gaps in the process statistics as well, i've attached a grafana graph image where you can see the gaps in the data with SNMP enabled vs. disabled.

Other data is all present and it doesn't seem to effect accessing data on the system either, I can use the console for anything non-process stat related and it responds as expected. This system is providing several LUNs for ESXi over FC and that also seems to work as expected without any hangs.

The longer the system/snmp is up the worse the hangs seem to get.

I hadn't noticed this before with 11.3 nor the 12 RC1 on the console and the historical data doesn't show the missing gaps either.

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Ben Hughes 
October 26, 2020 at 12:50 PM

I've found this has already been reported at https://jira.ixsystems.com/browse/NAS-108050 and as reported there the same bug will hang the system trying to get a debug as the sysctl dump/capture hangs the system, so i'm hesitant to run a debug dump as my system has never come back without killing the offending process (with difficulty).

It appears to be this bug (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249258) that is being ran into as modifying the snmp-agent.py script to avoid the dbufs sysctl that will hang the system removes the issue.

Bonnie Follweiler 
October 26, 2020 at 12:29 PM

Thank you for the report .  Can you please provide a debug by navigating to System -> Advanced, click save debug, and upload attachment to this ticket?

Ben Hughes 
October 25, 2020 at 12:41 PM

https://www.truenas.com/community/threads/snmp-agent-py-continuously-hi-cpu-use.88262/

Following on from that thread and the high CPU usage of snmp-agent i've found that snmp-agent.py is continually crashing/hanging when trying to retrieve a filtered list of sysctls for kstat.zfs. Specifically kstat.zfs.misc.dbufs will cause the script to hang and also will hang the sysctl utility as well.

Duplicate

Details

Assignee

Reporter

Labels

Fix versions

Affects versions

Priority

More fields

Katalon Platform

Created October 24, 2020 at 1:07 PM
Updated July 1, 2022 at 5:00 PM
Resolved October 27, 2020 at 1:08 PM