From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id Vy3zAFM6AF98XQAA0tVLHw (envelope-from ) for ; Sat, 04 Jul 2020 08:14:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qE3XN1I6AF+CSAAAB5/wlQ (envelope-from ) for ; Sat, 04 Jul 2020 08:14:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 41FDD9401D0 for ; Sat, 4 Jul 2020 08:14:10 +0000 (UTC) Received: from localhost ([::1]:58064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrdJI-0003LB-Og for larch@yhetil.org; Sat, 04 Jul 2020 04:14:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrdJC-0003Kq-0h for bug-guix@gnu.org; Sat, 04 Jul 2020 04:14:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrdJB-0005j3-OS for bug-guix@gnu.org; Sat, 04 Jul 2020 04:14:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrdJB-0001YP-If for bug-guix@gnu.org; Sat, 04 Jul 2020 04:14:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 04 Jul 2020 08:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42151 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 42151-submit@debbugs.gnu.org id=B42151.15938503845895 (code B ref 42151); Sat, 04 Jul 2020 08:14:01 +0000 Received: (at 42151) by debbugs.gnu.org; 4 Jul 2020 08:13:04 +0000 Received: from localhost ([127.0.0.1]:58000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrdIA-0001Wa-SD for submit@debbugs.gnu.org; Sat, 04 Jul 2020 04:13:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrdI7-0001WL-Ot for 42151@debbugs.gnu.org; Sat, 04 Jul 2020 04:12:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59949) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrdI2-0005gO-Hq; Sat, 04 Jul 2020 04:12:50 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=41200 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrdI1-000071-PU; Sat, 04 Jul 2020 04:12:50 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> <873668zzip.fsf@gnu.org> <87fta8ogf2.fsf@gnu.org> <87sge8wrdf.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sat, 04 Jul 2020 10:12:47 +0200 In-Reply-To: <87sge8wrdf.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 03 Jul 2020 17:27:40 +0200") Message-ID: <87y2nzr94w.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42151@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: W7tOAAxC3o31 --=-=-= Content-Type: text/plain Jan Nieuwenhuizen writes: Adding one additional patch to this series, hence 4/3 (see attached) fixes the sqlite problem. With this over-complete series we can now do offload builds to a childhurd: --8<---------------cut here---------------start------------->8--- $ guix build -e '(@@ (gnu packages commencement) rsync-boot0)' sending 74 store items (365 MiB) to 'localhost'... exporting path `/gnu/store/1kf05mhh31wl89r3mlx52x5sxrjivi7i-module-import-compiled-guile-builder' exporting path `/gnu/store/7jxamp3g8wdr6vwrisqfmrncxh8nbfb4-mirrors' [...] exporting path `/gnu/store/x8wnf0h0ipibgzadlbmll8bcnhvv1yaq-diffutils-boot0-3.7' offloading '/gnu/store/3xmmbjfqrl4p4sn8vljfdikypb0vi5am-rsync-3.1.3.drv' to 'localhost'... offloading build of /gnu/store/3xmmbjfqrl4p4sn8vljfdikypb0vi5am-rsync-3.1.3.drv to 'localhost' [...] @ build-succeeded /gnu/store/3xmmbjfqrl4p4sn8vljfdikypb0vi5am-rsync-3.1.3.drv - retrieving 1 store item from 'localhost'... importing file or directory '/gnu/store/haf6mlm8xa6s2q918s05pijl6ql17mnq-rsync-3.1.3'... guix offload: error: corrupt input while restoring archive from # guix build: error: build of `/gnu/store/3xmmbjfqrl4p4sn8vljfdikypb0vi5am-rsync-3.1.3.drv' failed [1]10:04:55 janneke@dundal:~/src/guix/master [env] --8<---------------cut here---------------end--------------->8--- After the build succeeds, the download fails but lets first get this patch series done... Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0004-database-Do-not-use-journal_model-WAL-for-the-Hurd.patch Content-Transfer-Encoding: quoted-printable >From dc6f96fc7de50602fb28d7ad7b8cbff09e55f538 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Fri, 3 Jul 2020 23:45:20 +0200 Subject: [PATCH 4/3] database: Do not use journal_model=3DWAL for the Hurd. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=3DUTF-8 This fixes . * guix/store/database.scm (call-with-database): When building for the Hurd, do not set journal_model=3DWAL. --- guix/store/database.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/guix/store/database.scm b/guix/store/database.scm index a38e4d7e52..da46b0abce 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017, 2019 Caleb Ristvedt ;;; Copyright =C2=A9 2018, 2020 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (guix store database) #:use-module (sqlite3) #:use-module (guix config) + #:use-module (guix gexp) #:use-module (guix serialization) #:use-module (guix store deduplication) #:use-module (guix base16) @@ -27,6 +29,7 @@ #:use-module (guix build syscalls) #:use-module ((guix build utils) #:select (mkdir-p executable-file?)) + #:use-module (guix utils) #:use-module (guix build store-copy) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) @@ -105,9 +108,12 @@ create it and initialize it as a new database." (mkdir-p (dirname file)) #t))) (db (sqlite-open file))) - ;; Turn DB in "write-ahead log" mode, which should avoid SQLITE_LOCKED - ;; errors when we have several readers: . - (sqlite-exec db "PRAGMA journal_mode=3DWAL;") + ;; Using WAL breaks for the Hurd . + (unless (let-system (system target) + (equal? target "i586-pc-gnu")) + ;; Turn DB in "write-ahead log" mode, which should avoid SQLITE_LOCK= ED + ;; errors when we have several readers: . + (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) =20 ;; Install a busy handler such that, when the database is locked, sqli= te ;; retries until 30 seconds have passed, at which point it gives up and --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--