GNU bug report logs - #28094
cuirass doesn’t build i686 things

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Tue, 15 Aug 2017 07:45:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28094 in the body.
You can then email your comments to 28094 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#28094; Package guix. (Tue, 15 Aug 2017 07:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 15 Aug 2017 07:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: bug-guix <at> gnu.org
Subject: cuirass doesn’t build i686 things
Date: Tue, 15 Aug 2017 09:43:47 +0200
Hi Guix,

it looks like Cuirass refuses to build i686 things because that would
violate a UNIQUE constraint:

--8<---------------cut here---------------start------------->8---
@ build-started /gnu/store/2qpglj9ylcb72c51m1qr8qfmdi20aa16-grub-2.02.drv - i686-linux /var/log/guix/drvs/2q//pglj9ylcb72c51m1qr8qfmdi20aa16-grub-2.02.drv.bz2
In ice-9/boot-9.scm:
   230:29 19 (map1 (((#:eval-id . 5) (#:duration . 102000.0) # # ?) ?))
   230:29 18 (map1 (((#:eval-id . 5) (#:duration . 69000.0) # # ?) ?))
   230:29 17 (map1 (((#:eval-id . 5) (#:duration . 86000.0) # # ?) ?))
   230:29 16 (map1 (((#:eval-id . 5) (#:duration . 81000.0) # # ?) ?))
   230:29 15 (map1 (((#:eval-id . 5) (#:duration . 82000.0) # # ?) ?))
   230:29 14 (map1 (((#:eval-id . 5) (#:duration . 68000.0) # # ?) ?))
   230:29 13 (map1 (((#:eval-id . 5) (#:duration . 74000.0) # # ?) ?))
   230:29 12 (map1 (((#:eval-id . 5) (#:duration . 77000.0) # # ?) ?))
   230:29 11 (map1 (((#:eval-id . 5) (#:duration . 98000.0) # # ?) ?))
   230:29 10 (map1 (((#:eval-id . 5) (#:duration . 103000.0) # # ?) ?))
   230:29  9 (map1 (((#:eval-id . 5) (#:duration . 75000.0) # # ?) ?))
   230:29  8 (map1 (((#:eval-id . 5) (#:duration . 74000.0) # # ?) ?))
   230:29  7 (map1 (((#:eval-id . 5) (#:duration . 75000.0) # # ?) ?))
   230:29  6 (map1 (((#:eval-id . 5) (#:duration . 64000.0) # # ?) ?))
   230:17  5 (map1 (((#:eval-id . 5) (#:duration . 147000.0) # # ?) ?))
In cuirass/base.scm:
    145:6  4 (register _)
In ice-9/boot-9.scm:
   268:13  3 (for-each #<procedure 4a51ae0 at cuirass/base.scm:145:?> ?)
In cuirass/database.scm:
    186:2  2 (db-add-build #<<sqlite-db> pointer: #<pointer 0x23455?> ?)
    54:28  1 (sqlite-exec _ _ . _)
In ice-9/eval.scm:
    619:8  0 (_ #(#(#(#(#<directory (sqlite3) 23c0a00> #<?>) #) #) #))
ice-9/eval.scm:619:8: ice-9/eval.scm:619:8: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE const
raint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
--8<---------------cut here---------------end--------------->8---

https://berlin.guixsd.org is configured to provide substitutes for
x86_64 and i686 yet it has barely built any i686 packages so far.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Information forwarded to bug-guix <at> gnu.org:
bug#28094; Package guix. (Wed, 16 Aug 2017 07:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 28094 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 28094 <at> debbugs.gnu.org
Subject: Re: bug#28094: cuirass doesn’t build i686 things
Date: Wed, 16 Aug 2017 09:32:49 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> it looks like Cuirass refuses to build i686 things because that would
> violate a UNIQUE constraint:

I’ve seen this repeatedly for other derivations; all seem to be i686.
The error reporting is bad, so I don’t know exactly why this happens,
but one guess is that this is when a previously failed build process
succeeded.

It’s bad that this seems to crash cuirass, so there are no more builds
once this happens.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Information forwarded to bug-guix <at> gnu.org:
bug#28094; Package guix. (Wed, 23 Aug 2017 16:59:01 GMT) Full text and rfc822 format available.

Message #11 received at 28094 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 28094 <at> debbugs.gnu.org
Subject: Re: bug#28094: cuirass doesn’t build i686 things
Date: Wed, 23 Aug 2017 18:58:05 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>> it looks like Cuirass refuses to build i686 things because that would
>> violate a UNIQUE constraint:
>
> I’ve seen this repeatedly for other derivations; all seem to be i686.
> The error reporting is bad, so I don’t know exactly why this happens,
> but one guess is that this is when a previously failed build process
> succeeded.

I’ve changed Cuirass locally to print a more detailed error message when
this happens.  Here’s a recent error:

--8<---------------cut here---------------start------------->8---
Database error with INSERT INTO Builds (derivation, evaluation, log, output)  VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 2 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc)
In ice-9/boot-9.scm:
   230:29 19 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …))
   230:29 18 (map1 (((#:eval-id . 2) (#:duration . 70000.0) # # …) …))
   230:29 17 (map1 (((#:eval-id . 2) (#:duration . 83000.0) # # …) …))
   230:29 16 (map1 (((#:eval-id . 2) (#:duration . 89000.0) # # …) …))
   230:29 15 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …))
   230:29 14 (map1 (((#:eval-id . 2) (#:duration . 131000.0) # # …) …))
   230:29 13 (map1 (((#:eval-id . 2) (#:duration . 128000.0) # # …) …))
   230:29 12 (map1 (((#:eval-id . 2) (#:duration . 100000.0) # # …) …))
   230:29 11 (map1 (((#:eval-id . 2) (#:duration . 193000.0) # # …) …))
   230:29 10 (map1 (((#:eval-id . 2) (#:duration . 113000.0) # # …) …))
   230:29  9 (map1 (((#:eval-id . 2) (#:duration . 122000.0) # # …) …))
   230:29  8 (map1 (((#:eval-id . 2) (#:duration . 91000.0) # # …) …))
   230:29  7 (map1 (((#:eval-id . 2) (#:duration . 101000.0) # # …) …))
   230:29  6 (map1 (((#:eval-id . 2) (#:duration . 87000.0) # # …) …))
   230:29  5 (map1 (((#:eval-id . 2) (#:duration . 67000.0) # # …) …))
   230:29  4 (map1 (((#:eval-id . 2) (#:duration . 75000.0) # # …) …))
   230:17  3 (map1 (((#:eval-id . 2) (#:duration . 71000.0) # # …) …))
In cuirass/base.scm:
    145:6  2 (register _)
In ice-9/boot-9.scm:
   268:13  1 (for-each #<procedure 3dc0750 at cuirass/base.scm:145:…> …)
In cuirass/database.scm:
    192:2  0 (db-add-build #<<sqlite-db> pointer: #<pointer 0x19d9e…> …)
cuirass/database.scm:192:2: In procedure db-add-build:
cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
--8<---------------cut here---------------end--------------->8---

The directory /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc exists.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Information forwarded to bug-guix <at> gnu.org:
bug#28094; Package guix. (Thu, 24 Aug 2017 07:22:02 GMT) Full text and rfc822 format available.

Message #14 received at 28094 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 28094 <at> debbugs.gnu.org
Subject: Re: bug#28094: cuirass doesn’t build i686 things
Date: Thu, 24 Aug 2017 09:21:36 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>> Ricardo Wurmus <rekado <at> elephly.net> writes:
>>
>>> it looks like Cuirass refuses to build i686 things because that would
>>> violate a UNIQUE constraint:
>>
>> I’ve seen this repeatedly for other derivations; all seem to be i686.
>> The error reporting is bad, so I don’t know exactly why this happens,
>> but one guess is that this is when a previously failed build process
>> succeeded.
>
> I’ve changed Cuirass locally to print a more detailed error message when
> this happens.  Here’s a recent error:
>
> --8<---------------cut here---------------start------------->8---
> Database error with INSERT INTO Builds (derivation, evaluation, log, output)  VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 2 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc)
> In ice-9/boot-9.scm:
>    230:29 19 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …))
>    230:29 18 (map1 (((#:eval-id . 2) (#:duration . 70000.0) # # …) …))
>    230:29 17 (map1 (((#:eval-id . 2) (#:duration . 83000.0) # # …) …))
>    230:29 16 (map1 (((#:eval-id . 2) (#:duration . 89000.0) # # …) …))
>    230:29 15 (map1 (((#:eval-id . 2) (#:duration . 81000.0) # # …) …))
>    230:29 14 (map1 (((#:eval-id . 2) (#:duration . 131000.0) # # …) …))
>    230:29 13 (map1 (((#:eval-id . 2) (#:duration . 128000.0) # # …) …))
>    230:29 12 (map1 (((#:eval-id . 2) (#:duration . 100000.0) # # …) …))
>    230:29 11 (map1 (((#:eval-id . 2) (#:duration . 193000.0) # # …) …))
>    230:29 10 (map1 (((#:eval-id . 2) (#:duration . 113000.0) # # …) …))
>    230:29  9 (map1 (((#:eval-id . 2) (#:duration . 122000.0) # # …) …))
>    230:29  8 (map1 (((#:eval-id . 2) (#:duration . 91000.0) # # …) …))
>    230:29  7 (map1 (((#:eval-id . 2) (#:duration . 101000.0) # # …) …))
>    230:29  6 (map1 (((#:eval-id . 2) (#:duration . 87000.0) # # …) …))
>    230:29  5 (map1 (((#:eval-id . 2) (#:duration . 67000.0) # # …) …))
>    230:29  4 (map1 (((#:eval-id . 2) (#:duration . 75000.0) # # …) …))
>    230:17  3 (map1 (((#:eval-id . 2) (#:duration . 71000.0) # # …) …))
> In cuirass/base.scm:
>     145:6  2 (register _)
> In ice-9/boot-9.scm:
>    268:13  1 (for-each #<procedure 3dc0750 at cuirass/base.scm:145:…> …)
> In cuirass/database.scm:
>     192:2  0 (db-add-build #<<sqlite-db> pointer: #<pointer 0x19d9e…> …)
> cuirass/database.scm:192:2: In procedure db-add-build:
> cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
> --8<---------------cut here---------------end--------------->8---
>
> The directory /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc exists.

After restarting Cuirass I got this error again:

--8<---------------cut here---------------start------------->8---
…
evaluate 'mips64el-linux-gnu.mpc-1.0.3.i686-linux': 104000.000 seconds
evaluate 'mips64el-linux-gnu.coreutils-8.27.i686-linux': -608068998.000 seconds
evaluate 'mips64el-linux-gnu.findutils-4.6.0.i686-linux': 141217000.000 seconds
evaluate 'mips64el-linux-gnu.diffutils-3.5.i686-linux': 119447000.000 seconds
evaluate 'mips64el-linux-gnu.patch-2.7.5.i686-linux': -853410998.000 seconds
/gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7
/gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1
/gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1
/gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0
/gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0
Database error with INSERT INTO Builds (derivation, evaluation, log, output)  VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 3 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc)
In ice-9/boot-9.scm:
   230:29 19 (map1 (((#:eval-id . 3) (#:duration . 76000.0) # # …) …))
   230:29 18 (map1 (((#:eval-id . 3) (#:duration . 110000.0) # # …) …))
   230:29 17 (map1 (((#:eval-id . 3) (#:duration . 115000.0) # # …) …))
   230:29 16 (map1 (((#:eval-id . 3) (#:duration . 82000.0) # # …) …))
   230:29 15 (map1 (((#:eval-id . 3) (#:duration . 98000.0) # # …) …))
   230:29 14 (map1 (((#:eval-id . 3) (#:duration . 97000.0) # # …) …))
   230:29 13 (map1 (((#:eval-id . 3) (#:duration . 90000.0) # # …) …))
   230:29 12 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # …) …))
   230:29 11 (map1 (((#:eval-id . 3) (#:duration . 86000.0) # # …) …))
   230:29 10 (map1 (((#:eval-id . 3) (#:duration . 87000.0) # # …) …))
   230:29  9 (map1 (((#:eval-id . 3) (#:duration . 93000.0) # # …) …))
   230:29  8 (map1 (((#:eval-id . 3) (#:duration . 173000.0) # # …) …))
   230:29  7 (map1 (((#:eval-id . 3) (#:duration . 88000.0) # # …) …))
   230:29  6 (map1 (((#:eval-id . 3) (#:duration . 118000.0) # # …) …))
   230:29  5 (map1 (((#:eval-id . 3) (#:duration . 94000.0) # # …) …))
   230:29  4 (map1 (((#:eval-id . 3) (#:duration . 85000.0) # # …) …))
   230:17  3 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # …) …))
In cuirass/base.scm:
    145:6  2 (register _)
In ice-9/boot-9.scm:
   268:13  1 (for-each #<procedure 8d1ae10 at cuirass/base.scm:145:…> …)
In cuirass/database.scm:
    192:2  0 (db-add-build #<<sqlite-db> pointer: #<pointer 0x24cde…> …)
cuirass/database.scm:192:2: In procedure db-add-build:
cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
--8<---------------cut here---------------end--------------->8---

Note that this is the same derivation and the same output as before.
Also note that I started with a fresh database before either of these
errors.  I did not remove the database after restarting Cuirass, though.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Information forwarded to bug-guix <at> gnu.org:
bug#28094; Package guix. (Fri, 25 Aug 2017 23:10:01 GMT) Full text and rfc822 format available.

Message #17 received at 28094 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 28094 <at> debbugs.gnu.org
Subject: Re: bug#28094: cuirass doesn’t build i686 things
Date: Sat, 26 Aug 2017 01:08:52 +0200
[Message part 1 (text/plain, inline)]
Heya!

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> After restarting Cuirass I got this error again:
>
> …
> evaluate 'mips64el-linux-gnu.mpc-1.0.3.i686-linux': 104000.000 seconds
> evaluate 'mips64el-linux-gnu.coreutils-8.27.i686-linux': -608068998.000 seconds
> evaluate 'mips64el-linux-gnu.findutils-4.6.0.i686-linux': 141217000.000 seconds
> evaluate 'mips64el-linux-gnu.diffutils-3.5.i686-linux': 119447000.000 seconds
> evaluate 'mips64el-linux-gnu.patch-2.7.5.i686-linux': -853410998.000 seconds
> /gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7
> /gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1
> /gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1
> /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0
> /gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0
> Database error with INSERT INTO Builds (derivation, evaluation, log, output)  VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 3 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc)
> In ice-9/boot-9.scm:
>    230:29 19 (map1 (((#:eval-id . 3) (#:duration . 76000.0) # # …) …))
>    230:29 18 (map1 (((#:eval-id . 3) (#:duration . 110000.0) # # …) …))
>    230:29 17 (map1 (((#:eval-id . 3) (#:duration . 115000.0) # # …) …))
>    230:29 16 (map1 (((#:eval-id . 3) (#:duration . 82000.0) # # …) …))
>    230:29 15 (map1 (((#:eval-id . 3) (#:duration . 98000.0) # # …) …))
>    230:29 14 (map1 (((#:eval-id . 3) (#:duration . 97000.0) # # …) …))
>    230:29 13 (map1 (((#:eval-id . 3) (#:duration . 90000.0) # # …) …))
>    230:29 12 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # …) …))
>    230:29 11 (map1 (((#:eval-id . 3) (#:duration . 86000.0) # # …) …))
>    230:29 10 (map1 (((#:eval-id . 3) (#:duration . 87000.0) # # …) …))
>    230:29  9 (map1 (((#:eval-id . 3) (#:duration . 93000.0) # # …) …))
>    230:29  8 (map1 (((#:eval-id . 3) (#:duration . 173000.0) # # …) …))
>    230:29  7 (map1 (((#:eval-id . 3) (#:duration . 88000.0) # # …) …))
>    230:29  6 (map1 (((#:eval-id . 3) (#:duration . 118000.0) # # …) …))
>    230:29  5 (map1 (((#:eval-id . 3) (#:duration . 94000.0) # # …) …))
>    230:29  4 (map1 (((#:eval-id . 3) (#:duration . 85000.0) # # …) …))
>    230:17  3 (map1 (((#:eval-id . 3) (#:duration . 75000.0) # # …) …))
> In cuirass/base.scm:
>     145:6  2 (register _)
> In ice-9/boot-9.scm:
>    268:13  1 (for-each #<procedure 8d1ae10 at cuirass/base.scm:145:…> …)
> In cuirass/database.scm:
>     192:2  0 (db-add-build #<<sqlite-db> pointer: #<pointer 0x24cde…> …)
> cuirass/database.scm:192:2: In procedure db-add-build:
> cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
>
> Note that this is the same derivation and the same output as before.
> Also note that I started with a fresh database before either of these
> errors.  I did not remove the database after restarting Cuirass, though.

This is the tail of the Builds table on that machine:

--8<---------------cut here---------------start------------->8---
/gnu/store/jcdfzvb3ca4n5jzh7ajc3yb47akg30c4-hplip-3.17.7.drv|4|#f|/gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7
/gnu/store/lndp48wl3jcqjysjdrxgh0nm5cghc38v-cups-filters-1.13.1.drv|4|#f|/gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1
/gnu/store/9zzp62b9l2b85dbdqiq17avbqw3h0xkz-cups-2.2.1.drv|4|#f|/gnu/store/a403mrmm7jd2vxygfjszrsycpa75w6cy-cups-2.2.1
/gnu/store/2isifzc6i42bxpb5rwm3wq2qvpyw158g-cups-minimal-2.2.1.drv|4|#f|/gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1
/gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc
/gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0
/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc
/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0
--8<---------------cut here---------------end--------------->8---

So the problem is that we’re trying to insert one of these again, which
fails because we already have it under this primary key.

This is because the curl-7.55.0 package ends up twice in the list of
jobs: once as a replacement for curl-7.53.0, and once because the
curl-7.55.0 is itself a public variable.

Commit 7d4d6c13f46f2a307883226789d6aa503e2d7081 in guix-maintenance.git
works around that.

The proper fix in Cuirass might be to ignore the primary key error (for
future reference, 1555 in the ‘sqlite-error’ exception above is
(logior 19 (ash 6 8)), which is SQLITE_CONSTRAINT_PRIMARYKEY in
<sqlite3.h>), as in the attached patch.  Thoughts?  I’ll push it if
there are no objections.

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 91133c2..9c7e69a 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -181,15 +181,30 @@ string."
             ((char=? char #\')  (loop (cons* char char chars)))
             (else (loop (cons char chars)))))))
 
+;; Extended error codes (see <sqlite3.h>).
+;; XXX: This should be defined by (sqlite3).
+(define SQLITE_CONSTRAINT 19)
+(define SQLITE_CONSTRAINT_PRIMARYKEY
+  (logior SQLITE_CONSTRAINT (ash 6 8)))
+
 (define (db-add-build db build)
-  "Store BUILD in database DB."
-  (sqlite-exec db "\
+  "Store BUILD in database DB.  This is idempotent."
+  (catch 'sqlite-error
+    (lambda ()
+      (sqlite-exec db "\
 INSERT INTO Builds (derivation, evaluation, log, output)\
   VALUES ('~A', '~A', '~A', '~A');"
-               (assq-ref build #:derivation)
-               (assq-ref build #:eval-id)
-               (assq-ref build #:log)
-               (assq-ref build #:output))
+                   (assq-ref build #:derivation)
+                   (assq-ref build #:eval-id)
+                   (assq-ref build #:log)
+                   (assq-ref build #:output)))
+    (lambda (key who code . rest)
+      ;; If we get a primary-key-constraint-violated error, that means we have
+      ;; already inserted the same (derivation,eval-id,log) tuple, which we
+      ;; can safely ignore.
+      (unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)
+        (apply throw key who code rest))))
+
   (last-insert-rowid db))
 
 (define (db-get-stamp db spec)

Information forwarded to bug-guix <at> gnu.org:
bug#28094; Package guix. (Sat, 26 Aug 2017 06:49:02 GMT) Full text and rfc822 format available.

Message #20 received at 28094 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 28094 <at> debbugs.gnu.org
Subject: Re: bug#28094: cuirass doesn’t build i686 things
Date: Sat, 26 Aug 2017 08:48:00 +0200
Hi Ludo,

[…]
>> /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc /gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0
>> /gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc /gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0
>> Database error with INSERT INTO Builds (derivation, evaluation, log, output)  VALUES ('~A', '~A', '~A', '~A'); and (/gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv 3 #f /gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc)
[…]
>> In cuirass/database.scm:
>>     192:2  0 (db-add-build #<<sqlite-db> pointer: #<pointer 0x24cde…> …)
>> cuirass/database.scm:192:2: In procedure db-add-build:
>> cuirass/database.scm:192:2: Throw to key `sqlite-error' with args `(#f 1555 "UNIQUE constraint failed: Builds.derivation, Builds.evaluation, Builds.output")'.
[…]
> This is the tail of the Builds table on that machine:
>
> --8<---------------cut here---------------start------------->8---
> /gnu/store/jcdfzvb3ca4n5jzh7ajc3yb47akg30c4-hplip-3.17.7.drv|4|#f|/gnu/store/1bil0xyhpim3cfyaifdpb2jsjdni2hif-hplip-3.17.7
> /gnu/store/lndp48wl3jcqjysjdrxgh0nm5cghc38v-cups-filters-1.13.1.drv|4|#f|/gnu/store/lvfymniwbz33an5a2hakf4b1c57lrdwr-cups-filters-1.13.1
> /gnu/store/9zzp62b9l2b85dbdqiq17avbqw3h0xkz-cups-2.2.1.drv|4|#f|/gnu/store/a403mrmm7jd2vxygfjszrsycpa75w6cy-cups-2.2.1
> /gnu/store/2isifzc6i42bxpb5rwm3wq2qvpyw158g-cups-minimal-2.2.1.drv|4|#f|/gnu/store/n7mf8hk262rnlhrjqmacnkp1yn518ks4-cups-minimal-2.2.1
> /gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store/53vb094sihb819hk124qvfjq8vz78252-curl-7.53.0-doc
> /gnu/store/5aysbn4y15hzjyj6ixw16rl223c8bv12-curl-7.53.0.drv|4|#f|/gnu/store/9ihxpf7al0znb19lx0bk6ymjp6nxhn9y-curl-7.53.0
> /gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store/60671wa0i1fljll26fx7lxfl27fb27si-curl-7.55.0-doc
> /gnu/store/zg0zpndricjwwbjv5087zw9hmdcd708y-curl-7.55.0.drv|4|#f|/gnu/store/nmfwf4fkvb4mfyi7m5sn1daklkjsz9mn-curl-7.55.0
> --8<---------------cut here---------------end--------------->8---
>
> So the problem is that we’re trying to insert one of these again, which
> fails because we already have it under this primary key.
>
> This is because the curl-7.55.0 package ends up twice in the list of
> jobs: once as a replacement for curl-7.53.0, and once because the
> curl-7.55.0 is itself a public variable.
>
> Commit 7d4d6c13f46f2a307883226789d6aa503e2d7081 in guix-maintenance.git
> works around that.

Thank you!

> The proper fix in Cuirass might be to ignore the primary key error (for
> future reference, 1555 in the ‘sqlite-error’ exception above is
> (logior 19 (ash 6 8)), which is SQLITE_CONSTRAINT_PRIMARYKEY in
> <sqlite3.h>), as in the attached patch.  Thoughts?  I’ll push it if
> there are no objections.

This looks good to me.

> diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
> index 91133c2..9c7e69a 100644
> --- a/src/cuirass/database.scm
> +++ b/src/cuirass/database.scm
> @@ -181,15 +181,30 @@ string."
>              ((char=? char #\')  (loop (cons* char char chars)))
>              (else (loop (cons char chars)))))))
>
> +;; Extended error codes (see <sqlite3.h>).
> +;; XXX: This should be defined by (sqlite3).
> +(define SQLITE_CONSTRAINT 19)
> +(define SQLITE_CONSTRAINT_PRIMARYKEY
> +  (logior SQLITE_CONSTRAINT (ash 6 8)))
> +
>  (define (db-add-build db build)
> -  "Store BUILD in database DB."
> -  (sqlite-exec db "\
> +  "Store BUILD in database DB.  This is idempotent."
> +  (catch 'sqlite-error
> +    (lambda ()
> +      (sqlite-exec db "\
>  INSERT INTO Builds (derivation, evaluation, log, output)\
>    VALUES ('~A', '~A', '~A', '~A');"
> -               (assq-ref build #:derivation)
> -               (assq-ref build #:eval-id)
> -               (assq-ref build #:log)
> -               (assq-ref build #:output))
> +                   (assq-ref build #:derivation)
> +                   (assq-ref build #:eval-id)
> +                   (assq-ref build #:log)
> +                   (assq-ref build #:output)))
> +    (lambda (key who code . rest)
> +      ;; If we get a primary-key-constraint-violated error, that means we have
> +      ;; already inserted the same (derivation,eval-id,log) tuple, which we
> +      ;; can safely ignore.
> +      (unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)
> +        (apply throw key who code rest))))
> +

Unfortunately, re-throwing the error doesn’t print any meaningful error
message.  To get the error message that I showed above I caught any
sqlite errors and re-threw the exception only after printing the
arguments to sqlite-exec:

    (format (current-error-port) "Database error with ~a and ~a~%" msg args)

I think it would be good to include a line like this right after
“(unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)”.

Thank you for debugging this!

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Sat, 26 Aug 2017 08:52:01 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Sat, 26 Aug 2017 08:52:02 GMT) Full text and rfc822 format available.

Message #25 received at 28094-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 28094-done <at> debbugs.gnu.org
Subject: Re: bug#28094: cuirass doesn’t build i686 things
Date: Sat, 26 Aug 2017 10:51:13 +0200
Hello!

Ricardo Wurmus <rekado <at> elephly.net> skribis:

>> diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
>> index 91133c2..9c7e69a 100644
>> --- a/src/cuirass/database.scm
>> +++ b/src/cuirass/database.scm
>> @@ -181,15 +181,30 @@ string."
>>              ((char=? char #\')  (loop (cons* char char chars)))
>>              (else (loop (cons char chars)))))))
>>
>> +;; Extended error codes (see <sqlite3.h>).
>> +;; XXX: This should be defined by (sqlite3).
>> +(define SQLITE_CONSTRAINT 19)
>> +(define SQLITE_CONSTRAINT_PRIMARYKEY
>> +  (logior SQLITE_CONSTRAINT (ash 6 8)))
>> +
>>  (define (db-add-build db build)
>> -  "Store BUILD in database DB."
>> -  (sqlite-exec db "\
>> +  "Store BUILD in database DB.  This is idempotent."
>> +  (catch 'sqlite-error
>> +    (lambda ()
>> +      (sqlite-exec db "\
>>  INSERT INTO Builds (derivation, evaluation, log, output)\
>>    VALUES ('~A', '~A', '~A', '~A');"
>> -               (assq-ref build #:derivation)
>> -               (assq-ref build #:eval-id)
>> -               (assq-ref build #:log)
>> -               (assq-ref build #:output))
>> +                   (assq-ref build #:derivation)
>> +                   (assq-ref build #:eval-id)
>> +                   (assq-ref build #:log)
>> +                   (assq-ref build #:output)))
>> +    (lambda (key who code . rest)
>> +      ;; If we get a primary-key-constraint-violated error, that means we have
>> +      ;; already inserted the same (derivation,eval-id,log) tuple, which we
>> +      ;; can safely ignore.
>> +      (unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)
>> +        (apply throw key who code rest))))
>> +
>
> Unfortunately, re-throwing the error doesn’t print any meaningful error
> message.  To get the error message that I showed above I caught any
> sqlite errors and re-threw the exception only after printing the
> arguments to sqlite-exec:
>
>     (format (current-error-port) "Database error with ~a and ~a~%" msg args)
>
> I think it would be good to include a line like this right after
> “(unless (= code SQLITE_CONSTRAINT_PRIMARYKEY)”.

Good idea.  Pushed with a test case as
72f2b6b77cc4e3d7629bdf34e6daee05398b8de1.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Sep 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 215 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.