From owner-freebsd-bugs@freebsd.org Fri May 12 10:57:09 2017 Return-Path: Delivered-To: freebsd-bugs@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 1B977D688F8 for ; Fri, 12 May 2017 10:57:09 +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 0B7E9F6 for ; Fri, 12 May 2017 10:57:09 +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 v4CAv8gg096917 for ; Fri, 12 May 2017 10:57:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219224] sync hanging in _cv_wait zil_commit zfs_sync sys_sync Date: Fri, 12 May 2017 10:57:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: t@sdf.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: Message-ID: In-Reply-To: References: 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-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 10:57:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219224 --- Comment #1 from Tino Reinhardt --- I seem to be able to reproduce this on a similar system, having cfengine running and run a loop in a shell like "while :; do sync; done": tools-2-b# ps ax | grep sync 27 - DL 1:27.96 [syncer] 3667 1 R+ 1017:57.50 sync tools-2-b# procstat -kk 3667 PID TID COMM TDNAME KSTACK 3667 102488 sync - dbuf_read+0x155 dnode_hold_impl+0x188 dmu_bonus_hold+0x1d zfs_zget+0xc5 zfs_get_data+0x40 zil_commit+0x6a1 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce Xfast_syscall+0xfb=20 tools-2-b# procstat -kk 3667 PID TID COMM TDNAME KSTACK 3667 102488 sync - dnode_hold_impl+0x409 dmu_bonus_hold+0x1d zfs_zget+0xc5 zfs_get_data+0x40 zil_commit+0x6a1 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce Xfast_syscall+0xfb=20 tools-2-b# procstat -kk 3667 PID TID COMM TDNAME KSTACK 3667 102488 sync - dmu_zfetch+0x7b dbuf_read+0x= 155 dnode_hold_impl+0x188 dmu_bonus_hold+0x1d zfs_zget+0xc5 zfs_get_data+0x40 zil_commit+0x6a1 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0x4ce Xfast_syscall+0xfb tools-2-b# ps ax | awk '$3~"D"' | tail 22 - DL 0:00.00 [vmdaemon] 23 - DL 0:00.01 [pagezero] 24 - DL 0:02.13 [bufspacedaemon] 25 - DL 0:02.06 [bufdaemon] 26 - DL 0:02.31 [vnlru] 27 - DL 1:26.84 [syncer] 643 - DL 1:03.87 [pf purge] 3650 - DsJ 0:00.05 /var/cfengine/bin/cf-agent -f failsafe.cf 11495 - DJ 0:00.01 /var/cfengine/bin/cf-agent -f failsafe.cf 96409 - DL 0:15.85 [ftcleanup] tools-2-b# procstat -k 3650 PID TID COMM TDNAME KSTACK=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 3650 102929 cf-agent - mi_switch sleepq_wait _cv_wa= it zil_commit zfs_freebsd_putpages VOP_PUTPAGES_APV vnode_pager_putpages vm_pageout_flush vm_object_page_collect_flush vm_object_page_clean vm_object_terminate zfs_freebsd_reclaim VOP_RECLAIM_APV vgonel vrecycle zfs_freebsd_inactive VOP_INACTIVE_APV vinactive The shell loop is running in a screen and this indicates it took around 5 minutes for a sync(8) to stay hanging around: tools-2-b# ps ax | grep sync 27 - DL 1:27.96 [syncer] 3667 1 R+ 1017:57.50 sync tools-2-b# ps olstart 3667 STARTED Thu May 11 19:50:28 2017 This is the hanging cf-agent process: tools-2-b# ps olstart 3650 STARTED Thu May 11 19:50:28 2017 >From this on, other calls to sync(2) are hanging: tools-2-b# printf '#include\n int main(){sync();}' | cc -x c -o s= ync - tools-2-b# ./sync & [1] 67191 tools-2-b# procstat -kk 67191 PID TID COMM TDNAME KSTACK 67191 103195 sync - mi_switch+0xd2 sleepq_wait+0= x3a _cv_wait+0x194 zil_commit+0x85 zfs_sync+0xad sys_sync+0x146 amd64_syscall+0= x4ce Xfast_syscall+0xfb --=20 You are receiving this mail because: You are the assignee for the bug.=