unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 30644@debbugs.gnu.org
Subject: bug#30644: Cuirass runs out of build users
Date: Sun, 25 Mar 2018 14:40:20 +0200	[thread overview]
Message-ID: <87tvt4ib0r.fsf@gnu.org> (raw)
In-Reply-To: <20180324141547.109dc91a@scratchpost.org> (Danny Milosavljevic's message of "Sat, 24 Mar 2018 14:15:47 +0100")

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> I've checked it some more.  The shared cache uses unlock_notify, and the actual
> database uses sqlite3_busy_handler (sqlite3_busy_timeout) when BUSY is returned.
>
> The 5 in
>
> ice-9/eval.scm:619:8: Throw to key `sqlite-error' with args `(#f 5 "database is locked")'.  
>                                                                  ^^
>
> means SQLITE_BUSY, so that's the actual database.
>
> So the easiest way to work around it would be to call
>
>   sqlite3_busy_timeout(db, 10); // ms
>
> which would automatically repeatedly retry on busy until 10 ms have accumulated,
> and only then give up.

Indeed, that’s actually what nix/libstore does.

> There's also sqlite3_busy_handler which can be used to install a busy handler,
> and of course in the future we could also handle SQLITE_BUSY ourselves and yield.
>
> See also https://notabug.org/civodul/guile-sqlite3/pulls/4 for the former.

Awesome.

I’ve merged these guile-sqlite3 bits and added a “PRAGMA busy_timeout”
in Cuirass (the pragma allows us to set the timeout even when using an
older guile-sqlite3.)  I’ve updated the ‘cuirass’ package and will test
soonish on berlin.

Thank you!

Ludo’.

  reply	other threads:[~2018-03-25 12:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  9:07 bug#30644: Cuirass runs out of build users Andreas Enge
2018-03-01 14:01 ` Ludovic Courtès
2018-03-01 20:35   ` Andreas Enge
2018-03-02 14:08 ` Efraim Flashner
2018-03-05  9:02   ` Andreas Enge
2018-03-05 15:53     ` Andreas Enge
2018-03-05 19:55       ` Andreas Enge
2018-03-07 22:35       ` Ludovic Courtès
2018-03-07 23:01         ` Danny Milosavljevic
2018-03-08  0:25           ` Danny Milosavljevic
2018-03-08  0:29             ` Danny Milosavljevic
2018-03-08 12:01               ` Ludovic Courtès
2018-03-11  6:06                 ` Danny Milosavljevic
2018-03-11 21:43                   ` Ludovic Courtès
2018-03-24 13:15                     ` Danny Milosavljevic
2018-03-25 12:40                       ` Ludovic Courtès [this message]
2021-03-25 13:17                     ` Mathieu Othacehe

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=87tvt4ib0r.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30644@debbugs.gnu.org \
    --cc=dannym@scratchpost.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).