"guix gc" failing to complete

  • Done
  • quality assurance status badge
Details
4 participants
  • Danny Milosavljevic
  • Ethan O'Quin
  • pkill9
  • zimoun
Owner
unassigned
Submitted by
Ethan O'Quin
Severity
normal
E
E
Ethan O'Quin wrote on 24 Dec 2018 23:33
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
GA8iS1aNem02oYkFHr8_hBiLm8tRWKPIlQOgnexihwSTg-QQ_dnKrQkKEBhsi3iFL7cEn0mGXkLIjzXHSv5EKT8F4CNtLndnoMN4kS0q2es=@protonmail.com
Every time I run "guix gc" the process fails with:

"guix gc: error: build failed: executing SQLite statement: FOREIGN KEY constraint failed"

This occurs every time "guix gc" is run, although it progresses for a moment before it fails.

The issue was encountered on guix 0.16.0-7.6f1e0bb on GuixSD as of December 24, although I have encountered it repeatedly back to some time in October, possibly earlier.
Attachment: file
D
D
Danny Milosavljevic wrote on 25 Dec 2018 08:51
(name . Ethan O'Quin)(address . ethan.a.oquin@protonmail.com)(address . 33862@debbugs.gnu.org)
20181225085105.6c1c36b9@scratchpost.org
Hi,

On Mon, 24 Dec 2018 22:33:47 +0000
Ethan O'Quin <ethan.a.oquin@protonmail.com> wrote:

Toggle quote (8 lines)
> Every time I run "guix gc" the process fails with:
>
> "guix gc: error: build failed: executing SQLite statement: FOREIGN KEY constraint failed"
>
> This occurs every time "guix gc" is run, although it progresses for a moment before it fails.
>
> The issue was encountered on guix 0.16.0-7.6f1e0bb on GuixSD as of December 24, although I have encountered it repeatedly back to some time in October, possibly earlier.

Try

# guix gc --verify

If that doesn't work, then

$ cp /var/guix/db/db.sqlite /tmp/
$ sqlite3 /tmp/db.sqlite
sqlite> .tables
sqlite> .schema Refs

Do you see a foreign key here with "on delete restrict", Refs.reference ?

sqlite> .schema DerivationOutputs

No "on delete restrict" here?

sqlite> .schema FailedPaths

No "on delete restrict" here?

sqlite> .schema ValidPaths

No "on delete restrict" here?

Also, is there a hash value somewhere in the error messages?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlwh4WkACgkQ5xo1VCww
uqVFNQf+PsRFbw5rwfOB5dYH1/CeJQmWxhIaQD+xjfNenkOw1gBpeieaIKy2vdrp
6mxgJYzN8ry4iN23H2NwtzHYT3Phqi6i2TfDpJZ0A3yIkhkTwZjPEQzXIIyrDcYU
3R1zQIOfG2e+WhILR5uSZKsfS+fjkR83/XfUDNaKIkVXbLfq4t2inMc7XpnpTvQ8
EewR4sZbWtWZjgnPNmZ755rOilbCS/jHYyq0rWs06Qjh64tNm1w1vm68xyA+hI3j
hW76yK3HU27wepSGmfx13Q681RimASVJfyF7XxJgVCQgH6EDrKJ+HtgqKwhBiqJq
CqfGN8ge5BG6WsT2t73ysWzqatwvMg==
=VLTg
-----END PGP SIGNATURE-----


P
P
pkill9 wrote on 6 Apr 2019 12:44
(name . 33862)(address . 33862@debbugs.gnu.org)
E1hCinu-0007hg-9t@rmmprod05.runbox
I'm also getting this problem.

`guix gc --verify` doesn't fix it for me.

Here is the output for each of the commands you (Danny Milosavljevic) suggested:

$ cp /var/guix/db/db.sqlite /tmp/
$ sqlite3 /tmp/db.sqlite
sqlite> .tables
DerivationOutputs FailedPaths Refs ValidPaths

sqlite> .schema Refs
CREATE TABLE Refs (
referrer integer not null,
reference integer not null,
primary key (referrer, reference),
foreign key (referrer) references ValidPaths(id) on delete cascade,
foreign key (reference) references ValidPaths(id) on delete restrict
);
CREATE INDEX IndexReferrer on Refs(referrer);
CREATE INDEX IndexReference on Refs(reference);

sqlite> .schema DerivationOutputs
CREATE TABLE DerivationOutputs (
drv integer not null,
id text not null, -- symbolic output id, usually "out"
path text not null,
primary key (drv, id),
foreign key (drv) references ValidPaths(id) on delete cascade
);
CREATE INDEX IndexDerivationOutputs on DerivationOutputs(path);

sqlite> .schema FailedPaths
CREATE TABLE FailedPaths (
path text primary key not null,
time integer not null
);

sqlite> .schema ValidPaths
CREATE TABLE ValidPaths (
id integer primary key autoincrement not null,
path text unique not null,
hash text not null,
registrationTime integer not null,
deriver text,
narSize integer
);
CREATE TRIGGER DeleteSelfRefs before delete on ValidPaths
begin
delete from Refs where referrer = old.id and reference = old.id;
end;
Z
Z
zimoun wrote on 19 Dec 2020 01:09
(address . 33862@debbugs.gnu.org)
86o8iqslla.fsf@gmail.com
Hi,

What is the status of the bug#33862


?

On Mon, 24 Dec 2018 at 22:33, Ethan O'Quin <ethan.a.oquin@protonmail.com> wrote:
Toggle quote (12 lines)
> Every time I run "guix gc" the process fails with:
>
> "guix gc: error: build failed: executing SQLite statement: FOREIGN KEY
> constraint failed"
>
> This occurs every time "guix gc" is run, although it progresses for a
> moment before it fails.
>
> The issue was encountered on guix 0.16.0-7.6f1e0bb on GuixSD as of
> December 24, although I have encountered it repeatedly back to some
> time in October, possibly earlier.

Does the solution

Try

# guix gc --verify

If that doesn't work, then…

work for you? If not, please report what is wrong?

Since it is 2years old, I hope you fixed the issue in the meantime.


All the best,
simon
Z
Z
zimoun wrote on 11 Jan 2021 16:27
(name . Ethan O'Quin)(address . ethan.a.oquin@protonmail.com)
86czybsdcu.fsf@gmail.com
Hi,

On Sat, 19 Dec 2020 at 01:09, zimoun <zimon.toutoune@gmail.com> wrote:
Toggle quote (15 lines)
> On Mon, 24 Dec 2018 at 22:33, Ethan O'Quin <ethan.a.oquin@protonmail.com> wrote:

>
> Does the solution
>
> Try
>
> # guix gc --verify
>
> If that doesn't work, then…
>
> work for you? If not, please report what is wrong?
>
> Since it is 2years old, I hope you fixed the issue in the meantime.

If no moreinfo, I will close this old issue in the coming days.

All the best,
simon
Z
Z
zimoun wrote on 9 Feb 2021 18:59
(name . Ethan O'Quin)(address . ethan.a.oquin@protonmail.com)
86ft25azqi.fsf@gmail.com
Hi,

On Mon, 11 Jan 2021 at 16:27, zimoun <zimon.toutoune@gmail.com> wrote:
Toggle quote (18 lines)
> On Sat, 19 Dec 2020 at 01:09, zimoun <zimon.toutoune@gmail.com> wrote:
>> On Mon, 24 Dec 2018 at 22:33, Ethan O'Quin <ethan.a.oquin@protonmail.com> wrote:
>
>>
>> Does the solution
>>
>> Try
>>
>> # guix gc --verify
>>
>> If that doesn't work, then…
>>
>> work for you? If not, please report what is wrong?
>>
>> Since it is 2years old, I hope you fixed the issue in the meantime.
>
> If no moreinfo, I will close this old issue in the coming days.

No news after 2 years and waiting more than 4 weeks for moreinfo, I am
closing now.

If I am missing something, feel free to reopen.


All the best,
simon
Closed
?