From owner-freebsd-current@freebsd.org Wed Nov 9 16:42:33 2016 Return-Path: Delivered-To: freebsd-current@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 163D9C384CC for ; Wed, 9 Nov 2016 16:42:33 +0000 (UTC) (envelope-from alex.deiter@gmail.com) Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90705AD; Wed, 9 Nov 2016 16:42:32 +0000 (UTC) (envelope-from alex.deiter@gmail.com) Received: by mail-lf0-x242.google.com with SMTP id o141so12411559lff.1; Wed, 09 Nov 2016 08:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:mime-version:date:subject:message-id :to; bh=V7MLzicAZkqFkBnv5qmEVdBOltfeUPMkvJ1WIj/XN18=; b=ve6vxAtc0A5zz2bdbPE6sD7Y0IPFbbS/ZG5zGhEh+4fV54XPdfQQYnbzpTFBPLObID BQ4G2NByC3q9Szwi732sn4zAAyIzFe0STzDdk07bRaR94nYttCaUUXXIYYP5cYusQovw drUf2iHZkn4RYilE97Yxl5ju2fC1Zx2emGVF857KaLgp+NUIPvq4OTNy9LGRXUrBA1C4 /ORfv+jcPIRV6mkpLe9AIDcHxA1pbq4cl9SFLxACQc7sW8KyX18FgTvNERDVNgrq/8/7 0Em9hER1lxytx9hxbJdcVzzyc/K+ohF+HRmFUdZ714DSvjy6A87w62nnvCMr8XWWER4W FFCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:to; bh=V7MLzicAZkqFkBnv5qmEVdBOltfeUPMkvJ1WIj/XN18=; b=CmlMMS0P39EHhwXphnfsw0P2tk0ekXX2AGdwjmdMSE+xQ/ZkvJe8GfsvyvmEOfr3eO i5pIuVMnton3/66SwoX+iERtE0fOfGcRYFwxU2rvmETFykES72UvBuJ36f9c5TG2CNqq uRzQHhsRvTHQAHZthsxIRdLBTaePvyUDXxNuqaZ819XjYvZOJmZ5NPn0fBdUGUldBbzR ig6oKUhUXbGKvHPoq0XIexFpOPXz9tLq+hGlwzwdHV20E0uzD574lEHCe413JtRtAfCf dBBneQJ+6WmgBEMi4A74xIMhK1gkcKgNdORcHPpYb0EcxP25jYg9QtcfM1Pckvw/Yleb Yhkg== X-Gm-Message-State: ABUngvc1qF6I2/A++qVVcef9o5+IabElPXTs/GbLhUTVGBXOTcbGHgnTSWlrQj6YXPq0IQ== X-Received: by 10.25.199.198 with SMTP id x189mr276224lff.164.1478709750241; Wed, 09 Nov 2016 08:42:30 -0800 (PST) Received: from tiamat.deiter.local ([109.167.157.231]) by smtp.gmail.com with ESMTPSA id m16sm79297lfj.24.2016.11.09.08.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2016 08:42:29 -0800 (PST) From: Alex Deiter Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Date: Wed, 9 Nov 2016 19:42:28 +0300 Subject: CURRENT [r308040] watchdogd regression Message-Id: To: FreeBSD CURRENT , avg@freebsd.org X-Mailer: Apple Mail (2.3251) X-Mailman-Approved-At: Wed, 09 Nov 2016 17:17:44 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2016 16:42:33 -0000 Hello, Just found that rev r308040 had introduced regression bug for watchdogd: if watchdogd start by default (without parameters), it use 100% CPU: PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU = COMMAND 14954 root 1 -52 r0 7524K 3496K CPU2 2 0:44 100.36% = watchdogd # truss -afd -p 14954 ... 14954: 1.640554819 ioctl(4,WDIOCPATPAT,0xffffea60) =3D 0 (0x0) 14954: 1.640608166 stat("/etc",{ mode=3Ddrwxr-xr-x = ,inode=3D21,size=3D109,blksize=3D7168 }) =3D 0 (0x0) 14954: 1.642456843 ioctl(4,WDIOCPATPAT,0xffffea60) =3D 0 (0x0) 14954: 1.642511284 stat("/etc",{ mode=3Ddrwxr-xr-x = ,inode=3D21,size=3D109,blksize=3D7168 }) =3D 0 (0x0) 14954: 1.643971019 ioctl(4,WDIOCPATPAT,0xffffea60) =3D 0 (0x0) 14954: 1.644008391 stat("/etc",{ mode=3Ddrwxr-xr-x = ,inode=3D21,size=3D109,blksize=3D7168 }) =3D 0 (0x0) 14954: 1.645305166 ioctl(4,WDIOCPATPAT,0xffffea60) =3D 0 (0x0) 14954: 1.645329823 stat("/etc",{ mode=3Ddrwxr-xr-x = ,inode=3D21,size=3D109,blksize=3D7168 }) =3D 0 (0x0) 14954: 1.646621223 ioctl(4,WDIOCPATPAT,0xffffea60) =3D 0 (0x0) 14954: 1.646645072 stat("/etc",{ mode=3Ddrwxr-xr-x = ,inode=3D21,size=3D109,blksize=3D7168 }) =3D 0 (0x0) 14954: 1.647935561 ioctl(4,WDIOCPATPAT,0xffffea60) =3D 0 (0x0) Root cause - uninitialized variable timeout_sec = https://svnweb.freebsd.org/base/head/usr.sbin/watchdogd/watchdogd.c?revisi= on=3D308040&view=3Dmarkup#l82 static u_int timeout_sec; and changes, introduced in r308040: 774 if (nap > timeout_sec / 2) 775 nap =3D timeout_sec / 2; Workaround: specify the desired timeout period in seconds:=20 watchdogd_enable=3D"YES" watchdogd_flags=3D"-t 128=E2=80=9D Thank you! -- Alex Deiter alex.deiter@gmail.com