From owner-freebsd-amd64@freebsd.org Wed Dec 21 15:07:04 2016 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A06DC8A5F7 for ; Wed, 21 Dec 2016 15:07:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70E491E7A for ; Wed, 21 Dec 2016 15:07:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uBLF743t029497 for ; Wed, 21 Dec 2016 15:07:04 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 215471] Using bsnmpd with the snmp_hostres module on a vmware ESXi guest with a disconnected CD drive uses 100% CPU Date: Wed, 21 Dec 2016 15:07:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jimp@pfsense.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2016 15:07:04 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215471 Bug ID: 215471 Summary: Using bsnmpd with the snmp_hostres module on a vmware ESXi guest with a disconnected CD drive uses 100% CPU Product: Base System Version: 11.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: freebsd-bugs@FreeBSD.org Reporter: jimp@pfsense.org CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Created attachment 178177 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D178177&action= =3Dedit A configuration file for bsnmpd which can reproduce the high CPU usage prob= lem on a vmware guest When running FreeBSD 11.0-RELEASE (from release until at least -p5), there = is a combination of factors that leads to bsnmpd using 100% CPU. It seems to require all of the following: * FreeBSD 11 running as a guest in VMWare ESXi * The guest has a "CD/DVD Drive" listed in its hardware on ESX * The CD/DVD Drive is in a disconnected state * The snmp_hostres module is loaded in the bsnmpd configuration file * bsnmpd enabled and running Here is a very small snmpd.config that can replicate the problem in a simil= ar environment: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D %snmpd sysDescr =3D "FreeBSD doctor.example.com FreeBSD 11.0-RELEASE-p5 amd64" begemotSnmpdCommunityString.0.1 =3D "supersecret" begemotSnmpdPortStatus.0.0.0.0.161 =3D 1 begemotSnmpdModulePath."mibII" =3D "/usr/lib/snmp_mibII.so" begemotSnmpdModulePath."hostres" =3D "/usr/lib/snmp_hostres.so" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D If bsnmpd is run on this guest with that configuration, it consumes all available CPU.=20 I'll attach the above snmpd.config, along with top output and a sample of t= he truss output taken while bsnmpd was running. Currently the only workaround is to disable the hostres module, but that me= ans losing access to any of the information it provides. --=20 You are receiving this mail because: You are on the CC list for the bug.=