From owner-freebsd-questions@freebsd.org Tue Mar 22 20:25:31 2016 Return-Path: Delivered-To: freebsd-questions@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 71EEDAD8B4E for ; Tue, 22 Mar 2016 20:25:31 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) (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 52FD6BC7 for ; Tue, 22 Mar 2016 20:25:30 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x2.osted.lan (87-58-223-204-dynamic.dk.customer.tdc.net [87.58.223.204]) by relay01.pair.com (Postfix) with ESMTP id A1BDED00C8A; Tue, 22 Mar 2016 16:25:23 -0400 (EDT) Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id u2MKPLsS035130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Mar 2016 21:25:21 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id u2MKPK0K035129; Tue, 22 Mar 2016 21:25:20 +0100 (CET) (envelope-from pho) Date: Tue, 22 Mar 2016 21:25:20 +0100 From: Peter Holm To: Nick Evans Cc: freebsd-questions@freebsd.org, Konstantin Belousov Subject: Re: Intel 750 Panic Unmounting During TRIM Message-ID: <20160322202520.GA32179@x2.osted.lan> References: <20160322125935.6be25e20@pleiades.nextvenue.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160322125935.6be25e20@pleiades.nextvenue.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2016 20:25:31 -0000 On Tue, Mar 22, 2016 at 12:59:35PM -0400, Nick Evans wrote: > I've got a test system with a 400GB Intel 750 NVME SSD formatted UFS > 1mb/4k aligned > > http://www.intel.com/content/www/us/en/solid-state-drives/solid-state-drives-750-series.html > > I moved a 50 gigabyte directory off the drive so I could try another > drive configuration and while the drive was trimming, I ran umount on > the mounted device. umount sat there without returning to the prompt. On > another terminal, mount showed the drive unmounted, but after a minute > or so in this state with gstat running to show io, the system panicked. > > I tried to reproduce this a second time by generating a 100gb file from > /dev/zero. Deleted the file ran umount which hung again. This time > after a while it returned to the prompt stating the device was > busy so I tried to umount again while the drive was still trimming. > After a short while the system panicked. It seems the panic happens > when the TRIM finishes while umount is trying to do its thing. The > system is 10.2-RELEASE-p13, GENERIC kernel, Intel 4790K on a Asus Z97-A > motherboard, 32GB ram. I have a second Intel 750 drive in another PCI > Express slot but it's unused at the moment. > > Below are the dumps recorded after the system booted back up. This is a > test system so I can bring it up and down as needed to test fixes. The > second dump is from my reproduced test: > > > panic: losing buffer 1 > cpuid = 2 I see a different panic with this scenario: panic: Lock Per-Filesystem Softdep Lock not exclusively locked @ ../../../ufs/ffs/ffs_softdep.c:1950 https://people.freebsd.org/~pho/stress/log/trim7.txt - Peter