Date: Wed, 9 Nov 2016 19:42:28 +0300 From: Alex Deiter <alex.deiter@gmail.com> To: FreeBSD CURRENT <freebsd-current@freebsd.org>, avg@freebsd.org Subject: CURRENT [r308040] watchdogd regression Message-ID: <B79F0069-726C-4A48-983B-C7560694DE48@gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B79F0069-726C-4A48-983B-C7560694DE48>