From owner-freebsd-current@freebsd.org Wed Aug 8 12:30:57 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 307FF105AF17 for ; Wed, 8 Aug 2018 12:30:57 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670049.outbound.protection.outlook.com [40.107.67.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8FEC7BFE0 for ; Wed, 8 Aug 2018 12:30:56 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM (52.132.44.160) by YTOPR0101MB1803.CANPRD01.PROD.OUTLOOK.COM (52.132.44.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Wed, 8 Aug 2018 12:30:54 +0000 Received: from YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM ([fe80::88ec:8aee:77d7:6716]) by YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM ([fe80::88ec:8aee:77d7:6716%2]) with mapi id 15.20.1017.019; Wed, 8 Aug 2018 12:30:54 +0000 From: Rick Macklem To: Konstantin Belousov CC: "freebsd-current@FreeBSD.org" Subject: Re: ffs_truncate3 panics Thread-Topic: ffs_truncate3 panics Thread-Index: AQHULkj8zfSrFB+Dkkqu0NmeGvZbQKS0RKaAgAGEoXU= Date: Wed, 8 Aug 2018 12:30:54 +0000 Message-ID: References: , <20180807131445.GC1884@kib.kiev.ua> In-Reply-To: <20180807131445.GC1884@kib.kiev.ua> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB1803; 6:YAaD/FUeVjpuohpXHfUV+QxyY9CzQ/5YXHiI8RcwB4psTl4Kqct/IpFA2NVCVOMBpEvaZn8ReKwcNA5ST5S3pFvL2YUHH6VCoqZTxiHs3ONyGmeTSeQv4RiHiDcUpSbdlvN3UR5c70AhDZLkFAWsD/fCHxAZR5+CMADzjVtRr3gAvMs0qKG1Y04rWztSy7StJ3gCeIjXhvcjaOudsyAQcyZUDUQMUd4nQNgvNff2oznKVJsfBf5gOhyqUWIZDzIEVeW3LDLQT7ls81vgghgFA7wstzOJqDh8wtba8VNNgyi4Xqs0Sg5L6F98QGRUZPlj5iYLGBNbaPpjJ78G1qDKQeKQDGZSh9PJ6MYrMsT/NzLjiPTUahCQmY9rz+CES4Yi6LwH6GJrZasMWr9mPY6/2PKazVsWMPNLQyg1+lhg69IyM+uLopsrDCC8CSKWRBXI6qA+SreVL7EpRzk30+RNUg==; 5:jEFNylz0SB/sb7bwt+ikErTicg0sCR4/YZppbpnb57+qqtrz90Y9pF51jWF7fAN3jWsTBEOHOqcmyRwfMM4sPS28F22OKYu/CdxEqsMRbSs1Bc1ATocbmx1to8AH7LeSMkIQST5oT3aik9hUxeM0a1lsPsIyFwvSy4TH6wDqlJ8=; 7:DxTkeYhCvVjXqA1/UtUu9XuMRr0q8niT25wFmSblv6oArJ3wlOxY7PIRMmVWlHK6tdUfXqWgwXU7O7oi3MGQsjzUdBkzpxeQY2gjaNZEIwdYWOLiNrKzZXrJuHsuxqc/KUEtqtzAXFoLXp6mUT1cCu9QZVVHZ+9vGINOUiTI2WoNDktX27cyYPXrj6MWBpr9Q7p9ZOllbg+jKoPh9UjgAKQVGiy2obOxBT4FoWppDpwxU9kQekAY/1g3a3N7L6Qy x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 12475711-f4b1-48d8-df77-08d5fd2ac921 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1803; x-ms-traffictypediagnostic: YTOPR0101MB1803: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:YTOPR0101MB1803; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1803; x-forefront-prvs: 07584EDBCD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(136003)(376002)(396003)(366004)(199004)(189003)(6436002)(33656002)(2900100001)(786003)(478600001)(5660300001)(229853002)(1411001)(74482002)(316002)(305945005)(14454004)(86362001)(74316002)(105586002)(6916009)(55016002)(81166006)(81156014)(6246003)(14444005)(39060400002)(7116003)(256004)(8676002)(106356001)(486006)(8936002)(11346002)(476003)(446003)(186003)(99286004)(25786009)(6506007)(102836004)(9686003)(76176011)(68736007)(53936002)(5250100002)(2906002)(97736004)(4326008)(7696005)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1803; H:YTOPR0101MB1820.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: Vyco/W8fYwXqlh9X8w8Up9Ks8XWzYt+qr39JQjF1rENPvxPV3XjZXvR5JY8FTfcreKYQLdO15+cQYskyRF5rK0pknlFGQLDLT+IxoqxQzhxY5DmfYn0vVU59JIhilUYgOO1GutBgKSHxPLBM98Rh7VESRX/5AzEszG+2dLHCNxe0hYG+TK7g17qOixqTIecvt56ulrURvguQMafha6A+Tcx6D8xe9T/HkWYZWGXnGdGY4kohm9W6bRGyZZh4sJnVtwIT4w2RMzecs/KV72IMuyrnKz0owdUBRbBW7DsGk0r5LUEOdoRkJPKvGloXenYJly7P+PdjCkLmBpgBeTDbpCq7LNw/TisJCE78o2jTa9c= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 12475711-f4b1-48d8-df77-08d5fd2ac921 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2018 12:30:54.6346 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1803 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: Wed, 08 Aug 2018 12:30:57 -0000 Konstantin Belousov wrote: >On Tue, Aug 07, 2018 at 12:28:33PM +0000, Rick Macklem wrote: >> Hi, >> >> During testing of the pNFS server I get an ffs_truncate3 panic every onc= e in a while. >> A few things that might be relevant: >> - Seems to happen more often when soft update journaling is enabled, but= will >> happen when it is disabled. >> - Normally happens when a fairly large subtree of the file system is bei= ng removed. - Oh, and this is an old i386 with 256Mbytes (not one of them new fangled c= omputers, where memory is in Gbytes;-) >> >> These file systems are a bit odd, since all the regular files in them ar= e empty but >> have extended attributes that are accessed during the subtree removal. (= The >> extended attributes tell the server where the data files are.) >> >> I replaced the panic() with a printf() and every time the printf() happe= ns... >> bo->bo_dirty.bv_cnt =3D=3D 0 and bo->bo_clean.bv_cnt =3D=3D 1. >> After one of these printf()s, the system continues to run ok. When the f= ile >> system is fsck'd after this has occurred, it passes fine and I haven't s= een and >> indication of file system corruption after running with this file system= for >> quite a while after the printf()s first occurred. >The lack of corruption is, most likely, because the files are removed. >Would the files truncated to zero length and then extended, I am almost >sure that a corruption occur. > >Can you print the only buffer on the clean queue when the panic occur ? ffst3 vtyp=3D1 bodirty=3D0 boclean=3D1 buf at 0x428a110 b_flags =3D 0x20001020, b_xflags=3D0x2, b_vflags= =3D0x0 b_error =3D 0, b_bufsize =3D 4096, b_bcount =3D 4096, b_resid =3D 0 b_bufobj =3D (0xfd8ba94), b_data =3D 0x5170000, b_blkno =3D -1, b_lblkno = =3D -1, b_dep =3D 0 b_kvabase =3D 0x5170000, b_kvasize =3D 32768 >Also, it is interesting to know the initial length of the file. Since they are regular files, they are 0 length. (Just inodes with extended= attributes.) >> >> Since the panic() only occurs when "options INVARIANTS" is enabled and I= don't >> see evidence of file system corruption, I'm wondering if this panic() is= valid and >> needed? rick