From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30644: Cuirass runs out of build users Date: Sun, 25 Mar 2018 14:40:20 +0200 Message-ID: <87tvt4ib0r.fsf@gnu.org> References: <20180228090714.GA1845@jurong> <20180302140833.GB3213@macbook41> <20180305090256.GA9171@jurong> <20180305155351.GA6054@jurong> <87efkvpl8f.fsf@gnu.org> <20180308000111.77cce7d6@scratchpost.org> <20180308012541.517dc4dc@scratchpost.org> <20180308012923.525342f6@scratchpost.org> <87efkuojya.fsf@gnu.org> <20180311070610.788df5b9@scratchpost.org> <87zi3ethij.fsf@gnu.org> <20180324141547.109dc91a@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f04xO-0006js-Ud for bug-guix@gnu.org; Sun, 25 Mar 2018 08:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f04xK-0002Zf-Ki for bug-guix@gnu.org; Sun, 25 Mar 2018 08:41:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44317) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f04xK-0002ZL-Hj for bug-guix@gnu.org; Sun, 25 Mar 2018 08:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f04xK-0004iQ-AO for bug-guix@gnu.org; Sun, 25 Mar 2018 08:41:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20180324141547.109dc91a@scratchpost.org> (Danny Milosavljevic's message of "Sat, 24 Mar 2018 14:15:47 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 30644@debbugs.gnu.org Hi Danny, Danny Milosavljevic 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 re= turned. > > The 5 in > > ice-9/eval.scm:619:8: Throw to key `sqlite-error' with args `(#f 5 "datab= ase is locked")'.=20=20 > ^^ > > 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 accum= ulated, > and only then give up. Indeed, that=E2=80=99s actually what nix/libstore does. > There's also sqlite3_busy_handler which can be used to install a busy han= dler, > and of course in the future we could also handle SQLITE_BUSY ourselves an= d yield. > > See also https://notabug.org/civodul/guile-sqlite3/pulls/4 for the former. Awesome. I=E2=80=99ve merged these guile-sqlite3 bits and added a =E2=80=9CPRAGMA bu= sy_timeout=E2=80=9D in Cuirass (the pragma allows us to set the timeout even when using an older guile-sqlite3.) I=E2=80=99ve updated the =E2=80=98cuirass=E2=80=99 p= ackage and will test soonish on berlin. Thank you! Ludo=E2=80=99.