unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 42151@debbugs.gnu.org
Subject: bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol
Date: Fri, 03 Jul 2020 12:03:26 +0200	[thread overview]
Message-ID: <873668zzip.fsf@gnu.org> (raw)
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")

Ludovic Courtès writes:

Hi!

> "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> 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/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
>> guix offload: 'childhurd' is running GNU Guile 3.0.4
>> guix offload: error: exception occurred on remote host 'localhost':
>> (%exception #<inferior-object #<&store-protocol-error message:
>> "setting synchronous mode: locking protocol" status: 1>>)

> Does it help if you set ‘settings.fsyncMetadata = false’ 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 below!)

> The “synchronous = normal” mode translates to ‘fsync’ calls, right?  If
> you rpctrace sqlite3, do you see ‘file_sync’ calls failing?

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¢!

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    
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 
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    
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/883yjkl46dxw9mzykykmbs0yzwyxm17z-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/y6b7bjqsazmm6jsyj5y80dqqajysw64p-export-test'
retrieving 1 store item from 'localhost'...
guix offload: successfully imported '/gnu/store/gxz6hzyc1cy3m1w9l7f2dk6rcspvymxf-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

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




  reply	other threads:[~2020-07-03 10:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01 14:29 bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Jan (janneke) Nieuwenhuizen
2020-07-01 14:31 ` bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix Jan (janneke) Nieuwenhuizen
2020-07-01 14:31   ` bug#42151: [PATCH 2/3] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd Jan (janneke) Nieuwenhuizen
2020-07-10 12:06     ` Ludovic Courtès
2020-07-10 18:34       ` Jan Nieuwenhuizen
2020-07-01 14:31   ` bug#42151: [PATCH 3/3] gnu: guix: " Jan (janneke) Nieuwenhuizen
2020-07-10 12:07     ` Ludovic Courtès
2020-07-10 16:25       ` Jan Nieuwenhuizen
2020-07-10 12:05   ` bug#42151: [PATCH 1/3] gnu: Add sqlite/hurd with locking fix Ludovic Courtès
2020-07-10 18:34     ` Jan Nieuwenhuizen
2020-07-01 17:01 ` bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Jan Nieuwenhuizen
2020-07-02 12:49 ` Ludovic Courtès
2020-07-03 10:03   ` Jan Nieuwenhuizen [this message]
2020-07-03 13:51     ` Ludovic Courtès
2020-07-03 15:27       ` Jan Nieuwenhuizen
2020-07-04  8:12         ` bug#42151: [PATCH 4/3] database: Do not use journal_model=WAL for the Hurd Jan Nieuwenhuizen
2020-07-07  5:04           ` Jan Nieuwenhuizen
2020-07-10 12:03           ` Ludovic Courtès
2020-07-10 15:40             ` Jan Nieuwenhuizen
2020-07-10 12:34         ` bug#42151: [PATCH 0/3] offload to Childhurd fails: setting synchronous mode: locking protocol Ludovic Courtès
2020-07-10 15:42 ` bug#42151: [PATCH v2 1/4] gnu: Add sqlite/hurd with locking fix Jan (janneke) Nieuwenhuizen
2020-07-10 15:42   ` bug#42151: [PATCH v2 2/4] gnu: guile-sqlite3: Use sqlite/hurd for locking on the Hurd Jan (janneke) Nieuwenhuizen
2020-07-10 15:42   ` bug#42151: [PATCH v2 3/4] gnu: guix: " Jan (janneke) Nieuwenhuizen
2020-07-10 15:42   ` bug#42151: [PATCH v2 4/4] image: Do not set journal_model=WAL for " Jan (janneke) Nieuwenhuizen
2020-07-10 18:35 ` bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix " Jan (janneke) Nieuwenhuizen
2020-07-10 18:35   ` bug#42151: [PATCH v3 2/2] image: Do not set journal_model=WAL " Jan (janneke) Nieuwenhuizen
2020-07-11 14:22     ` Ludovic Courtès
2020-07-11 14:36       ` Jan Nieuwenhuizen
2020-07-11 14:18   ` bug#42151: [PATCH v3 1/2] gnu: sqlite: Add locking-mode fix " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873668zzip.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=42151@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).