unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / Atom feed
* bug#33862: "guix gc" failing to complete
@ 2018-12-24 22:33 Ethan O'Quin
  2018-12-25  7:51 ` Danny Milosavljevic
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ethan O'Quin @ 2018-12-24 22:33 UTC (permalink / raw)
  To: 33862

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

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 #2: Type: text/html, Size: 508 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33862: "guix gc" failing to complete
  2018-12-24 22:33 bug#33862: "guix gc" failing to complete Ethan O'Quin
@ 2018-12-25  7:51 ` Danny Milosavljevic
  2019-04-06 10:44 ` pkill9
  2020-12-19  0:09 ` zimoun
  2 siblings, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2018-12-25  7:51 UTC (permalink / raw)
  To: Ethan O'Quin; +Cc: 33862

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

Hi,

On Mon, 24 Dec 2018 22:33:47 +0000
Ethan O'Quin <ethan.a.oquin@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?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33862: "guix gc" failing to complete
  2018-12-24 22:33 bug#33862: "guix gc" failing to complete Ethan O'Quin
  2018-12-25  7:51 ` Danny Milosavljevic
@ 2019-04-06 10:44 ` pkill9
  2020-12-19  0:09 ` zimoun
  2 siblings, 0 replies; 6+ messages in thread
From: pkill9 @ 2019-04-06 10:44 UTC (permalink / raw)
  To: 33862

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;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33862: "guix gc" failing to complete
  2018-12-24 22:33 bug#33862: "guix gc" failing to complete Ethan O'Quin
  2018-12-25  7:51 ` Danny Milosavljevic
  2019-04-06 10:44 ` pkill9
@ 2020-12-19  0:09 ` zimoun
  2021-01-11 15:27   ` zimoun
  2 siblings, 1 reply; 6+ messages in thread
From: zimoun @ 2020-12-19  0:09 UTC (permalink / raw)
  To: Ethan O'Quin, pkill9, Danny Milosavljevic; +Cc: 33862

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@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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33862: "guix gc" failing to complete
  2020-12-19  0:09 ` zimoun
@ 2021-01-11 15:27   ` zimoun
  2021-02-09 17:59     ` zimoun
  0 siblings, 1 reply; 6+ messages in thread
From: zimoun @ 2021-01-11 15:27 UTC (permalink / raw)
  To: Ethan O'Quin; +Cc: pkill9, 33862

Hi,

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.

All the best,
simon




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#33862: "guix gc" failing to complete
  2021-01-11 15:27   ` zimoun
@ 2021-02-09 17:59     ` zimoun
  0 siblings, 0 replies; 6+ messages in thread
From: zimoun @ 2021-02-09 17:59 UTC (permalink / raw)
  To: Ethan O'Quin; +Cc: 33862-done, pkill9

Hi,

On Mon, 11 Jan 2021 at 16:27, zimoun <zimon.toutoune@gmail.com> wrote:
> 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-09 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-24 22:33 bug#33862: "guix gc" failing to complete Ethan O'Quin
2018-12-25  7:51 ` Danny Milosavljevic
2019-04-06 10:44 ` pkill9
2020-12-19  0:09 ` zimoun
2021-01-11 15:27   ` zimoun
2021-02-09 17:59     ` zimoun

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.bugs
	nntp://news.gmane.io/gmane.comp.gnu.guix.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git