From owner-freebsd-questions@freebsd.org Mon Sep 25 10:17:44 2017 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 4A1F6E0FCEA for ; Mon, 25 Sep 2017 10:17:44 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D3AA17562F for ; Mon, 25 Sep 2017 10:17:43 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id v8PAHX4c023956 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 25 Sep 2017 12:17:33 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id v8PAHWJG023953 for ; Mon, 25 Sep 2017 12:17:33 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Mon, 25 Sep 2017 12:17:32 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: FreeBSD questions Subject: pkg: sqlite: database disk image is malformed Message-ID: User-Agent: Alpine 2.21 (BSF 202 2017-01-01) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 10:17:44 -0000 Something interesting happened while upgrading one of my systems: ===> Registering installation for tcl86-8.6.7 Installing tcl86-8.6.7... pkg-static: sqlite error while executing iterator in file pkgdb_iterator.c:1035: database disk image is malformed pkg-static: sqlite error while executing INSERT OR REPLACE INTO files (path, sha256, package_id) VALUES (?1, ?2, ?3) in file pkgdb.c:1788: database disk image is malformed *** Error code 70 Running pkg check -{B,d,s} gives: # pkg check -B Checking all packages: 100% # pkg check -d Checking all packages: 100% # pkg check -s Checking all packages: 100% System is running ZFS with checksums enabled, but with non-ECC memory, thus memory corruption is possible. ZFS says the pool is healthy. Any chance of learning which values pkg is attempting to insert or replace? Running pkg delete lang/tcl86 removed that port and all its consumers, yet the SQL error persists. I have an identical system next to this little bugger, so I could steal /var/db/local.sqlite from that system ... -- Trond.