From owner-freebsd-stable@freebsd.org Thu Nov 10 10:22:54 2016 Return-Path: Delivered-To: freebsd-stable@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 D29A4C39985 for ; Thu, 10 Nov 2016 10:22:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F17A1972; Thu, 10 Nov 2016 10:22:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA20161; Thu, 10 Nov 2016 12:22:33 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1c4mV7-0006ZS-AG; Thu, 10 Nov 2016 12:22:33 +0200 Subject: Re: Freebsd 11.0 RELEASE - ZFS deadlock To: Eric van Gyzen , freebsd-stable@FreeBSD.org, Henri Hennebert References: <0c223160-b76f-c635-bb15-4a068ba7efe7@restart.be> From: Andriy Gapon Message-ID: <43c9d4d4-1995-5626-d70a-f92a5b456629@FreeBSD.org> Date: Thu, 10 Nov 2016 12:21:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2016 10:22:54 -0000 On 09/11/2016 15:58, Eric van Gyzen wrote: > On 11/09/2016 07:48, Henri Hennebert wrote: >> I encounter a strange deadlock on >> >> FreeBSD avoriaz.restart.bel 11.0-RELEASE-p3 FreeBSD 11.0-RELEASE-p3 #0 r308260: >> Fri Nov 4 02:51:33 CET 2016 >> root@avoriaz.restart.bel:/usr/obj/usr/src/sys/AVORIAZ amd64 >> >> This system is exclusively running on zfs. >> >> After 3 or 4 days, `periodic daily` is locked in the directory /usr/local/news/bin >> >> [root@avoriaz ~]# ps xa|grep find >> 85656 - D 0:01.13 find / ( ! -fstype local -o -fstype rdonly ) -prune >> -o ( -name [#,]* -o -name .#* -o -name a.out -o -nam >> 462 1 S+ 0:00.00 grep find >> [root@avoriaz ~]# procstat -f 85656 >> PID COMM FD T V FLAGS REF OFFSET PRO NAME >> 85656 find text v r r------- - - - /usr/bin/find >> 85656 find cwd v d r------- - - - /usr/local/news/bin >> 85656 find root v d r------- - - - / >> 85656 find 0 v c r------- 3 0 - /dev/null >> 85656 find 1 p - rw------ 1 0 - - >> 85656 find 2 v r -w------ 7 17 - - >> 85656 find 3 v d r------- 1 0 - /home/root >> 85656 find 4 v d r------- 1 0 - /home/root >> 85656 find 5 v d r----n-- 1 533545184 - /usr/local/news/bin >> [root@avoriaz ~]# >> >> If I try `ls /usr/local/news/bin` it is also locked. >> >> After `shutdown -r now` the system remain locked after the line '0 0 0 0 0 0' >> >> After a reset and reboot I can access /usr/local/news/bin. >> >> I delete this directory and reinstall the package `portupgrade -fu news/inn` >> >> 5 days later `periodic daily`is locked on the same directory :-o >> >> Any idea? > > I can't help with the deadlock, but someone who _can_ help will probably ask for > the output of "procstat -kk PID" with the PID of the "find" process. In fact, it's procstat -kk -a. With just one thread we would see that a thread is blocked on something, but we won't see why that something can not be acquired. -- Andriy Gapon