[-- 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 --]
[-- 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 --]
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;
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
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
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