Subject: Re: bug#39727: statx error running 'guix gc' on CentOS 7

From: Ludovic Courtès <[email-masked]>
Date: Sat, 22 Feb 2020 00:59:13 +0100

Hi,

Paul Garlick <[email-masked]> skribis:

> After a 'guix pull' today to commit
> 536cc4aae5b58b45b974530646a4916a29a8aa6c I noticed that 'guix gc' fails
> with the message:
>
> guix gc: error: statting `/gnu/store/.links/0pck...': Invalid argument

This was during the “removing unused link” phase, right?

> The system is running CentOS 7:
>
> $ cat /etc/centos-release
> CentOS Linux release 7.7.1908 (Core)

What does “uname -r” return?

This is most likely an issue with the ancient kernel being used.

It would be nice if you could try running a C program that does
something like this:

	struct statx st;
	if (statx(AT_FDCWD, "/",
		  AT_SYMLINK_NOFOLLOW | AT_STATX_DONT_SYNC,
		  STATX_SIZE | STATX_NLINK, &st) == -1)
          printf ("failed: %m\n");

It should fail similarly.  Then you can try commenting out
AT_STATX_DONT_SYNC and see whether it fails.

Let me know how it goes!

Thanks,
Ludo’.