https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162016-12-21T10:09:44ZpfSense bugtrackerpfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=300412016-12-21T10:09:44ZJim Pingle
<ul></ul><p>Reproduced it on a stock FreeBSD 11 system.</p>
<p>Opened a bug report upstream: <a class="external" href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215471">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215471</a></p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=304382017-01-07T12:28:21ZJim Thompsonjim@netgate.com
<ul><li><strong>Assignee</strong> set to <i>Jim Pingle</i></li></ul> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=304472017-01-07T18:00:06ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Don't allow SNMP hostres module to be selected or used with VMware VMs that have a CD/DVD Drive d..." href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/43de83978ed93c9a4886e2844e341af0f3fe9a05">43de83978ed93c9a4886e2844e341af0f3fe9a05</a>.</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=305022017-01-09T10:30:22ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Needs Patch</i></li><li><strong>Target version</strong> changed from <i>2.4.0</i> to <i>2.4.1</i></li></ul><p>The workaround is present and prevents the problem case from causing harm.</p>
<p>Rather than close this out, I'll leave it open and set it to the next likely release so we can check if the bug has been fixed upstream. When it is fixed upstream, the workaround can be removed.</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=342932017-10-12T23:42:26ZStéphane Lapie
<ul></ul><p>It should be noted that when upgrading, if the host resources MIB was already selected BEFORE the upgrade, it will remain that way, and the bug will take effect.<br />The problem is : since the configuration item is now masked in the UI, it seems it is also impossible to deactivate the MIB. (Or does saving the SNMP configuration again clear the flag?)</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=343022017-10-13T09:32:33ZJim Pingle
<ul></ul><p>It looks like there is actually a patch for FreeBSD now which might help: <a class="external" href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209368">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209368</a></p>
<p>Stéphane Lapie wrote:</p>
<blockquote>
<p>(Or does saving the SNMP configuration again clear the flag?)</p>
</blockquote>
<p>The backend code should already be omitting hostres when it detects the condition which causes the GUI to disable the control.</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=343182017-10-13T15:42:50ZChris Stocker
<ul></ul><p>Looks Like KVM has the same issue btw. I am running 2.4.1-DEVELOPMENT (amd64) <br />built on Fri Oct 13 12:32:36 CDT 2017 if that makes a difference</p>
<p>[2.4.1-DEVELOPMENT][]/home/root: top -b 5<br />last pid: 24068; load averages: 0.55, 0.45, 0.40 up 0+01:07:12 16:13:35<br />53 processes: 2 running, 51 sleeping</p>
<p>Mem: 117M Active, 405M Inact, 315M Wired, 199M Buf, 1114M Free<br />Swap: 2048M Total, 2048M Free</p>
<pre><code>PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND<br />91032 root 1 88 0 85624K 45472K CPU0 0 0:14 53.66% bsnmpd<br /> 938 root 1 21 0 9556K 5324K select 1 0:27 2.20% devd<br />45404 unbound 2 20 0 93644K 70760K kqread 1 1:29 0.00% unbound<br /> 884 root 1 20 0 282M 38296K kqread 1 0:08 0.00% php-fpm<br />20813 root 1 20 0 246M 46576K nanslp 0 0:06 0.00% php</code></pre>
<p>[2.4.1-DEVELOPMENT][]/root: less /tmp/truss-output<br />close(15) = 0 (0x0)<br />gettimeofday({ 1507925879.568291 },0x0) = 0 (0x0)<br />gettimeofday({ 1507925879.568401 },0x0) = 0 (0x0)<br />select(15,{ 3 8 13 14 },{ },{ },{ 0.179103 }) = 1 (0x1)<br />read(8,"!system=CAM subsystem=periph typ"...,512) = 163 (0xa3)<br />_<em>sysctl(0x7fffffffbcf0,0x2,0x7fffffffbd40,0x7fffffffbd38,0x8022516f6,0xb) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbd40,0x3,0x7fffffffbe18,0x7fffffffbe10,0x0,0x0) = 0 (0x0)<br />_<em>sysctl(0x7fffffffbec8,0x2,0x7fffffffbe30,0x7fffffffc050,0x802251750,0xe) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br />_<em>sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br />_<em>sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br />_<em>sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br />_<em>sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br />_<em>sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br /></em>_sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)<br />__sysctl(0x7fffffffbe30,0x5,0x7fffffffbed0,0x7fffffffbe28,0x0,0x0) = 0 (0x0)</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=343232017-10-14T14:44:13ZPi Ba
<ul></ul><p>Please either fix the underlying issue if possible. Or at least commit this workaround that seems to be needed for most (all?) hypervisor platforms..<br /><a class="external" href="https://github.com/pfsense/pfsense/pull/3821">https://github.com/pfsense/pfsense/pull/3821</a></p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=343242017-10-14T15:38:24ZJim Pingle
<ul><li><strong>Assignee</strong> changed from <i>Jim Pingle</i> to <i>Renato Botelho</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Very High</i></li></ul><p>Judging by some responses on the forum it can also happen on bare metal, not just VMs. The exact conditions are unclear for some, but at least one had a CD/DVD drive without media inside, similar to the VM case. Someone else saw it on a USB drive as well.</p>
<p>Hopefully the patch I linked above in note 6 will fix it for everyone.</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=343312017-10-15T10:41:56ZMichael Knowlesmichael.knowles@pentangle.co.uk
<ul></ul><p>Just found this bug report after chasing down the issue on my office's pfsense install that was upgraded to 2.4.</p>
<p>I can confirm that as per Stephane Lapie's comment 2 days ago "host resources" is not available through the GUI, so unticking a different module (in this case REGEX) and saving the config removed the high CPU state, and adding REGEX back in didn't return it to the high state.</p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=343332017-10-15T17:13:18ZBrendon Baumgartner
<ul></ul><p>I don't see any mention about memory leaks here but this might be related.<br /><a class="external" href="https://forum.pfsense.org/index.php?topic=138054.0">https://forum.pfsense.org/index.php?topic=138054.0</a></p> pfSense - Bug #6882: bsnmpd uses all available CPU with hostres module active in some caseshttps://redmine.pfsense.org/issues/6882?journal_id=344242017-10-18T09:10:28ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Needs Patch</i> to <i>Resolved</i></li></ul><p>After importing the FreeBSD patch, this appears to be OK. CPU usage is back to normal, no sign of a memory leak, and hostres can be active inside VMs and on hardware that showed the problem again.</p>