unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Scheck <singularsyntax@gmail.com>
To: Christopher Marusich <cmmarusich@gmail.com>
Cc: 41607@debbugs.gnu.org
Subject: bug#41607: Deleted store items are not actually deleted
Date: Fri, 5 Jun 2020 12:05:24 -0400	[thread overview]
Message-ID: <CAKjnHz2Tkc50KV3iBnnQx4KDC0XGMm8UCEK-nOTLU2M2bUvU0Q@mail.gmail.com> (raw)
In-Reply-To: <87pnad6eor.fsf@gmail.com>

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

Very cool - thanks Chris!

In the meantime, I've updated my build script to externalize the Guix
environment from the Docker container.
So far the daily builds are staying nice and small at ~197MB and one layer.
The images and updated script are
here if anybody is curious:

https://hub.docker.com/r/singularsyntax/guix/tags
https://gitlab.com/singularsyntax-docker-hub/guix/-/blob/master/.gitlab-ci.yml

GitLab allows you to cache files between job stages and even full pipeline
runs. I first tried to cache /var/guix
and /gnu/store and mount them inside a container in which to perform `guix
pull` etc. However, it seems
that handling hard links on externally mounted file systems from within a
container is problematic. I think
passing `--disable-deduplication` to guix-daemon might resolve it, but I
couldn't figure out where/how to
change the Shepherd configuration to do that. So instead, I just copy the
directories into and out of the
container at start and end of the process. It seems to work. Mounting would
probably speed up the process
quite a bit if I could make it work.

Cheers,
-Steve

On Fri, Jun 5, 2020 at 5:32 AM Christopher Marusich <cmmarusich@gmail.com>
wrote:

> Chris Marusich <cmmarusich@gmail.com> writes:
>
> > Ludovic Courtès <ludo@gnu.org> writes:
> >
> >>> Should Guix do anything about this?  We could change guix-daemon to
> take
> >>> correct action in the face of an XDEV error.  We could also improve the
> >>> logging, since currently it silently swallows the XDEV error.
> >>
> >> I guess we could delete recursively right away upon EXDEV.  It should be
> >> just two lines of code, right?
> >
> > I'll try making the change and report back.  Yes, there are other cases
> > where we immediately delete without moving into the trash directory
> > (e.g., when the trash directory fails to be created), so it seems OK.
>
> Here is a patch.  Turns out it's was just a one line change!  If nobody
> has any further feedback on it, I'll go ahead and merge it to the master
> branch in the next couple days.
>
> I tested it in one of the Docker containers provided by Stephen which
> exhibited the problem.  I built the new Guix inside the Docker container
> and verified that a path which was previously unable to be GC'd due to
> the EXDEV error, was now able to be successfully GC'd.
>
> My understanding is that the only reason why the guix-daemon attempts to
> move dead directories to the trash directory is to save time on
> deleting, since large directories could take a while to fully delete.
> If there is any reason why it might be unsafe to delete the directories
> directly in case of EXDEV (I cannot think of any), please let me know.
>
> --
> Chris
>

[-- Attachment #2: Type: text/html, Size: 3642 bytes --]

  parent reply	other threads:[~2020-06-05 17:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKjnHz1X26QhPEWZfOmAbEmZHQA1qdU_Dq7U6kVXUqG7vCvuhw@mail.gmail.com>
     [not found] ` <20200528181043.GC23745@jasmine.lan>
     [not found]   ` <CAKjnHz0txxc+Bdc5=4TLLcxSmRpf2sCJswu-E36UJKvQqBA2kQ@mail.gmail.com>
     [not found]     ` <20200529170820.GA30828@jasmine.lan>
     [not found]       ` <CAKjnHz1b1EUXszQtUVz9p8zWu+h0HtPfCzrOmrXO+eyhH+AvVw@mail.gmail.com>
     [not found]         ` <20200529180245.GA3754@jasmine.lan>
     [not found]           ` <CAKjnHz0Ce=w0DZPi6xE6GNQ4-ezmvjUr+5FqxsvCBdx4SU+VsQ@mail.gmail.com>
2020-05-29 19:09             ` bug#41607: Deleted store items are not actually deleted Leo Famulari
2020-05-31  4:56               ` Chris Marusich
2020-05-31  9:27                 ` zimoun
2020-06-04 11:58                 ` Ludovic Courtès
2020-06-04 18:50                   ` Chris Marusich
2020-06-05  9:32                     ` Christopher Marusich
2020-06-05  9:36                       ` zimoun
2020-06-05 16:05                       ` Stephen Scheck [this message]
2020-06-05 16:21                       ` Ludovic Courtès
2020-06-07  1:31                         ` Chris Marusich
2020-06-07 10:07                           ` zimoun
2020-06-08  7:43                             ` Chris Marusich
     [not found] ` <CAJ3okZ0vPpPnDQavrpufPXmSZWk2h+oN2SR7CDVwaEhg-h4h6g@mail.gmail.com>
     [not found]   ` <CAKjnHz1kgwCOia5_hVYkuwaoOiJ55cATaF-Ed6_RsS-r5AELHw@mail.gmail.com>
     [not found]     ` <CAJ3okZ2MhALsxXvWGJccE8feERDf4SihtpF=68s-APQbqaUMRA@mail.gmail.com>
     [not found]       ` <CAKjnHz33fQrKa3KoQsDWh0pv-SgGZwPnn1Wgu6Kvf=SDGb2dWQ@mail.gmail.com>
     [not found]         ` <CAJ3okZ0C2_wECSG4jWq1+ZaO=vL5Zbvyo-2kStaK0cTyF3fXgA@mail.gmail.com>
     [not found]           ` <CAKjnHz35PVGM4BcJUML8=hLxXbJG-hcOg8PeZFjqCoTXe7EueQ@mail.gmail.com>
2020-05-29 23:36             ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKjnHz2Tkc50KV3iBnnQx4KDC0XGMm8UCEK-nOTLU2M2bUvU0Q@mail.gmail.com \
    --to=singularsyntax@gmail.com \
    --cc=41607@debbugs.gnu.org \
    --cc=cmmarusich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).