GNU bug report logs - #33862
"guix gc" failing to complete

Previous Next

Package: guix;

Reported by: Ethan O'Quin <ethan.a.oquin <at> protonmail.com>

Date: Mon, 24 Dec 2018 22:41:02 UTC

Severity: normal

Done: zimoun <zimon.toutoune <at> gmail.com>

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 33862 in the body.
You can then email your comments to 33862 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#33862; Package guix. (Mon, 24 Dec 2018 22:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ethan O'Quin <ethan.a.oquin <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 24 Dec 2018 22:41:02 GMT) Full text and rfc822 format available.

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

From: Ethan O'Quin <ethan.a.oquin <at> protonmail.com>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: "guix gc" failing to complete
Date: Mon, 24 Dec 2018 22:33:47 +0000
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33862; Package guix. (Tue, 25 Dec 2018 07:52:01 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ethan O'Quin <ethan.a.oquin <at> protonmail.com>
Cc: 33862 <at> debbugs.gnu.org
Subject: Re: bug#33862: "guix gc" failing to complete
Date: Tue, 25 Dec 2018 08:51:05 +0100
[Message part 1 (text/plain, inline)]
Hi,

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

> 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?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33862; Package guix. (Sat, 06 Apr 2019 10:45:01 GMT) Full text and rfc822 format available.

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

From: <pkill9 <at> runbox.com>
To: "33862" <33862 <at> debbugs.gnu.org>
Subject: Re: bug#33862: "guix gc" failing to complete
Date: Sat, 06 Apr 2019 11:44:06 +0100 (BST)
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;



Information forwarded to bug-guix <at> gnu.org:
bug#33862; Package guix. (Sat, 19 Dec 2020 00:16:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ethan O'Quin <ethan.a.oquin <at> protonmail.com>, pkill9 <at> runbox.com, Danny
 Milosavljevic <dannym <at> scratchpost.org>
Cc: 33862 <at> debbugs.gnu.org
Subject: Re: bug#33862: "guix gc" failing to complete
Date: Sat, 19 Dec 2020 01:09:21 +0100
Hi,

What is the status of the bug#33862

<http://issues.guix.gnu.org/issue/33862>

?

On Mon, 24 Dec 2018 at 22:33, Ethan O'Quin <ethan.a.oquin <at> protonmail.com> wrote:
> 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




Information forwarded to bug-guix <at> gnu.org:
bug#33862; Package guix. (Mon, 11 Jan 2021 15:38:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ethan O'Quin <ethan.a.oquin <at> protonmail.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, pkill9 <at> runbox.com,
 33862 <at> debbugs.gnu.org
Subject: Re: bug#33862: "guix gc" failing to complete
Date: Mon, 11 Jan 2021 16:27:29 +0100
Hi,

On Sat, 19 Dec 2020 at 01:09, zimoun <zimon.toutoune <at> gmail.com> wrote:
> On Mon, 24 Dec 2018 at 22:33, Ethan O'Quin <ethan.a.oquin <at> 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




Reply sent to zimoun <zimon.toutoune <at> gmail.com>:
You have taken responsibility. (Tue, 09 Feb 2021 18:09:02 GMT) Full text and rfc822 format available.

Notification sent to Ethan O'Quin <ethan.a.oquin <at> protonmail.com>:
bug acknowledged by developer. (Tue, 09 Feb 2021 18:09:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ethan O'Quin <ethan.a.oquin <at> protonmail.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 33862-done <at> debbugs.gnu.org,
 pkill9 <at> runbox.com
Subject: Re: bug#33862: "guix gc" failing to complete
Date: Tue, 09 Feb 2021 18:59:49 +0100
Hi,

On Mon, 11 Jan 2021 at 16:27, zimoun <zimon.toutoune <at> gmail.com> wrote:
> On Sat, 19 Dec 2020 at 01:09, zimoun <zimon.toutoune <at> gmail.com> wrote:
>> On Mon, 24 Dec 2018 at 22:33, Ethan O'Quin <ethan.a.oquin <at> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Mar 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 46 days ago.

Previous Next


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