FS#77999 - [coreutils] cp and install --reflink=auto failure

Attached to Project: Arch Linux
Opened by Matt (rabidpug) - Sunday, 26 March 2023, 12:25 GMT
Last edited by Sébastien Luttringer (seblu) - Thursday, 06 April 2023, 18:31 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
Both cp and install commands fail to properly copy files in version 9.2, even as root copying a file root creates in ~
Issue does not occur after downgrading to 9.1.
cp creates an empty file and exits

Additional info:
* package version(s) - 9.2
* config and/or log files etc. - "cp: failed to clone 'dest-file' from 'src-file': Operation not permitted"
* link to upstream bug report, if any

Steps to reproduce:
>echo 'test' > src-file
>cp src-file dest-file
cp: failed to clone 'dest-file' from 'src-file': Operation not permitted
>cat dest-file
>
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Thursday, 06 April 2023, 18:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  coreutils 9.2-3.
Comment by Matt (rabidpug) - Sunday, 26 March 2023, 12:33 GMT
Issue occurs for me in both 9.2-1 and 9.2-2 but not 9.1-3
Comment by loqs (loqs) - Sunday, 26 March 2023, 15:44 GMT
Is the result the same if you add the option --reflink=none ? This is testing for [1].

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62404
Comment by Matt (rabidpug) - Sunday, 26 March 2023, 19:52 GMT
Looks like that's the issue I'm encountering! --reflink=never copies successfully.
Thanks for the quick response
Comment by Ioannis Kozanitis (giannis-arch) - Monday, 27 March 2023, 17:04 GMT Comment by Oleg (moonman) - Wednesday, 29 March 2023, 23:16 GMT
AFAIK this only happens in restricted environments. I just hit this bug in an LXC container. Seems to be working find outside of LXC though.
Comment by Martin (MartinX3) - Friday, 31 March 2023, 10:33 GMT
Yeah, I think I'm suffering from this bug compiling AOSP in a podman container.
It happens randomly, but if it happens it will stop the build always at the end of the aosp compilation with a `cannot allocate memory` error.
Probably because of the not working cp and the try to do something with the copied file and the end of the build process.

(Definitely not a ram problem, because I tried with 1 thread and 24GB ram and according to my stats I had many gb's of free ram when it happens)
Comment by Evangelos Foutras (foutrelis) - Monday, 03 April 2023, 18:04 GMT
Upstream patch included in coreutils 9.2-3.

Loading...