From owner-freebsd-current@freebsd.org Thu Aug 9 11:10:16 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43EEB1061358 for ; Thu, 9 Aug 2018 11:10:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 B52158CF23 for ; Thu, 9 Aug 2018 11:10:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w79BA5wS047870 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 9 Aug 2018 14:10:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w79BA5wS047870 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w79BA44S047852; Thu, 9 Aug 2018 14:10:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 9 Aug 2018 14:10:04 +0300 From: Konstantin Belousov To: Rick Macklem Cc: "freebsd-current@FreeBSD.org" , "peter@holm.cc" Subject: Re: ffs_truncate3 panics Message-ID: <20180809111004.GK1884@kib.kiev.ua> References: <20180807131445.GC1884@kib.kiev.ua> <20180808221647.GH1884@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 09 Aug 2018 11:10:16 -0000 On Thu, Aug 09, 2018 at 01:39:20AM +0000, Rick Macklem wrote: > Konstantin Belousov wrote: > [stuff snipped] > >> >Can you print the only buffer on the clean queue when the panic occur ? > >> ffst3 vtyp=1 bodirty=0 boclean=1 > >> buf at 0x428a110 > >> b_flags = 0x20001020, b_xflags=0x2, b_vflags=0x0 > >> b_error = 0, b_bufsize = 4096, b_bcount = 4096, b_resid = 0 > >> b_bufobj = (0xfd8ba94), b_data = 0x5170000, b_blkno = -1, b_lblkno = -1, b_dep = 0 > >> b_kvabase = 0x5170000, b_kvasize = 32768 > >So the buffer was indeed for extended attrs, and never written to the disk. > >I am quite interested what was the inode content prior to the truncation, > >esp. the di_extsize. > Just in case it wasn't clear, this buffer is on the clean list and not the dirty one. > (Does this mean it somehow got onto the "clean list" without being written to disk?) > > >Could you try to formulate a way to reproduce the panic so that Peter > >can recreate it, please ? > I doubt it. It would require him doing a pNFS setup with multiple systems. > (At least that is the only way I reproduce it and I sometimes go a week of testing > before I see them.) > It would be great to have more testers for the pNFS server stuff, but I doubt it > would fit into Peter's setup? > > I can add printf()s anywhere you suggest, but I'm not sure how you would catch > this case sooner? (For example, I could print out di_extsize at the beginning of > ffs_truncate(), if that would help?) May be, add a loop at the beginning of ffs_truncate(), over all buffers on both clean and dirty queues, calculating number of buffers with b_lblkno < 0 and >= -UFS_NXADDR. Print some diagnostic if such buffer is detected but di_extsize is zero. BTW, does NFS server use extended attributes ? What for ? Can you, please, point out the code which does this ?