GNU bug report logs -
#32393
coreutils-8.30 'mv' error for file on libfuse mounted shares
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32393 in the body.
You can then email your comments to 32393 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#32393
; Package
coreutils
.
(Wed, 08 Aug 2018 05:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
John Stanley <jpsinthemix <at> verizon.net>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Wed, 08 Aug 2018 05:29:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
With coreutils-8.30, I'm getting a strange error for the 'mv' command
when used to rename a file mounted as a 'fuse' share:
$ mv ~/mnt/sshfs/status-2018080{6,7}
mv: cannot move '/home/john/mnt/sshfs/status-20180806' to
'/home/john/mnt/sshfs/status-20180807': Numerical result out of range
$ mv ~/mnt/sshfs/qq ~/mnt/sshfs/qqq
mv: cannot move '/home/john/mnt/sshfs/qq' to '/home/john/mnt/sshfs/qqq':
Numerical result out of range
This does not occur for coreutils-8.29, and appears to be associated
with the SYS_renameat2 syscall added in version 8.30. It also does not
occur for 'local' file renaming.
The error "Numerical result out of range" looks like it may be coming
from the network stack via 'fuse.'
I realize that this error may be coming from a number of places other
than coreutils 'mv' (e.g., the kernel/fuse area, sshfs, or libfuse, but
I'm wondering if anyone intimately familiar with the SYS_renameat2
rework in coreutils-8.30 'mv' might have any ideas on how to pin this
one done.
*** My System Info:
x86_64-pc-linux-gnu (This is a freshly re-built source-based system)
linux-headers.4.17.13_x86_64_smp1, gcc.8.2.0, glibc.2.27,
binutils.2.31.1, coreutils.8.30
thanks much,
John
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#32393
; Package
coreutils
.
(Wed, 08 Aug 2018 06:25:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 32393 <at> debbugs.gnu.org (full text, mbox):
John Stanley wrote:
> I'm wondering if anyone intimately familiar with the SYS_renameat2 rework in
> coreutils-8.30 'mv' might have any ideas on how to pin this one done.
Sure, run this:
strace mv ~/mnt/sshfs/status-2018080{6,7}
and look at the strace output.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#32393
; Package
coreutils
.
(Wed, 08 Aug 2018 08:48:04 GMT)
Full text and
rfc822 format available.
Message #11 received at 32393 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Already did..should've included it. It's not particularly revealing to
me though (I've attached the trace). The syscall goes as:
renameat2(AT_FDCWD, "/home/john/mnt/sshfs/status-20180806", AT_FDCWD,
"/home/john/mnt/sshfs/status-20180807", RENAME_NOREPLACE) = -1 ERANGE
(Numerical result out of range)
Also, I've run some a quick 'n dirty code to simply do the rename
syscall which gives the same result.
But, if in this code I simply invoke glibc's renameat() (which is
renameat2() less the "flags" arg), I do not get any errors. So perhaps
the issue is related to the RENAME_NOREPLACE flag. In fact, with my test
code, if I do the syscall renameat2 with flags = 0, then also no error.
Note that in my test cases the source and destinations are regular files
and the destination does not exist. If the destination does exist, then
I get a different error:
mv ~/mnt/sshfs/status-20180806 ~/mnt/sshfs/status-20180807
error: 17 File exists
which, of course, does not occur for "local" files.
Paul Eggert wrote:
> John Stanley wrote:
>> I'm wondering if anyone intimately familiar with the SYS_renameat2
>> rework in coreutils-8.30 'mv' might have any ideas on how to pin this
>> one done.
>
> Sure, run this:
>
> strace mv ~/mnt/sshfs/status-2018080{6,7}
>
> and look at the strace output.
>
[mv.mtrace (text/plain, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#32393
; Package
coreutils
.
(Wed, 08 Aug 2018 09:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 32393 <at> debbugs.gnu.org (full text, mbox):
John Stanley wrote:
> perhaps the issue is related to the RENAME_NOREPLACE flag
My guess is that you have a fuse callback that's returning a positive value for
an error number. It's supposed to return negative values. See:
https://sourceforge.net/p/fuse/mailman/message/35616558/
If my guess is right, you need to fix your fuse callback. I suggest starting by
looking at this recent fix to sshfs:
https://github.com/libfuse/sshfs/commit/6480b66bd64a2d2f58db6fc0a3320f4464f4669e
The bottom line is that if you're playing with bleeding-edge and buggy
filesystems, that's the place to look for bugs.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#32393
; Package
coreutils
.
(Wed, 08 Aug 2018 16:36:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 32393 <at> debbugs.gnu.org (full text, mbox):
Can't thank you enough.. the return value addressed in the github link
is indeed the culprit.
Paul Eggert wrote:
> John Stanley wrote:
>> perhaps the issue is related to the RENAME_NOREPLACE flag
> My guess is that you have a fuse callback that's returning a positive
> value for an error number. It's supposed to return negative values. See:
>
> https://sourceforge.net/p/fuse/mailman/message/35616558/
>
> If my guess is right, you need to fix your fuse callback. I suggest
> starting by looking at this recent fix to sshfs:
>
> https://github.com/libfuse/sshfs/commit/6480b66bd64a2d2f58db6fc0a3320f4464f4669e
>
>
> The bottom line is that if you're playing with bleeding-edge and buggy
> filesystems, that's the place to look for bugs.
>
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Wed, 08 Aug 2018 21:19:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
John Stanley <jpsinthemix <at> verizon.net>
:
bug acknowledged by developer.
(Wed, 08 Aug 2018 21:19:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 32393-done <at> debbugs.gnu.org (full text, mbox):
John Stanley wrote:
> the return value addressed in the github link is indeed
> the culprit.
Thanks for checking; closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 06 Sep 2018 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.