From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#35874: =?UTF-8?Q?=E2=80=9Cguix_?= =?UTF-8?Q?pull=E2=80=9D?= fails on setlocale Date: Thu, 23 May 2019 23:40:15 +0200 Message-ID: <87woigg88w.fsf@mdc-berlin.de> References: <87y32wga23.fsf@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTvSR-0001NG-Md for bug-guix@gnu.org; Thu, 23 May 2019 17:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTvSQ-0000VY-Nj for bug-guix@gnu.org; Thu, 23 May 2019 17:41:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTvSQ-0000VL-Jw for bug-guix@gnu.org; Thu, 23 May 2019 17:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTvSQ-0007VQ-Gl for bug-guix@gnu.org; Thu, 23 May 2019 17:41:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 35874@debbugs.gnu.org This is a store corruption bug. The problem appears to be that I accidentally ran the daemon with the wrong GUIX_DATABASE_DIRECTORY. The localstatedir is /gnu/var, not /var. In an attempt to simplify my complicated cluster setup, I wanted to switch from the git checkout to =E2=80=9Cguix pull=E2=80=9D. I was able to= use the Guix client from =E2=80=9Cguix pull=E2=80=9D, but not the daemon, because of the localstatedir difference. When I started the daemon from =E2=80=9Cguix pull=E2=80=9D without having s= et GUIX_DATABASE_DIRECTORY and I asked Guix to build something I noticed this error message: guix pull: error: cannot unlink `/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigdd= fmq4-glibc-2.28/lib/gconv': Directory not empty Wait, =E2=80=9Cunlink=E2=80=9D? Of course: when a build is not found in th= e database, but the store contains an item of the same name the daemon will remove the existing directory. In my case, the daemon did not realize that it couldn=E2=80=99t ever find anything interesting in the database, because it looked in the wrong localstate directory. So it partially removed store items and then aborted, leaving the store in a broken state. Can we make the daemon detect that its understanding of the site differs from that of the Guix client? -- Ricardo