From owner-freebsd-fs@freebsd.org Fri Dec 11 16:57:19 2020 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 166ED4B5381; Fri, 11 Dec 2020 16:57:19 +0000 (UTC) (envelope-from ali.abdallah@suse.com) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.suse.de", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Csxlx75dHz4cXf; Fri, 11 Dec 2020 16:57:17 +0000 (UTC) (envelope-from ali.abdallah@suse.com) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ED013ACF1; Fri, 11 Dec 2020 16:57:14 +0000 (UTC) Date: Fri, 11 Dec 2020 17:57:13 +0100 From: Ali Abdallah To: freebsd-fs@freebsd.org Cc: freebsd-stable@freebsd.org Subject: Consistency of pkg db on UFS Message-ID: <20201211165713.syvzamtdtrbrgx44@frix230> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Queue-Id: 4Csxlx75dHz4cXf X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[suse.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.135.220.15]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[195.135.220.15:from]; RCVD_IN_DNSWL_MED(-0.20)[195.135.220.15:from]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[suse.com,quarantine]; DKIM_TRACE(0.00)[suse.com:+]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29298, ipnet:195.135.220.0/22, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-fs,freebsd-stable]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 16:57:19 -0000 Hello, I've came across the following issues on a freshly installed system with a UFS SU+j root partition. # pkg install -y some_package The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y # kldload SOME_MODULE -> crash happens here (due to drm for example) On next boot any attempt to use pkg results in the following message: # pkg install nano The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait... Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done Installing pkg-1.15.10... the most recent version of pkg-1.15.10 is already installed It seems that /var/db/pkg/local.sqlite contains entry for the installed packages, but those packages didn't make it to the filesystem. Is this because the db is fsynced while the actual package data is not? The issue is very easy to reproduce (on a VM for instance). (I was not able to reproduce on a ZFS root filesystem). Regards, Ali