From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 10:29:47 2020 Received: (at submit) by debbugs.gnu.org; 1 Jul 2020 14:29:47 +0000 Received: from localhost ([127.0.0.1]:53538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdk6-0003Mg-IM for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:29:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:39342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdk2-0003MV-Kz for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:29:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqdk2-0006Uy-Cr for bug-guix@gnu.org; Wed, 01 Jul 2020 10:29:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39939) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqdk1-0002qH-CU; Wed, 01 Jul 2020 10:29:37 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=54982 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jqdjy-0000n6-U0; Wed, 01 Jul 2020 10:29:35 -0400 From: "Jan (janneke) Nieuwenhuizen" To: bug-guix@gnu.org Subject: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Date: Wed, 1 Jul 2020 16:29:29 +0200 Message-Id: <20200701142929.26919-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Guix! I configured my system with a childhurd service and added --8<---------------cut here---------------start------------->8--- (build-machine (name "childhurd") (system "i586-gnu") (host-key "ssh-ed25519 ... root@childhurd") (user "root") (private-key "/home/janneke/.ssh/id_rsa_childhurd")) --8<---------------cut here---------------end--------------->8--- to /etc/guix/machines. Sadly, running guix offload test gives --8<---------------cut here---------------start------------->8--- $ guix offload test guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'... guix offload: Guix is usable on 'childhurd' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test") guix offload: 'childhurd' is running GNU Guile 3.0.4 guix offload: error: exception occurred on remote host 'localhost': (%exception #>) --8<---------------cut here---------------end--------------->8--- So, I looked into the Debian/Hurd sqlite3 package for inspiration and found debian/patches/20-hurd-locking-style.patch...well, that should fix it, right? Sadly, this patch seems to break sqlite3 altogether. --8<---------------cut here---------------start------------->8--- $ guix offload test guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'... Backtrace: In ice-9/boot-9.scm: 1736:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In unknown file: 10 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 9 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 8 (_ #(#(#))) In guix/ui.scm: 1949:12 7 (run-guix-command _ . _) 663:2 6 (call-with-error-handling _) In ice-9/boot-9.scm: 1736:10 5 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) 1731:15 4 (with-exception-handler # _ #:unwind? _ # …) In guix/scripts/offload.scm: 647:6 3 (check-machine-availability _ _) In srfi/srfi-1.scm: 650:11 2 (for-each # (#< pid: pipe socket: #) …) In guix/scripts/offload.scm: 582:2 1 (assert-node-has-guix #< pid: pipe socket: # …) In ice-9/boot-9.scm: 1669:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1669:16: In procedure raise-exception: ERROR: 1. &inferior-exception: arguments: (%exception #>) inferior: #< pid: pipe socket: # close: # version: (0 1 1) packages: #> table: #>> stack: ((#f ("ice-9/boot-9.scm" 1763 13)) (raise-exception ("ice-9/boot-9.scm" 1666 16)) (raise-exception ("ice-9/boot-9.scm" 1668 16)) (#f ("guix/store.scm" 582 42)) (with-exception-handler ("ice-9/boot-9.scm" 1735 10)) (open-connection ("guix/store.scm" 545 2)) (call-with-store ("guix/store.scm" 626 15)) (#f (#f #f #f)) (#f ("guix/repl.scm" 92 21)) (with-exception-handler ("ice-9/boot-9.scm" 1735 10)) (with-exception-handler ("ice-9/boot-9.scm" 1730 15)) (#f ("guix/repl.scm" 119 7))) --8<---------------cut here---------------end--------------->8--- Maybe we're missing some file_lock patch that Debian has? Where to look, glibc, hurd, ...? Ideas? Greetings, Janneke Jan (janneke) Nieuwenhuizen (3): gnu: Add sqlite/hurd with locking fix. gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd. gnu: guix: Use sqlite/hurd for locking on the Hurd. gnu/local.mk | 1 + gnu/packages/guile.scm | 2 +- gnu/packages/package-management.scm | 2 +- gnu/packages/patches/sqlite3-hurd.patch | 51 +++++++++++++++++++++++++ gnu/packages/sqlite.scm | 9 +++++ 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/sqlite3-hurd.patch -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 10:31:36 2020 Received: (at 42151) by debbugs.gnu.org; 1 Jul 2020 14:31:36 +0000 Received: from localhost ([127.0.0.1]:53545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdlw-0003RE-Ae for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:31:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdlu-0003Qz-HF for 42151@debbugs.gnu.org; Wed, 01 Jul 2020 10:31:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39980) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqdlp-0003EW-7v; Wed, 01 Jul 2020 10:31:29 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=54984 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jqdln-0004RU-49; Wed, 01 Jul 2020 10:31:28 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH 2/3] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd. Date: Wed, 1 Jul 2020 16:31:17 +0200 Message-Id: <20200701143118.26985-2-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701143118.26985-1-janneke@gnu.org> References: <20200701143118.26985-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This fixes guix offload: error: exception occurred on remote host 'localhost': (%exception #>) * gnu/packages/guile.scm (guile-sqlite3)[inputs]: Use sqlite/hurd instead of sqlite. --- gnu/packages/guile.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index a32bd33293..c651e2427a 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -665,7 +665,7 @@ Guile's foreign function interface.") ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-3.0) - ("sqlite" ,sqlite))) + ("sqlite" ,sqlite/hurd))) (synopsis "Access SQLite databases from Guile") (description "This package provides Guile bindings to the SQLite database system.") -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 10:31:44 2020 Received: (at 42151) by debbugs.gnu.org; 1 Jul 2020 14:31:44 +0000 Received: from localhost ([127.0.0.1]:53547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdlx-0003RX-Lq for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:31:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdls-0003Qx-NG for 42151@debbugs.gnu.org; Wed, 01 Jul 2020 10:31:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39976) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqdlm-0003E9-Oz; Wed, 01 Jul 2020 10:31:27 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=54984 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jqdlf-0004RU-LA; Wed, 01 Jul 2020 10:31:20 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix. Date: Wed, 1 Jul 2020 16:31:16 +0200 Message-Id: <20200701143118.26985-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/sqlite3-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/sqlite.scm (sqlite/hurd): New variable. --- gnu/local.mk | 1 + gnu/packages/patches/sqlite3-hurd.patch | 51 +++++++++++++++++++++++++ gnu/packages/sqlite.scm | 9 +++++ 3 files changed, 61 insertions(+) create mode 100644 gnu/packages/patches/sqlite3-hurd.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5e9dba5ab7..d5451bf2d5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1358,6 +1358,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-header-guard.patch \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ + %D%/packages/patches/sqlite3-hurd.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ diff --git a/gnu/packages/patches/sqlite3-hurd.patch b/gnu/packages/patches/sqlite3-hurd.patch new file mode 100644 index 0000000000..de87a30cb1 --- /dev/null +++ b/gnu/packages/patches/sqlite3-hurd.patch @@ -0,0 +1,51 @@ +Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.31.1-5/20-hurd-locking-style.patch +Upstream status: Not offered upstream. + +diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c +--- sqlite-autoconf-3310100/sqlite3.c 2020-01-27 21:25:19.000000000 +0100 ++++ sqlite-autoconf-3310100-/sqlite3.c 2020-07-01 11:50:13.768333806 +0200 +@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode + # include + #endif + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + /* # include */ + # include + # include +@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id + ** + ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off + */ +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + + /* + ** Retry flock() calls that fail with EINTR +@@ -38586,7 +38586,7 @@ IOMETHODS( + 0 /* xShmMap method */ + ) + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + IOMETHODS( + flockIoFinder, /* Finder function name */ + flockIoMethods, /* sqlite3_io_methods object name */ +@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){ + UNIXVFS("unix", autolockIoFinder ), + #elif OS_VXWORKS + UNIXVFS("unix", vxworksIoFinder ), ++#elif defined(__GNU__) ++ UNIXVFS("unix", flockIoFinder ), + #else + UNIXVFS("unix", posixIoFinder ), + #endif +@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){ + #if OS_VXWORKS + UNIXVFS("unix-namedsem", semIoFinder ), + #endif +-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS ++#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__) + UNIXVFS("unix-posix", posixIoFinder ), + #endif + #if SQLITE_ENABLE_LOCKING_STYLE diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 8468131ddf..d5c44b0d0f 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2017 Jelle Licht ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Alex Vong +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -107,3 +108,11 @@ is in the public domain.") ;; commit fad5b1a6d8d9c36bea5785ae4fbc1beb37e644d7. (define-public sqlite-with-column-metadata (deprecated-package "sqlite-with-column-metadata" sqlite)) + +(define-public sqlite/hurd + ;; TODO move into sqlite on the next rebuild cycle. + (package + (inherit sqlite) + (name "sqlite-for-hurd") + (source (origin (inherit (package-source sqlite)) + (patches (search-patches "sqlite3-hurd.patch")))))) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 10:31:45 2020 Received: (at 42151) by debbugs.gnu.org; 1 Jul 2020 14:31:45 +0000 Received: from localhost ([127.0.0.1]:53549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdm4-0003Rf-5Y for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:31:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdlw-0003R2-7T for 42151@debbugs.gnu.org; Wed, 01 Jul 2020 10:31:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39982) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqdlq-0003F5-VT; Wed, 01 Jul 2020 10:31:30 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=54984 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jqdlp-0004RU-JG; Wed, 01 Jul 2020 10:31:30 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH 3/3] gnu: guix: Use sqlite/hurd for locking on the Hurd. Date: Wed, 1 Jul 2020 16:31:18 +0200 Message-Id: <20200701143118.26985-3-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701143118.26985-1-janneke@gnu.org> References: <20200701143118.26985-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/package-management.scm (guix)[inputs]: Use sqlite/hurd. --- gnu/packages/package-management.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 068d46566c..52c5a1e60d 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -343,7 +343,7 @@ $(prefix)/etc/init.d\n"))) ("zlib" ,zlib) ;for 'guix publish' ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute' - ("sqlite" ,sqlite) + ("sqlite" ,sqlite/hurd) ("libgcrypt" ,libgcrypt) ("guile" ,guile-3.0-latest) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 13:01:25 2020 Received: (at submit) by debbugs.gnu.org; 1 Jul 2020 17:01:25 +0000 Received: from localhost ([127.0.0.1]:53711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqg6p-00072d-3d for submit@debbugs.gnu.org; Wed, 01 Jul 2020 13:01:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:55834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqg6n-00072W-3q for submit@debbugs.gnu.org; Wed, 01 Jul 2020 13:01:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqg6m-0001AC-RP for bug-guix@gnu.org; Wed, 01 Jul 2020 13:01:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42521) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqg6m-0006oT-1R; Wed, 01 Jul 2020 13:01:16 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=55496 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 1jqg6h-0004L1-Qn; Wed, 01 Jul 2020 13:01:14 -0400 From: Jan Nieuwenhuizen To: bug-guix@gnu.org Subject: Re: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Organization: AvatarAcademy.nl References: <20200701142929.26919-1-janneke@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 01 Jul 2020 19:01:08 +0200 In-Reply-To: <20200701142929.26919-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 1 Jul 2020 16:29:29 +0200") Message-ID: <87o8ozcgq3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jan (janneke) Nieuwenhuizen writes: > Maybe we're missing some file_lock patch that Debian has? Where to look, > glibc, hurd, ...? Ideas? So...I found a way to reproduce the feature/bug: run "pragma synchronous = =3D normal;" in two instances. I created a db.sqlite using sh -x tests/guix-pack-localstatedir.sh=20 (after removing the cleanup trap). Then, doing --8<---------------cut here---------------start------------->8--- $ sqlite3 db.sqlite=20 SQLite version 3.31.1 2020-01-27 19:55:54 Enter ".help" for usage hints. sqlite> SELECT * FROM ValidPaths; 1|/gnu/store/pqciscj9304544h3yaqb5m70fggsr293-manual-database|sha256:ccd93b= ed3a0018f892abc5db92bf182c3e2e986f41a8ded168915b4d9e85fa18|1||2664 2|/gnu/store/mzfkrxd4w8vqrmyrx169wj8wyw7r8i37-bash|sha256:6f887d45fa0f7e59e= 55c6d7ba86a3d8c35369c7afbb3a5829b8ed226bfef4a66|1||1351880 3|/gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap-2.0|sha256:dc= 3e6b577e995c093849454fe4b9c30e87ece6462c54369ff249121f178c5476|1||12718808 4|/gnu/store/6z4h8g6s73zmcn0h6sm63p9d47ih4b63-info-dir|sha256:fd154332e6d35= c95f12e41d6168a93945b4737fcbaf734bcaf04ca771a106544|1||432 5|/gnu/store/mj7szx64bdh080rlhzhrvcg6viyba73s-profile|sha256:e32ae4d07fc229= 8a72e6942f21ba85c0300a84bbaf5794a8c5f0393a8dc9f253|1||2960 sqlite> pragma synchronous =3D normal; sqlite> C-c C-z^Z [2]+ Stopped sqlite3 db.sqlite [148]18:55:06 janneke@dundal:~/src/guix/master [env] $ sqlite3 db.sqlite=20 SQLite version 3.31.1 2020-01-27 19:55:54 Enter ".help" for usage hints. sqlite> pragma synchronous =3D normal; sqlite>=20 --8<---------------cut here---------------end--------------->8--- works nice on GNU/Linux and on current master Childhurd gives --8<---------------cut here---------------start------------->8--- $ ssh childhurd Last login: Wed Jul 1 12:08:17 2020 from 10.0.2.2 =EE=BC=80=EE=BC=81=EE=BC=82=EE=BC=83=EE=BC=84=EE=BC=85 =EE=BC=86=EE=BC=87=EE=BC=88=EE=BC=89=EE=BC=8A=EE=BC=8B =EE=BC=8C=EE=BC=8D=EE=BC=8E=EE=BC=8F=EE=BC=90=EE=BC=91 This is the GNU Hur= d. Welcome. root@childhurd ~# sqlite3 db.sqlite=20 SQLite version 3.31.1 2020-01-27 19:55:54 Enter ".help" for usage hints. sqlite> SELECT * FROM ValidPaths; 1|/gnu/store/pqciscj9304544h3yaqb5m70fggsr293-manual-database|sha256:ccd93b= ed3a0018f892abc5db92bf182c3e2e986f41a8ded168915b4d9e85fa18|1||2664 2|/gnu/store/mzfkrxd4w8vqrmyrx169wj8wyw7r8i37-bash|sha256:6f887d45fa0f7e59e= 55c6d7ba86a3d8c35369c7afbb3a5829b8ed226bfef4a66|1||1351880 3|/gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap-2.0|sha256:dc= 3e6b577e995c093849454fe4b9c30e87ece6462c54369ff249121f178c5476|1||12718808 4|/gnu/store/6z4h8g6s73zmcn0h6sm63p9d47ih4b63-info-dir|sha256:fd154332e6d35= c95f12e41d6168a93945b4737fcbaf734bcaf04ca771a106544|1||432 5|/gnu/store/mj7szx64bdh080rlhzhrvcg6viyba73s-profile|sha256:e32ae4d07fc229= 8a72e6942f21ba85c0300a84bbaf5794a8c5f0393a8dc9f253|1||2960 sqlite> pragma synchronous =3D normal; sqlite> C-c C-z^Z [1]+ Stopped sqlite3 db.sqlite root@childhurd ~# sqlite3 db.sqlite=20 SQLite version 3.31.1 2020-01-27 19:55:54 Enter ".help" for usage hints. sqlite> pragma synchronous =3D normal; Error: locking protocol sqlite>=20 --8<---------------cut here---------------end--------------->8--- On Debian/Hurd (which I hoped had a patched, fixed sqlite3), it doesn't work at all --8<---------------cut here---------------start------------->8--- $ ssh hurd GNU debian 0.9 GNU-Mach 1.8+git20191117-486/Hurd-0.9 i686-AT386 =EE=BC=80=EE=BC=81=EE=BC=82=EE=BC=83=EE=BC=84=EE=BC=85 =EE=BC=86=EE=BC=87=EE=BC=88=EE=BC=89=EE=BC=8A=EE=BC=8B =EE=BC=8C=EE=BC=8D=EE=BC=8E=EE=BC=8F=EE=BC=90=EE=BC=91 This is the GNU Hur= d. Welcome. The Hurd is not Linux. Make sure to read http://www.debian.org/ports/hurd/hurd-install to check out the few things you _need_ to know. Also check out the FAQ http://www.gnu.org/software/hurd/faq.html or its latest version on http://darnassus.sceen.net/~hurd-web/faq/ To read a short intro on some nice features of the Hurd, just have a look at the translator_primer file, for example via 'nano translator_primer' Last login: Wed Jul 1 12:58:44 2020 from 10.0.2.2 janneke@debian:~$ sqlite3 db.sqlite SQLite version 3.32.3 2020-06-18 14:00:33 Enter ".help" for usage hints. sqlite> SELECT * FROM ValidPaths; Error: unable to open database file sqlite>=20 --8<---------------cut here---------------end--------------->8--- So, still a similar question...is the patch simply broken/bitrotted, or did some file locking change on the Hurd? Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 08:49:43 2020 Received: (at 42151) by debbugs.gnu.org; 2 Jul 2020 12:49:43 +0000 Received: from localhost ([127.0.0.1]:54564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqyet-0006Id-0b for submit@debbugs.gnu.org; Thu, 02 Jul 2020 08:49:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqyeq-0006IP-CH for 42151@debbugs.gnu.org; Thu, 02 Jul 2020 08:49:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60117) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqyel-0007LN-39; Thu, 02 Jul 2020 08:49:35 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54396 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jqyek-0004Cr-FI; Thu, 02 Jul 2020 08:49:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol References: <20200701142929.26919-1-janneke@gnu.org> Date: Thu, 02 Jul 2020 14:49:32 +0200 In-Reply-To: <20200701142929.26919-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 1 Jul 2020 16:29:29 +0200") Message-ID: <87imf6rsir.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! "Jan (janneke) Nieuwenhuizen" skribis: > $ guix offload test > guix offload: testing 1 build machines defined in '/etc/guix/machines.scm= '... > guix offload: Guix is usable on 'childhurd' (test returned "/gnu/store/88= 3yjkl46dxw9mzykykmbs0yzwyxm17z-test") > guix offload: 'childhurd' is running GNU Guile 3.0.4 > guix offload: error: exception occurred on remote host 'localhost': (%exc= eption #>) Does sqlite pass its tests on GNU/Hurd? Does it help if you set =E2=80=98settings.fsyncMetadata =3D false=E2=80=99 = in the daemon? As a stop-gap, we could add a command-line option if that helps. The =E2=80=9Csynchronous =3D normal=E2=80=9D mode translates to =E2=80=98fs= ync=E2=80=99 calls, right? If you rpctrace sqlite3, do you see =E2=80=98file_sync=E2=80=99 calls failing? My 2=C2=A2! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 06:03:40 2020 Received: (at 42151) by debbugs.gnu.org; 3 Jul 2020 10:03:40 +0000 Received: from localhost ([127.0.0.1]:56487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrIXk-0006wm-0Y for submit@debbugs.gnu.org; Fri, 03 Jul 2020 06:03:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrIXg-0006wN-KN for 42151@debbugs.gnu.org; Fri, 03 Jul 2020 06:03:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55156) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrIXa-0004Ar-4A; Fri, 03 Jul 2020 06:03:30 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=37754 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 1jrIXZ-0004OK-Dz; Fri, 03 Jul 2020 06:03:29 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Organization: AvatarAcademy.nl References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 03 Jul 2020 12:03:26 +0200 In-Reply-To: <87imf6rsir.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 02 Jul 2020 14:49:32 +0200") Message-ID: <873668zzip.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hi! > "Jan (janneke) Nieuwenhuizen" skribis: > >> $ guix offload test >> guix offload: testing 1 build machines defined in '/etc/guix/machines.sc= m'... >> guix offload: Guix is usable on 'childhurd' (test returned "/gnu/store/8= 83yjkl46dxw9mzykykmbs0yzwyxm17z-test") >> guix offload: 'childhurd' is running GNU Guile 3.0.4 >> guix offload: error: exception occurred on remote host 'localhost': >> (%exception #> "setting synchronous mode: locking protocol" status: 1>>) > Does it help if you set =E2=80=98settings.fsyncMetadata =3D false=E2=80= =99 in the daemon? > As a stop-gap, we could add a command-line option if that helps. Tried that, thanks. No, it does not help. (But that's good news, see belo= w!) > The =E2=80=9Csynchronous =3D normal=E2=80=9D mode translates to =E2=80=98= fsync=E2=80=99 calls, right? If > you rpctrace sqlite3, do you see =E2=80=98file_sync=E2=80=99 calls failin= g? Tried that before, rpctrace hangs before I see something useful. > Does sqlite pass its tests on GNU/Hurd? That's the (or at least a) right question: YES! > My 2=C2=A2! Thanks -- it seems that buys us a pretty cheap fix after all, $-wise ;) It turns out that Debian's patch (and thus this patch series) is probably OK: It fixes the locking problem on the Hurd, while exposing another bug, apparently: "unable to open database file". It seems there is a compatibility bug/problem/thing with the db.sqlite that we produce on GNU/Linux. While an unpatched sqlite3 on the Hurd can read it, and work with it, the unpatched sqlite has locking problems. I found a workaround, though: dumping and loading the database file. Look... --8<---------------cut here---------------start------------->8--- $ scp childhurd2:/var/guix/db/db.sqlite db.sqlite-orig db.sqlite = 100% 144KB 5.8MB/s 00:00=20=20=20=20 11:30:37 janneke@dundal:~/tmp [env] $ sqlite3 db.sqlite-orig .dump > db.dump 11:30:45 janneke@dundal:~/tmp [env] $ sqlite3 -init db.dump db.sqlite-init .quit -- Loading resources from db.dump 11:30:49 janneke@dundal:~/tmp [env] $ cmp db.sqlite-orig db.sqlite-init=20 db.sqlite-orig db.sqlite-init differ: byte 19, line 1 [1]11:31:11 janneke@dundal:~/tmp [env] $ scp db.sqlite-init childhurd2:/var/guix/db/db.sqlite db.sqlite-init = 100% 144KB 7.3MB/s 00:00=20=20=20=20 11:31:21 janneke@dundal:~/tmp [env] $ guix offload test guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'.= .. guix offload: Guix is usable on 'localhost' (test returned "/gnu/store/883y= jkl46dxw9mzykykmbs0yzwyxm17z-test") guix offload: 'localhost' is running GNU Guile 3.0.4 sending 1 store item (0 MiB) to 'localhost'... exporting path `/gnu/store/y6b7bjqsazmm6jsyj5y80dqqajysw64p-export-test' guix offload: 'localhost' successfully imported '/gnu/store/y6b7bjqsazmm6js= yj5y80dqqajysw64p-export-test' retrieving 1 store item from 'localhost'... guix offload: successfully imported '/gnu/store/gxz6hzyc1cy3m1w9l7f2dk6rcsp= vymxf-import-test' from 'localhost' 11:31:29 janneke@dundal:~/tmp [env] --8<---------------cut here---------------end--------------->8--- So...about the compatibility problem. I tried to diff the db.sqlite-orig db.sqlite-init binary files: they look completely different. Not sure how to handle this workaround, maybe we can insert a two system* calls somewhere when building the disk image? Greetings, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 09:51:44 2020 Received: (at 42151) by debbugs.gnu.org; 3 Jul 2020 13:51:44 +0000 Received: from localhost ([127.0.0.1]:56649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrM6S-0006PX-Cj for submit@debbugs.gnu.org; Fri, 03 Jul 2020 09:51:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrM6O-0006PG-6Z for 42151@debbugs.gnu.org; Fri, 03 Jul 2020 09:51:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41214) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrM6H-00009d-Ia; Fri, 03 Jul 2020 09:51:33 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34204 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrM6G-0005Nc-KV; Fri, 03 Jul 2020 09:51:33 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jan Nieuwenhuizen Subject: Re: bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> <873668zzip.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Messidor an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 03 Jul 2020 15:51:29 +0200 In-Reply-To: <873668zzip.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 03 Jul 2020 12:03:26 +0200") Message-ID: <87fta8ogf2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Jan Nieuwenhuizen skribis: > Thanks -- it seems that buys us a pretty cheap fix after all, $-wise ;) Heheh. :-) > It turns out that Debian's patch (and thus this patch series) is > probably OK: It fixes the locking problem on the Hurd, while exposing > another bug, apparently: "unable to open database file". > > It seems there is a compatibility bug/problem/thing with the db.sqlite > that we produce on GNU/Linux. While an unpatched sqlite3 on the Hurd > can read it, and work with it, the unpatched sqlite has locking > problems. I found a workaround, though: dumping and loading the > database file. > > Look... > > $ scp childhurd2:/var/guix/db/db.sqlite db.sqlite-orig > db.sqlite = 100% 144KB 5.8MB/s 00:00=20=20=20=20 > 11:30:37 janneke@dundal:~/tmp [env] > $ sqlite3 db.sqlite-orig .dump > db.dump > 11:30:45 janneke@dundal:~/tmp [env] > $ sqlite3 -init db.dump db.sqlite-init .quit > -- Loading resources from db.dump > 11:30:49 janneke@dundal:~/tmp [env] > $ cmp db.sqlite-orig db.sqlite-init=20 > db.sqlite-orig db.sqlite-init differ: byte 19, line 1 > [1]11:31:11 janneke@dundal:~/tmp [env] > $ scp db.sqlite-init childhurd2:/var/guix/db/db.sqlite > db.sqlite-init = 100% 144KB 7.3MB/s 00:00=20=20=20=20 > 11:31:21 janneke@dundal:~/tmp [env] > $ guix offload test > guix offload: testing 1 build machines defined in '/etc/guix/machines.scm= '... > guix offload: Guix is usable on 'localhost' (test returned "/gnu/store/88= 3yjkl46dxw9mzykykmbs0yzwyxm17z-test") > guix offload: 'localhost' is running GNU Guile 3.0.4 > sending 1 store item (0 MiB) to 'localhost'... > exporting path `/gnu/store/y6b7bjqsazmm6jsyj5y80dqqajysw64p-export-test' > guix offload: 'localhost' successfully imported '/gnu/store/y6b7bjqsazmm6= jsyj5y80dqqajysw64p-export-test' > retrieving 1 store item from 'localhost'... > guix offload: successfully imported '/gnu/store/gxz6hzyc1cy3m1w9l7f2dk6rc= spvymxf-import-test' from 'localhost' > 11:31:29 janneke@dundal:~/tmp [env] > > So...about the compatibility problem. I tried to diff the db.sqlite-orig > db.sqlite-init binary files: they look completely different. Not sure > how to handle this workaround, maybe we can insert a two system* calls > somewhere when building the disk image? Weird, weird! Could you compare =E2=80=98db.dump=E2=80=99 created on GNU/Hurd with =E2=80= =98db.dump=E2=80=99 created from the same =E2=80=98sqlite3 -init=E2=80=99 command on GNU/Linux? (Perha= ps loading the dump reorders entries or something.) I think the binary format of the database is supposed to be architecture-independent and filling it is supposed to be deterministic. Congrats for getting this far anyway! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 11:27:54 2020 Received: (at 42151) by debbugs.gnu.org; 3 Jul 2020 15:27:54 +0000 Received: from localhost ([127.0.0.1]:57379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrNbW-0000Nn-06 for submit@debbugs.gnu.org; Fri, 03 Jul 2020 11:27:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrNbT-0000Na-Hx for 42151@debbugs.gnu.org; Fri, 03 Jul 2020 11:27:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43428) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrNbN-0006YK-KT; Fri, 03 Jul 2020 11:27:45 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=38644 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 1jrNbM-0000zr-0j; Fri, 03 Jul 2020 11:27:44 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Organization: AvatarAcademy.nl References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> <873668zzip.fsf@gnu.org> <87fta8ogf2.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 03 Jul 2020 17:27:40 +0200 In-Reply-To: <87fta8ogf2.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 03 Jul 2020 15:51:29 +0200") Message-ID: <87sge8wrdf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hi! >> It seems there is a compatibility bug/problem/thing with the db.sqlite >> that we produce on GNU/Linux. While an unpatched sqlite3 on the Hurd >> can read it, and work with it, the unpatched sqlite has locking >> problems. I found a workaround, though: dumping and loading the >> database file. [..] >> So...about the compatibility problem. I tried to diff the db.sqlite-orig >> db.sqlite-init binary files: they look completely different. Not sure >> how to handle this workaround, maybe we can insert a two system* calls >> somewhere when building the disk image? > > Weird, weird! > > Could you compare =E2=80=98db.dump=E2=80=99 created on GNU/Hurd with =E2= =80=98db.dump=E2=80=99 created > from the same =E2=80=98sqlite3 -init=E2=80=99 command on GNU/Linux? Yeah, they are identical. The initial dump can only be created atm on GNU/Linux; the dump can be loaded (obviously) anywhere like so >> $ sqlite3 -init db.dump db.sqlite-init .quit and the resulting initial db.sqlite is the same. Guess we can do that by hand for now... > (Perhaps loading the dump reorders entries or something.) Yes, "or something" certainly! :) I have no clue... If/when we decide to pinpoint this bug, what could be a first step? Who is creating the database right now, is that the C++ daemon or guile-sqlite3. IWBN to have that code create/save a smaller version and see when reading fails. > I think the binary format of the database is supposed to be > architecture-independent and filling it is supposed to be deterministic. Yes, that works. > Congrats for getting this far anyway! Yeah... \o/ Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 04:13:04 2020 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 To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. 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-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= 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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 07 01:04:43 2020 Received: (at 42151) by debbugs.gnu.org; 7 Jul 2020 05:04:43 +0000 Received: from localhost ([127.0.0.1]:35327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsfmd-0004kL-4d for submit@debbugs.gnu.org; Tue, 07 Jul 2020 01:04:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsfma-0004k8-Ol for 42151@debbugs.gnu.org; Tue, 07 Jul 2020 01:04:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40739) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsfmV-0002Hp-6E; Tue, 07 Jul 2020 01:04:35 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=55532 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 1jsfmU-0007TF-OT; Tue, 07 Jul 2020 01:04:34 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> <873668zzip.fsf@gnu.org> <87fta8ogf2.fsf@gnu.org> <87sge8wrdf.fsf@gnu.org> <87y2nzr94w.fsf_-_@gnu.org> Date: Tue, 07 Jul 2020 07:04:31 +0200 In-Reply-To: <87y2nzr94w.fsf_-_@gnu.org> (Jan Nieuwenhuizen's message of "Sat, 04 Jul 2020 10:12:47 +0200") Message-ID: <87d057apb4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jan Nieuwenhuizen writes: > Jan Nieuwenhuizen writes: > > Adding one additional patch to this series, hence 4/3 (see attached) > fixes the sqlite problem. For clarity -- patches 1-4 really do fix offloading to the Hurd and this... > After the build succeeds, the download fails but lets first get this > patch series done... ...is not true; you gat that when you (I) forgot to add keys in /etc/guix/ As seen on IRC, possibly Ricardo will an update for the QEMU command-line (at least for berlin), adding "--cpu base". Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 08:03:22 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 12:03:22 +0000 Received: from localhost ([127.0.0.1]:42366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtrkP-0000sU-M0 for submit@debbugs.gnu.org; Fri, 10 Jul 2020 08:03:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtrkN-0000sH-Fv for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 08:03:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59742) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtrkH-0008SY-GK; Fri, 10 Jul 2020 08:03:13 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53732 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtrkG-0003Jd-P1; Fri, 10 Jul 2020 08:03:13 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jan Nieuwenhuizen Subject: Re: bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. References: <20200701142929.26919-1-janneke@gnu.org> <87imf6rsir.fsf@gnu.org> <873668zzip.fsf@gnu.org> <87fta8ogf2.fsf@gnu.org> <87sge8wrdf.fsf@gnu.org> <87y2nzr94w.fsf_-_@gnu.org> Date: Fri, 10 Jul 2020 14:03:08 +0200 In-Reply-To: <87y2nzr94w.fsf_-_@gnu.org> (Jan Nieuwenhuizen's message of "Sat, 04 Jul 2020 10:12:47 +0200") Message-ID: <87v9iv1ssj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Jan Nieuwenhuizen skribis: >>>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 Hur= d. > Content-Transfer-Encoding: 8bit > Content-Type: text/plain; charset=3DUTF-8 > > This fixes . > > * guix/store/database.scm (call-with-database): When building for the Hur= d, > 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_LOCK= ED > - ;; 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_LO= CKED > + ;; errors when we have several readers: . > + (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) I think this has the same effect as: (unless #t (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) because this code is not in a gexp, so =E2=80=98let-system=E2=80=99 evaluat= es to an object (not #f), and that=E2=80=99s it, it=E2=80=99s never lowered and the = =E2=80=98equal?=E2=80=99 call is never made. You want to disable WAL mode not just when running this code natively on GNU/Hurd, but also when building a database that will eventually be used on GNU/Hurd, right? In that case, I think you=E2=80=99ll have to add, say, a #:wal-mode? parame= ter to =E2=80=98call-with-database=E2=80=99 (defaulting to #true), and change t= he caller to set it appropriately. The caller, directly or indirectly, is in a gexp, where you can use the =E2=80=98let-system=E2=80=99 expression above. Does that make sense? Thanks, and apologies for the delay! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 08:06:04 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 12:06:04 +0000 Received: from localhost ([127.0.0.1]:42370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtrmy-0000w8-6f for submit@debbugs.gnu.org; Fri, 10 Jul 2020 08:06:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtrms-0000vo-Nx for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 08:05:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59965) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtrmn-0000XG-HS; Fri, 10 Jul 2020 08:05:49 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53756 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtrmm-0006R1-DZ; Fri, 10 Jul 2020 08:05:48 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix. References: <20200701142929.26919-1-janneke@gnu.org> <20200701143118.26985-1-janneke@gnu.org> Date: Fri, 10 Jul 2020 14:05:47 +0200 In-Reply-To: <20200701143118.26985-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 1 Jul 2020 16:31:16 +0200") Message-ID: <87r1tj1so4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/packages/patches/sqlite3-hurd.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/sqlite.scm (sqlite/hurd): New variable. [=E2=80=A6] > +++ b/gnu/packages/patches/sqlite3-hurd.patch > @@ -0,0 +1,51 @@ > +Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.31.1-5= /20-hurd-locking-style.patch > +Upstream status: Not offered upstream. The URL is 404, could you fix it? It would also be great if you could add a sentence or two explaining what this works around, so that our future selves know how to deal with this patch. :-) Otherwise LGTM, you can push with changes along these lines! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 08:06:37 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 12:06:37 +0000 Received: from localhost ([127.0.0.1]:42373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtrnZ-0000xE-Gf for submit@debbugs.gnu.org; Fri, 10 Jul 2020 08:06:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtrnX-0000x1-V3 for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 08:06:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60023) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtrnS-0000cP-P2; Fri, 10 Jul 2020 08:06:30 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53758 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtrnS-0006ag-8g; Fri, 10 Jul 2020 08:06:30 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: bug#42151: [PATCH 2/3] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd. References: <20200701143118.26985-1-janneke@gnu.org> <20200701143118.26985-2-janneke@gnu.org> Date: Fri, 10 Jul 2020 14:06:28 +0200 In-Reply-To: <20200701143118.26985-2-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 1 Jul 2020 16:31:17 +0200") Message-ID: <87mu471smz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > This fixes > > guix offload: error: exception occurred on remote host 'localhost': (= %exception #>) > > * gnu/packages/guile.scm (guile-sqlite3)[inputs]: Use sqlite/hurd instead= of > sqlite. > --- > gnu/packages/guile.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm > index a32bd33293..c651e2427a 100644 > --- a/gnu/packages/guile.scm > +++ b/gnu/packages/guile.scm > @@ -665,7 +665,7 @@ Guile's foreign function interface.") > ("pkg-config" ,pkg-config))) > (inputs > `(("guile" ,guile-3.0) > - ("sqlite" ,sqlite))) > + ("sqlite" ,sqlite/hurd))) This should be guarded by =E2=80=98if (hurd-target?)=E2=80=99, right? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 08:07:41 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 12:07:41 +0000 Received: from localhost ([127.0.0.1]:42378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtroa-0000z4-RL for submit@debbugs.gnu.org; Fri, 10 Jul 2020 08:07:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtroZ-0000yp-Vl for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 08:07:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60105) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtroU-0000kG-QR; Fri, 10 Jul 2020 08:07:34 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53760 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtroU-0006g8-B2; Fri, 10 Jul 2020 08:07:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: bug#42151: [PATCH 3/3] gnu: guix: Use sqlite/hurd for locking on the Hurd. References: <20200701143118.26985-1-janneke@gnu.org> <20200701143118.26985-3-janneke@gnu.org> Date: Fri, 10 Jul 2020 14:07:33 +0200 In-Reply-To: <20200701143118.26985-3-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 1 Jul 2020 16:31:18 +0200") Message-ID: <87imev1sl6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/packages/package-management.scm (guix)[inputs]: Use sqlite/hurd. Same here. Which makes me thing: how about applying the sqlite/hurd patch in a build phase of sqlite that would be Hurd-specific? That way, we=E2=80=99d = still have a single sqlite package. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 08:34:39 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 12:34:39 +0000 Received: from localhost ([127.0.0.1]:42448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtsEg-0001db-Ot for submit@debbugs.gnu.org; Fri, 10 Jul 2020 08:34:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtsEf-0001dN-38 for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 08:34:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33245) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtsEZ-0004y6-RA; Fri, 10 Jul 2020 08:34:31 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53812 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jtsEY-0005B2-QO; Fri, 10 Jul 2020 08:34:31 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Jan Nieuwenhuizen Subject: Re: bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol 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://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 Messidor an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 10 Jul 2020 14:34:28 +0200 In-Reply-To: <87sge8wrdf.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 03 Jul 2020 17:27:40 +0200") Message-ID: <87sgdzzgyz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Jan Nieuwenhuizen skribis: > Ludovic Court=C3=A8s writes: > > Hi! > >>> It seems there is a compatibility bug/problem/thing with the db.sqlite >>> that we produce on GNU/Linux. While an unpatched sqlite3 on the Hurd >>> can read it, and work with it, the unpatched sqlite has locking >>> problems. I found a workaround, though: dumping and loading the >>> database file. > > [..] > >>> So...about the compatibility problem. I tried to diff the db.sqlite-or= ig >>> db.sqlite-init binary files: they look completely different. Not sure >>> how to handle this workaround, maybe we can insert a two system* calls >>> somewhere when building the disk image? >> >> Weird, weird! >> >> Could you compare =E2=80=98db.dump=E2=80=99 created on GNU/Hurd with =E2= =80=98db.dump=E2=80=99 created >> from the same =E2=80=98sqlite3 -init=E2=80=99 command on GNU/Linux? > > Yeah, they are identical. The initial dump can only be created atm on > GNU/Linux; the dump can be loaded (obviously) anywhere like so > >>> $ sqlite3 -init db.dump db.sqlite-init .quit > > and the resulting initial db.sqlite is the same. Guess we can do that > by hand for now... > >> (Perhaps loading the dump reorders entries or something.) > > Yes, "or something" certainly! :) I have no clue... Sorry for catching up days later but=E2=80=A6 did disabling WAL mode fix th= is discrepancy? IOW, without WAL mode, is the file produced on GNU/Linux bit-identical to that produced on GNU/Hurd? > If/when we decide to pinpoint this bug, what could be a first step? Who > is creating the database right now, is that the C++ daemon or > guile-sqlite3. IWBN to have that code create/save a smaller version and > see when reading fails. As you found out it=E2=80=99s created by (guix store database) in this case. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 11:40:41 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 15:40:41 +0000 Received: from localhost ([127.0.0.1]:43257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtv8e-0006CL-IN for submit@debbugs.gnu.org; Fri, 10 Jul 2020 11:40:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtv8a-0006C6-RS for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 11:40:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36318) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtv8U-0007IJ-P6; Fri, 10 Jul 2020 11:40:26 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44358 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 1jtv8U-0001jr-5n; Fri, 10 Jul 2020 11:40:26 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd. 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> <87y2nzr94w.fsf_-_@gnu.org> <87v9iv1ssj.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 10 Jul 2020 17:40:23 +0200 In-Reply-To: <87v9iv1ssj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 10 Jul 2020 14:03:08 +0200") Message-ID: <87a707v0ns.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hi! > Jan Nieuwenhuizen skribis: > >>>>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 Hu= rd. >> Content-Transfer-Encoding: 8bit >> Content-Type: text/plain; charset=3DUTF-8 >> >> This fixes . [...] >> 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 [...] >> + ;; 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_L= OCKED >> + ;; errors when we have several readers: . >> + (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) > > I think this has the same effect as: > > (unless #t > (sqlite-exec db "PRAGMA journal_mode=3DWAL;")) > > because this code is not in a gexp, so =E2=80=98let-system=E2=80=99 evalu= ates to an > object (not #f), and that=E2=80=99s it, it=E2=80=99s never lowered and th= e =E2=80=98equal?=E2=80=99 call > is never made. Oops. Great catch, thanks! > You want to disable WAL mode not just when running this code natively on > GNU/Hurd, but also when building a database that will eventually be used > on GNU/Hurd, right? Exactly. > In that case, I think you=E2=80=99ll have to add, say, a #:wal-mode? para= meter > to =E2=80=98call-with-database=E2=80=99 (defaulting to #true), and change= the caller to > set it appropriately. The caller, directly or indirectly, is in a gexp, > where you can use the =E2=80=98let-system=E2=80=99 expression above. > > Does that make sense? Yes, very much so. [...] After some typing, it turns out that the whole let-system is gone, we can set use a hard-coded #:wal-mode? #t in hurd-initialize-root-partition. > Thanks, and apologies for the delay! Sure, I'm happy I didn't "just push" ;-) I'm sending a v2 patch set in a minute. Greetings, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 11:42:15 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 15:42:15 +0000 Received: from localhost ([127.0.0.1]:43263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAF-0006Ez-4M for submit@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAD-0006Ek-Tf for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36364) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtvA8-0007g6-KU; Fri, 10 Jul 2020 11:42:08 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44364 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jtvA7-0001td-NE; Fri, 10 Jul 2020 11:42:08 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH v2 2/4] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd. Date: Fri, 10 Jul 2020 17:42:03 +0200 Message-Id: <20200710154205.31342-2-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200710154205.31342-1-janneke@gnu.org> References: <20200710154205.31342-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This fixes guix offload: error: exception occurred on remote host 'localhost': (%exception #>) * gnu/packages/guile.scm (guile-sqlite3)[inputs]: Use sqlite/hurd instead of sqlite. --- gnu/packages/guile.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index a32bd33293..c651e2427a 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -665,7 +665,7 @@ Guile's foreign function interface.") ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-3.0) - ("sqlite" ,sqlite))) + ("sqlite" ,sqlite/hurd))) (synopsis "Access SQLite databases from Guile") (description "This package provides Guile bindings to the SQLite database system.") -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 11:42:18 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 15:42:18 +0000 Received: from localhost ([127.0.0.1]:43266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAG-0006FI-MJ for submit@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAF-0006Em-38 for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36365) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtvA9-0007gE-Pr; Fri, 10 Jul 2020 11:42:09 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44364 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jtvA9-0001td-2u; Fri, 10 Jul 2020 11:42:09 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH v2 3/4] gnu: guix: Use sqlite/hurd for locking on the Hurd. Date: Fri, 10 Jul 2020 17:42:04 +0200 Message-Id: <20200710154205.31342-3-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200710154205.31342-1-janneke@gnu.org> References: <20200710154205.31342-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/package-management.scm (guix)[inputs]: Use sqlite/hurd. --- gnu/packages/package-management.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 9986976cc6..64c6931011 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -343,7 +343,7 @@ $(prefix)/etc/init.d\n"))) ("zlib" ,zlib) ;for 'guix publish' ("lzlib" ,lzlib) ;for 'guix publish' and 'guix substitute' - ("sqlite" ,sqlite) + ("sqlite" ,sqlite/hurd) ("libgcrypt" ,libgcrypt) ("guile" ,guile-3.0-latest) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 11:42:24 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 15:42:24 +0000 Received: from localhost ([127.0.0.1]:43268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAI-0006FN-GG for submit@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAC-0006Ei-Fy for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36363) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtvA7-0007fv-7N; Fri, 10 Jul 2020 11:42:07 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44364 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jtvA6-0001td-QD; Fri, 10 Jul 2020 11:42:07 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH v2 1/4] gnu: Add sqlite/hurd with locking fix. Date: Fri, 10 Jul 2020 17:42:02 +0200 Message-Id: <20200710154205.31342-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/sqlite3-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/sqlite.scm (sqlite/hurd): Use it in new variable. --- gnu/local.mk | 1 + gnu/packages/patches/sqlite3-hurd.patch | 51 +++++++++++++++++++++++++ gnu/packages/sqlite.scm | 9 +++++ 3 files changed, 61 insertions(+) create mode 100644 gnu/packages/patches/sqlite3-hurd.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5c3b391960..e452004945 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1370,6 +1370,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-header-guard.patch \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ + %D%/packages/patches/sqlite3-hurd.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ diff --git a/gnu/packages/patches/sqlite3-hurd.patch b/gnu/packages/patches/sqlite3-hurd.patch new file mode 100644 index 0000000000..de87a30cb1 --- /dev/null +++ b/gnu/packages/patches/sqlite3-hurd.patch @@ -0,0 +1,51 @@ +Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.31.1-5/20-hurd-locking-style.patch +Upstream status: Not offered upstream. + +diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c +--- sqlite-autoconf-3310100/sqlite3.c 2020-01-27 21:25:19.000000000 +0100 ++++ sqlite-autoconf-3310100-/sqlite3.c 2020-07-01 11:50:13.768333806 +0200 +@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode + # include + #endif + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + /* # include */ + # include + # include +@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id + ** + ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off + */ +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + + /* + ** Retry flock() calls that fail with EINTR +@@ -38586,7 +38586,7 @@ IOMETHODS( + 0 /* xShmMap method */ + ) + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + IOMETHODS( + flockIoFinder, /* Finder function name */ + flockIoMethods, /* sqlite3_io_methods object name */ +@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){ + UNIXVFS("unix", autolockIoFinder ), + #elif OS_VXWORKS + UNIXVFS("unix", vxworksIoFinder ), ++#elif defined(__GNU__) ++ UNIXVFS("unix", flockIoFinder ), + #else + UNIXVFS("unix", posixIoFinder ), + #endif +@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){ + #if OS_VXWORKS + UNIXVFS("unix-namedsem", semIoFinder ), + #endif +-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS ++#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__) + UNIXVFS("unix-posix", posixIoFinder ), + #endif + #if SQLITE_ENABLE_LOCKING_STYLE diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 8468131ddf..d5c44b0d0f 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2017 Jelle Licht ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Alex Vong +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -107,3 +108,11 @@ is in the public domain.") ;; commit fad5b1a6d8d9c36bea5785ae4fbc1beb37e644d7. (define-public sqlite-with-column-metadata (deprecated-package "sqlite-with-column-metadata" sqlite)) + +(define-public sqlite/hurd + ;; TODO move into sqlite on the next rebuild cycle. + (package + (inherit sqlite) + (name "sqlite-for-hurd") + (source (origin (inherit (package-source sqlite)) + (patches (search-patches "sqlite3-hurd.patch")))))) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 11:42:25 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 15:42:25 +0000 Received: from localhost ([127.0.0.1]:43270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAO-0006Fg-Eb for submit@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvAG-0006Eo-3P for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 11:42:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36366) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtvAA-0007gL-QV; Fri, 10 Jul 2020 11:42:10 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44364 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jtvAA-0001td-9V; Fri, 10 Jul 2020 11:42:10 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH v2 4/4] image: Do not set journal_model=WAL for the Hurd. Date: Fri, 10 Jul 2020 17:42:05 +0200 Message-Id: <20200710154205.31342-4-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200710154205.31342-1-janneke@gnu.org> References: <20200710154205.31342-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This fixes . * gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-mode #f in call to ... * gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mode? parameter, pass it to ... (register-closure): ... this, add #:wal-mode? parameter, pass it to ... * guix/store/database.scm (with-database): ... this, add #:wal-mode? parameter, pass it to ... (call-with-database): ... this, add #:wal-mode? parameter; when set to #f, do not set journal_model=WAL. --- gnu/build/image.scm | 26 ++++++++++++++++---------- gnu/system/images/hurd.scm | 4 ++-- guix/store/database.scm | 29 ++++++++++++++++++++--------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/gnu/build/image.scm b/gnu/build/image.scm index e7b0418182..d8efa73f16 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -131,20 +131,23 @@ given CONFIG file." (define* (register-closure prefix closure #:key (deduplicate? #t) (reset-timestamps? #t) - (schema (sql-schema))) + (schema (sql-schema)) + (wal-mode? #t)) "Register CLOSURE in PREFIX, where PREFIX is the directory name of the target store and CLOSURE is the name of a file containing a reference graph as produced by #:references-graphs.. As a side effect, if RESET-TIMESTAMPS? is true, reset timestamps on store files and, if DEDUPLICATE? is true, -deduplicates files common to CLOSURE and the rest of PREFIX." +deduplicates files common to CLOSURE and the rest of PREFIX. Pass WAL-MODE? +to call-with-database." (let ((items (call-with-input-file closure read-reference-graph))) (parameterize ((sql-schema schema)) (with-database (store-database-file #:prefix prefix) db - (register-items db items - #:prefix prefix - #:deduplicate? deduplicate? - #:reset-timestamps? reset-timestamps? - #:registration-time %epoch))))) + #:wal-mode? wal-mode? + (register-items db items + #:prefix prefix + #:deduplicate? deduplicate? + #:reset-timestamps? reset-timestamps? + #:registration-time %epoch))))) (define* (initialize-efi-partition root #:key @@ -164,14 +167,16 @@ deduplicates files common to CLOSURE and the rest of PREFIX." (register-closures? #t) system-directory make-device-nodes + (wal-mode? #t) #:allow-other-keys) "Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to install the bootloader configuration. If REGISTER-CLOSURES? is true, register REFERENCES-GRAPHS in the store. If DEDUPLICATE? is true, then also deduplicate files common to CLOSURES and the -rest of the store when registering the closures. SYSTEM-DIRECTORY is the name -of the directory of the 'system' derivation." +rest of the store when registering the closures. SYSTEM-DIRECTORY is the name +of the directory of the 'system' derivation. Pass WAL-MODE? to +register-closure." (populate-root-file-system system-directory root) (populate-store references-graphs root) @@ -184,7 +189,8 @@ of the directory of the 'system' derivation." (register-closure root closure #:reset-timestamps? #t - #:deduplicate? deduplicate?)) + #:deduplicate? deduplicate? + #:wal-mode? wal-mode?)) references-graphs)) (when bootloader-installer diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm index 31942e7386..4e1db37104 100644 --- a/gnu/system/images/hurd.scm +++ b/gnu/system/images/hurd.scm @@ -61,8 +61,8 @@ #~(lambda* (#:rest args) (apply initialize-root-partition (append args - (list #:make-device-nodes - make-hurd-device-nodes))))) + (list #:make-device-nodes make-hurd-device-nodes + #:wal-mode? #f))))) (define hurd-disk-image (image diff --git a/guix/store/database.scm b/guix/store/database.scm index a38e4d7e52..50b66ce282 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2019 Caleb Ristvedt ;;; Copyright © 2018, 2020 Ludovic Courtès +;;; Copyright © 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) @@ -97,17 +100,20 @@ as specified by SQL-SCHEMA." (sqlite-exec db (call-with-input-file schema get-string-all))) -(define (call-with-database file proc) +(define* (call-with-database file proc #:key (wal-mode? #t)) "Pass PROC a database record corresponding to FILE. If FILE doesn't exist, -create it and initialize it as a new database." +create it and initialize it as a new database. Unless WAL-MODE? is set to #f, +set journal_mode=WAL." (let ((new? (and (not (file-exists? file)) (begin (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=WAL;") + ;; Using WAL breaks for the Hurd . + (when wal-mode? + ;; Turn DB in "write-ahead log" mode, which should avoid SQLITE_LOCKED + ;; errors when we have several readers: . + (sqlite-exec db "PRAGMA journal_mode=WAL;")) ;; Install a busy handler such that, when the database is locked, sqlite ;; retries until 30 seconds have passed, at which point it gives up and @@ -200,10 +206,15 @@ prior to returning." ;; Default location of the store database. (string-append %store-database-directory "/db.sqlite")) -(define-syntax-rule (with-database file db exp ...) - "Open DB from FILE and close it when the dynamic extent of EXP... is left. -If FILE doesn't exist, create it and initialize it as a new database." - (call-with-database file (lambda (db) exp ...))) +(define-syntax with-database + (syntax-rules () + "Open DB from FILE and close it when the dynamic extent of EXP... is left. +If FILE doesn't exist, create it and initialize it as a new database. Pass +#:wal-mode? to call-with-database." + ((_ file db #:wal-mode? wal-mode? exp ...) + (call-with-database file (lambda (db) exp ...) #:wal-mode? wal-mode?)) + ((_ file db exp ...) + (call-with-database file (lambda (db) exp ...))))) (define (sqlite-finalize stmt) ;; As of guile-sqlite3 0.1.0, cached statements aren't reset when -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 12:25:46 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 16:25:46 +0000 Received: from localhost ([127.0.0.1]:43313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvqM-0007H9-DR for submit@debbugs.gnu.org; Fri, 10 Jul 2020 12:25:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtvqJ-0007Gv-74 for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 12:25:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37715) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtvqB-0006Xw-Vc; Fri, 10 Jul 2020 12:25:35 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44416 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 1jtvq6-000749-85; Fri, 10 Jul 2020 12:25:31 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 3/3] gnu: guix: Use sqlite/hurd for locking on the Hurd. Organization: AvatarAcademy.nl References: <20200701143118.26985-1-janneke@gnu.org> <20200701143118.26985-3-janneke@gnu.org> <87imev1sl6.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 10 Jul 2020 18:25:28 +0200 In-Reply-To: <87imev1sl6.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 10 Jul 2020 14:07:33 +0200") Message-ID: <87v9ivtk07.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: >> * gnu/packages/package-management.scm (guix)[inputs]: Use sqlite/hurd. > > Same here. > > Which makes me thing: how about applying the sqlite/hurd patch in a > build phase of sqlite that would be Hurd-specific? That way, we=E2=80=99= d still > have a single sqlite package. Ah, yes that sounds better. We don't need sqlite/hurd "sqlite-for-hurd" and all that. I'll give that a go!=20 Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 14:34:25 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 18:34:25 +0000 Received: from localhost ([127.0.0.1]:43422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxqn-0001sQ-Cb for submit@debbugs.gnu.org; Fri, 10 Jul 2020 14:34:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxqi-0001sB-NZ for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 14:34:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40156) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtxqd-0006YN-F6; Fri, 10 Jul 2020 14:34:11 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44686 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 1jtxqc-0006XY-Lx; Fri, 10 Jul 2020 14:34:11 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix. Organization: AvatarAcademy.nl References: <20200701142929.26919-1-janneke@gnu.org> <20200701143118.26985-1-janneke@gnu.org> <87r1tj1so4.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 10 Jul 2020 20:34:07 +0200 In-Reply-To: <87r1tj1so4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 10 Jul 2020 14:05:47 +0200") Message-ID: <87sgdzte1s.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> * gnu/packages/patches/sqlite3-hurd.patch: New file. >> * gnu/local.mk (dist_patch_DATA): Add it. >> * gnu/packages/sqlite.scm (sqlite/hurd): New variable. > > [=E2=80=A6] > >> +++ b/gnu/packages/patches/sqlite3-hurd.patch >> @@ -0,0 +1,51 @@ >> +Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.31.1-= 5/20-hurd-locking-style.patch >> +Upstream status: Not offered upstream. > > The URL is 404, could you fix it? That's weird...Changing it (in completely rewritten patch) to https://sources.debian.org/patches/sqlite3/3.32.3-1/20-hurd-locking-sty= le.patch/ > It would also be great if you could > add a sentence or two explaining what this works around, so that our > future selves know how to deal with this patch. :-) Ah, sure! > Otherwise LGTM, you can push with changes along these lines! As it's so much changed, I'll send it by one more time :-) Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 14:34:52 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 18:34:52 +0000 Received: from localhost ([127.0.0.1]:43425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxrI-0001t8-Gb for submit@debbugs.gnu.org; Fri, 10 Jul 2020 14:34:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxrH-0001su-48 for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 14:34:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40162) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtxrA-0006b4-Qb; Fri, 10 Jul 2020 14:34:44 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44688 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 1jtxrA-0006cC-6g; Fri, 10 Jul 2020 14:34:44 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH 2/3] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd. Organization: AvatarAcademy.nl References: <20200701143118.26985-1-janneke@gnu.org> <20200701143118.26985-2-janneke@gnu.org> <87mu471smz.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Fri, 10 Jul 2020 20:34:42 +0200 In-Reply-To: <87mu471smz.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 10 Jul 2020 14:06:28 +0200") Message-ID: <87r1tjte0t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> This fixes >> >> guix offload: error: exception occurred on remote host 'localhost': = (%exception #>) >> >> * gnu/packages/guile.scm (guile-sqlite3)[inputs]: Use sqlite/hurd instea= d of >> sqlite. >> --- >> gnu/packages/guile.scm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm >> index a32bd33293..c651e2427a 100644 >> --- a/gnu/packages/guile.scm >> +++ b/gnu/packages/guile.scm >> @@ -665,7 +665,7 @@ Guile's foreign function interface.") >> ("pkg-config" ,pkg-config))) >> (inputs >> `(("guile" ,guile-3.0) >> - ("sqlite" ,sqlite))) >> + ("sqlite" ,sqlite/hurd))) > > This should be guarded by =E2=80=98if (hurd-target?)=E2=80=99, right? Yeah...but all changed now...look out for v3. Thanks! Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 14:36:09 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 18:36:09 +0000 Received: from localhost ([127.0.0.1]:43431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxsR-0001vc-Se for submit@debbugs.gnu.org; Fri, 10 Jul 2020 14:36:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxsO-0001v7-QA for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 14:36:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40179) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtxsI-0006ta-QO; Fri, 10 Jul 2020 14:35:55 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44692 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jtxsI-0006le-Au; Fri, 10 Jul 2020 14:35:54 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH v3 2/2] image: Do not set journal_model=WAL for the Hurd. Date: Fri, 10 Jul 2020 20:35:51 +0200 Message-Id: <20200710183551.12807-2-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200710183551.12807-1-janneke@gnu.org> References: <20200710183551.12807-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This fixes . * gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-mode #f in call to ... * gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mode? parameter, pass it to ... (register-closure): ... this, add #:wal-mode? parameter, pass it to ... * guix/store/database.scm (with-database): ... this, add #:wal-mode? parameter, pass it to ... (call-with-database): ... this, add #:wal-mode? parameter; when set to #f, do not set journal_model=WAL. --- gnu/build/image.scm | 26 ++++++++++++++++---------- gnu/system/images/hurd.scm | 4 ++-- guix/store/database.scm | 29 ++++++++++++++++++++--------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/gnu/build/image.scm b/gnu/build/image.scm index e7b0418182..d8efa73f16 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -131,20 +131,23 @@ given CONFIG file." (define* (register-closure prefix closure #:key (deduplicate? #t) (reset-timestamps? #t) - (schema (sql-schema))) + (schema (sql-schema)) + (wal-mode? #t)) "Register CLOSURE in PREFIX, where PREFIX is the directory name of the target store and CLOSURE is the name of a file containing a reference graph as produced by #:references-graphs.. As a side effect, if RESET-TIMESTAMPS? is true, reset timestamps on store files and, if DEDUPLICATE? is true, -deduplicates files common to CLOSURE and the rest of PREFIX." +deduplicates files common to CLOSURE and the rest of PREFIX. Pass WAL-MODE? +to call-with-database." (let ((items (call-with-input-file closure read-reference-graph))) (parameterize ((sql-schema schema)) (with-database (store-database-file #:prefix prefix) db - (register-items db items - #:prefix prefix - #:deduplicate? deduplicate? - #:reset-timestamps? reset-timestamps? - #:registration-time %epoch))))) + #:wal-mode? wal-mode? + (register-items db items + #:prefix prefix + #:deduplicate? deduplicate? + #:reset-timestamps? reset-timestamps? + #:registration-time %epoch))))) (define* (initialize-efi-partition root #:key @@ -164,14 +167,16 @@ deduplicates files common to CLOSURE and the rest of PREFIX." (register-closures? #t) system-directory make-device-nodes + (wal-mode? #t) #:allow-other-keys) "Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to install the bootloader configuration. If REGISTER-CLOSURES? is true, register REFERENCES-GRAPHS in the store. If DEDUPLICATE? is true, then also deduplicate files common to CLOSURES and the -rest of the store when registering the closures. SYSTEM-DIRECTORY is the name -of the directory of the 'system' derivation." +rest of the store when registering the closures. SYSTEM-DIRECTORY is the name +of the directory of the 'system' derivation. Pass WAL-MODE? to +register-closure." (populate-root-file-system system-directory root) (populate-store references-graphs root) @@ -184,7 +189,8 @@ of the directory of the 'system' derivation." (register-closure root closure #:reset-timestamps? #t - #:deduplicate? deduplicate?)) + #:deduplicate? deduplicate? + #:wal-mode? wal-mode?)) references-graphs)) (when bootloader-installer diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm index 31942e7386..4e1db37104 100644 --- a/gnu/system/images/hurd.scm +++ b/gnu/system/images/hurd.scm @@ -61,8 +61,8 @@ #~(lambda* (#:rest args) (apply initialize-root-partition (append args - (list #:make-device-nodes - make-hurd-device-nodes))))) + (list #:make-device-nodes make-hurd-device-nodes + #:wal-mode? #f))))) (define hurd-disk-image (image diff --git a/guix/store/database.scm b/guix/store/database.scm index a38e4d7e52..50b66ce282 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2019 Caleb Ristvedt ;;; Copyright © 2018, 2020 Ludovic Courtès +;;; Copyright © 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) @@ -97,17 +100,20 @@ as specified by SQL-SCHEMA." (sqlite-exec db (call-with-input-file schema get-string-all))) -(define (call-with-database file proc) +(define* (call-with-database file proc #:key (wal-mode? #t)) "Pass PROC a database record corresponding to FILE. If FILE doesn't exist, -create it and initialize it as a new database." +create it and initialize it as a new database. Unless WAL-MODE? is set to #f, +set journal_mode=WAL." (let ((new? (and (not (file-exists? file)) (begin (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=WAL;") + ;; Using WAL breaks for the Hurd . + (when wal-mode? + ;; Turn DB in "write-ahead log" mode, which should avoid SQLITE_LOCKED + ;; errors when we have several readers: . + (sqlite-exec db "PRAGMA journal_mode=WAL;")) ;; Install a busy handler such that, when the database is locked, sqlite ;; retries until 30 seconds have passed, at which point it gives up and @@ -200,10 +206,15 @@ prior to returning." ;; Default location of the store database. (string-append %store-database-directory "/db.sqlite")) -(define-syntax-rule (with-database file db exp ...) - "Open DB from FILE and close it when the dynamic extent of EXP... is left. -If FILE doesn't exist, create it and initialize it as a new database." - (call-with-database file (lambda (db) exp ...))) +(define-syntax with-database + (syntax-rules () + "Open DB from FILE and close it when the dynamic extent of EXP... is left. +If FILE doesn't exist, create it and initialize it as a new database. Pass +#:wal-mode? to call-with-database." + ((_ file db #:wal-mode? wal-mode? exp ...) + (call-with-database file (lambda (db) exp ...) #:wal-mode? wal-mode?)) + ((_ file db exp ...) + (call-with-database file (lambda (db) exp ...))))) (define (sqlite-finalize stmt) ;; As of guile-sqlite3 0.1.0, cached statements aren't reset when -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 10 14:36:16 2020 Received: (at 42151) by debbugs.gnu.org; 10 Jul 2020 18:36:16 +0000 Received: from localhost ([127.0.0.1]:43433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxsX-0001vp-Hp for submit@debbugs.gnu.org; Fri, 10 Jul 2020 14:36:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtxsO-0001v6-Q9 for 42151@debbugs.gnu.org; Fri, 10 Jul 2020 14:36:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40178) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtxsH-0006t1-Ru; Fri, 10 Jul 2020 14:35:55 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44692 helo=dundal.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1jtxsG-0006le-IZ; Fri, 10 Jul 2020 14:35:53 -0400 From: "Jan (janneke) Nieuwenhuizen" To: 42151@debbugs.gnu.org Subject: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix for the Hurd. Date: Fri, 10 Jul 2020 20:35:50 +0200 Message-Id: <20200710183551.12807-1-janneke@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/sqlite-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/sqlite.scm (sqlite)[native-inputs]: Add it when building for the Hurd. [arguments]: Apply it when building for the Hurd. --- gnu/local.mk | 1 + gnu/packages/patches/sqlite-hurd.patch | 58 ++++++++++++++++++++++++++ gnu/packages/sqlite.scm | 19 +++++++++ 3 files changed, 78 insertions(+) create mode 100644 gnu/packages/patches/sqlite-hurd.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5c3b391960..42c9d0f379 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1370,6 +1370,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-header-guard.patch \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ + %D%/packages/patches/sqlite-hurd.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ diff --git a/gnu/packages/patches/sqlite-hurd.patch b/gnu/packages/patches/sqlite-hurd.patch new file mode 100644 index 0000000000..d80a2c5be8 --- /dev/null +++ b/gnu/packages/patches/sqlite-hurd.patch @@ -0,0 +1,58 @@ +Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.32.3-1/20-hurd-locking-style.patch +Upstream status: Not upstreamed. + +This patch is needed to get offloading to work. + +Sqlite can use simple file locking mode, but that does not work for the Hurd; +a second sqlite process fails with a "locking protocol" error. + +See also: https://bugs.debian.org/529734. + +diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c +--- sqlite-autoconf-3310100/sqlite3.c 2020-01-27 21:25:19.000000000 +0100 ++++ sqlite-autoconf-3310100-/sqlite3.c 2020-07-01 11:50:13.768333806 +0200 +@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode + # include + #endif + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + /* # include */ + # include + # include +@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id + ** + ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off + */ +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + + /* + ** Retry flock() calls that fail with EINTR +@@ -38586,7 +38586,7 @@ IOMETHODS( + 0 /* xShmMap method */ + ) + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + IOMETHODS( + flockIoFinder, /* Finder function name */ + flockIoMethods, /* sqlite3_io_methods object name */ +@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){ + UNIXVFS("unix", autolockIoFinder ), + #elif OS_VXWORKS + UNIXVFS("unix", vxworksIoFinder ), ++#elif defined(__GNU__) ++ UNIXVFS("unix", flockIoFinder ), + #else + UNIXVFS("unix", posixIoFinder ), + #endif +@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){ + #if OS_VXWORKS + UNIXVFS("unix-namedsem", semIoFinder ), + #endif +-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS ++#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__) + UNIXVFS("unix-posix", posixIoFinder ), + #endif + #if SQLITE_ENABLE_LOCKING_STYLE diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 8468131ddf..eeb77749d8 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2017 Jelle Licht ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Alex Vong +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ (define-module (gnu packages sqlite) #:use-module (gnu packages) + #:use-module (gnu packages hurd) #:use-module (gnu packages readline) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -65,6 +67,11 @@ "1bj936svd8i5g25xd1bj52hj4zca01fgl3sqkj86z9q5pkz4wa32")))) (build-system gnu-build-system) (inputs `(("readline" ,readline))) + (native-inputs (if (hurd-target?) + ;; TODO move into origin on the next rebuild cycle. + `(("hurd-locking-mode.patch" + ,@(search-patches "sqlite-hurd.patch"))) + '())) (outputs '("out" "static")) (arguments `(#:configure-flags @@ -79,6 +86,18 @@ ;; Column metadata is required by GNU Jami and Qt, et.al. "-DSQLITE_ENABLE_COLUMN_METADATA")) #:phases (modify-phases %standard-phases + ;; TODO: remove in the next rebuild cycle + ,@(if (hurd-target?) + `((add-after 'unpack 'patch-sqlite/hurd + (lambda* (#:key inputs native-inputs + #:allow-other-keys) + (let ((patch (assoc-ref + (if ,(%current-target-system) + native-inputs + inputs) + "hurd-locking-mode.patch"))) + (invoke "patch" "-p1" "--force" "-i" patch))))) + '()) (add-after 'install 'move-static-library (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 10:18:47 2020 Received: (at 42151) by debbugs.gnu.org; 11 Jul 2020 14:18:47 +0000 Received: from localhost ([127.0.0.1]:44759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGKx-0005Lp-6y for submit@debbugs.gnu.org; Sat, 11 Jul 2020 10:18:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGKr-0005LY-7Q for 42151@debbugs.gnu.org; Sat, 11 Jul 2020 10:18:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56006) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juGKm-00039t-0e; Sat, 11 Jul 2020 10:18:32 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57506 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1juGKl-0003qG-Db; Sat, 11 Jul 2020 10:18:31 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix for the Hurd. References: <20200701142929.26919-1-janneke@gnu.org> <20200710183551.12807-1-janneke@gnu.org> Date: Sat, 11 Jul 2020 16:18:30 +0200 In-Reply-To: <20200710183551.12807-1-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 10 Jul 2020 20:35:50 +0200") Message-ID: <87v9iuw2x5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! "Jan (janneke) Nieuwenhuizen" skribis: > * gnu/packages/patches/sqlite-hurd.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/sqlite.scm (sqlite)[native-inputs]: Add it when building > for the Hurd. > [arguments]: Apply it when building for the Hurd. LGTM, thank you! From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 10:22:32 2020 Received: (at 42151) by debbugs.gnu.org; 11 Jul 2020 14:22:32 +0000 Received: from localhost ([127.0.0.1]:44763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGOd-0005Rh-Ov for submit@debbugs.gnu.org; Sat, 11 Jul 2020 10:22:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGOc-0005RS-5A for 42151@debbugs.gnu.org; Sat, 11 Jul 2020 10:22:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56046) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juGOW-0003mh-68; Sat, 11 Jul 2020 10:22:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57508 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1juGOS-0004BN-14; Sat, 11 Jul 2020 10:22:23 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: bug#42151: [PATCH v3 2/2] image: Do not set journal_model=WAL for the Hurd. References: <20200710183551.12807-1-janneke@gnu.org> <20200710183551.12807-2-janneke@gnu.org> Date: Sat, 11 Jul 2020 16:22:18 +0200 In-Reply-To: <20200710183551.12807-2-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Fri, 10 Jul 2020 20:35:51 +0200") Message-ID: <87r1tiw2qt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151 Cc: 42151@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) "Jan (janneke) Nieuwenhuizen" skribis: > This fixes . > > * gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-= mode #f > in call to ... > * gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mo= de? > parameter, pass it to ... > (register-closure): ... this, add #:wal-mode? parameter, pass it to ... > * guix/store/database.scm (with-database): ... this, add #:wal-mode? > parameter, pass it to ... > (call-with-database): ... this, add #:wal-mode? parameter; when > set to #f, do not set journal_model=3DWAL. [...] > +++ b/gnu/system/images/hurd.scm > @@ -61,8 +61,8 @@ > #~(lambda* (#:rest args) > (apply initialize-root-partition > (append args > - (list #:make-device-nodes > - make-hurd-device-nodes))))) > + (list #:make-device-nodes make-hurd-device-nodes > + #:wal-mode? #f))))) IWBN to have an XXX comment here stating why we disable WAL mode on GNU/Hurd, possibly referencing this issue. That way, we can eventually revisit the issue and hopefully get rid of this workaround. Apart from that the patch LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 10:36:39 2020 Received: (at 42151-done) by debbugs.gnu.org; 11 Jul 2020 14:36:39 +0000 Received: from localhost ([127.0.0.1]:44768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGcJ-0005n1-1L for submit@debbugs.gnu.org; Sat, 11 Jul 2020 10:36:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGcE-0005mm-Lp for 42151-done@debbugs.gnu.org; Sat, 11 Jul 2020 10:36:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56133) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juGc9-0005L3-BN; Sat, 11 Jul 2020 10:36:29 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=41330 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 1juGc8-0001PW-Pq; Sat, 11 Jul 2020 10:36:29 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#42151: [PATCH v3 2/2] image: Do not set journal_model=WAL for the Hurd. Organization: AvatarAcademy.nl References: <20200710183551.12807-1-janneke@gnu.org> <20200710183551.12807-2-janneke@gnu.org> <87r1tiw2qt.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sat, 11 Jul 2020 16:36:26 +0200 In-Reply-To: <87r1tiw2qt.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 11 Jul 2020 16:22:18 +0200") Message-ID: <87365yf79x.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42151-done Cc: 42151-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > "Jan (janneke) Nieuwenhuizen" skribis: > >> This fixes . >> >> * gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal= -mode #f >> in call to ... [...] >> + (list #:make-device-nodes make-hurd-device-nodes >> + #:wal-mode? #f))))) > > IWBN to have an XXX comment here stating why we disable WAL mode on > GNU/Hurd, possibly referencing this issue. That way, we can eventually > revisit the issue and hopefully get rid of this workaround. Sure, done! > Apart from that the patch LGTM, thanks! Yay! Pushed series to master as 4b9eecd322e566783369795ebea63a479b51f486. Let the offloadings commence! Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Sun Aug 10 16:50:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 09 Aug 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator