strange build error today: "Renaming: Invalid argument"

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

strange build error today: "Renaming: Invalid argument"

Ted Zlatanov
I did `make bootstrap` to no avail. FWIW I'm using an encrypted
partition on Ubuntu 17.04 as my home directory, in case it
matters--maybe this only happens in that setup.

git bisect says the issue is with this commit, which relates to the
error message.

commit 1f9f514e7c2ba41b0954d0141f99652f6a53a107
Author: Paul Eggert <[hidden email]>
Date:   Wed Aug 2 01:53:46 2017 -0700

    When renaming a file, ask only if EEXIST or ENOSYS

Thanks!
Ted

% git status
(clean tree)
% make distclean; ./autogen.sh all; ./configure --with-modules ; make -j10
...
  GEN      net/tramp-loaddefs.el
Source file ‘/home/tzz/source/emacs/emacs/lisp/emacs-lisp/map.el’ newer than byte-compiled file
Source file ‘/home/tzz/source/emacs/emacs/lisp/emacs-lisp/cl-lib.el’ newer than byte-compiled file
Source file ‘/home/tzz/source/emacs/emacs/lisp/emacs-lisp/gv.el’ newer than byte-compiled file
Renaming: Invalid argument, /home/tzz/source/emacs/emacs/lisp/net/tramp-loaddefs.el198334G4, /home/tzz/source/emacs/emacs/lisp/net/tramp-loaddefs.el
Makefile:424: recipe for target 'net/tramp-loaddefs.el' failed
make[2]: *** [net/tramp-loaddefs.el] Error 255

% git status

Untracked files:
        admin/unidata/unidata-gen.elc198064G4
        admin/unidata/uvs.elc198044G4
        lisp/net/tramp-loaddefs.el198114G4
        lisp/net/tramp-loaddefs.el198334G4


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: strange build error today: "Renaming: Invalid argument"

Paul Eggert
On 08/03/2017 01:41 PM, Ted Zlatanov wrote:
> Renaming: Invalid argument, /home/tzz/source/emacs/emacs/lisp/net/tramp-loaddefs.el198334G4, /home/tzz/source/emacs/emacs/lisp/net/tramp-loaddefs.el

What is the output of 'uname -a' on your host? And what kind of file
system are you using?

Also, can you see which system calls were invoked and why the rename
failed? Please try this:

strace -f -o /tmp/trace make

and look near calls to 'renameat2' in /tmp/trace, especially syscalls
that fail with errno == EINVAL. On my platform (Fedora 26 x86-64, with
Linux kernel 4.11.11, ext4 file system), the relevant trace output looks
like the following:

14983 faccessat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el14983K04",
F_OK) = -1 ENOENT (No such file or directory)
14983 uname({sysname="Linux", nodename="Penguin.CS.UCLA.EDU", ...}) = 0
14983 getpid()                          = 14983
14983 symlink("[hidden email].14983:1501671282",
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el14983K04")
= 0
14983
open("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el14983K04",
O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 5
14983 write(5, ";;; tramp-loaddefs.el --- automa"..., 56329) = 56329
14983 close(5)                          = 0
14983 readlinkat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el14983K04",
"[hidden email].14983"..., 8193) = 43
14983 uname({sysname="Linux", nodename="Penguin.CS.UCLA.EDU", ...}) = 0
14983 getpid()                          = 14983
14983
unlink("/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el14983K04")
= 0
14983 newfstatat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
0x7fff0a7bb1a0, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
0x7fff0a7bb4a0) = -1 ENOENT (No such file or directory)
14983 renameat2(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el14983K04",
AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
RENAME_NOREPLACE) = 0
14983 readlinkat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el",
"[hidden email].14983"..., 8193) = 43
14983 uname({sysname="Linux", nodename="Penguin.CS.UCLA.EDU", ...}) = 0
14983 getpid()                          = 14983
14983
unlink("/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el")
= 0
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
{st_mode=S_IFREG|0644, st_size=56329, ...}) = 0
14983 getpid()                          = 14983
14983 faccessat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el14983kCk",
F_OK) = -1 ENOENT (No such file or directory)
14983 uname({sysname="Linux", nodename="Penguin.CS.UCLA.EDU", ...}) = 0
14983 getpid()                          = 14983
14983 symlink("[hidden email].14983:1501671282",
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el14983kCk")
= 0
14983
open("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el14983kCk",
O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 5
14983 write(5, ";;; tramp-loaddefs.el --- automa"..., 56329) = 56329
14983 close(5)                          = 0
14983 readlinkat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el14983kCk",
"[hidden email].14983"..., 8193) = 43
14983 uname({sysname="Linux", nodename="Penguin.CS.UCLA.EDU", ...}) = 0
14983 getpid()                          = 14983
14983
unlink("/home/eggert/src/gnu/emacs/static-checking/lisp/net/.#tramp-loaddefs.el14983kCk")
= 0
14983 newfstatat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
{st_mode=S_IFREG|0644, st_size=56329, ...}, AT_SYMLINK_NOFOLLOW) = 0
14983 readlinkat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
0x7fff0a7ba9c0, 1024) = -1 EINVAL (Invalid argument)
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
{st_mode=S_IFREG|0644, st_size=56329, ...}) = 0
14983
getxattr("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
"system.posix_acl_access", 0x7fff0a7bad00, 132) = -1 ENODATA (No data
available)
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
{st_mode=S_IFREG|0644, st_size=56329, ...}) = 0
14983
lgetxattr("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
"security.selinux", "unconfined_u:object_r:home_root_"..., 255) = 37
14983 access("/var/run/setrans/.setrans-unix", F_OK) = -1 ENOENT (No
such file or directory)
14983 futex(0x7f3db77154b0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
14983 faccessat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/", W_OK) = 0
14983 newfstatat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
{st_mode=S_IFREG|0644, st_size=56329, ...}, AT_SYMLINK_NOFOLLOW) = 0
14983 geteuid()                         = 1000
14983 getegid()                         = 1000
14983 newfstatat(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/",
{st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_SYMLINK_NOFOLLOW) = 0
14983 geteuid()                         = 1000
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el~",
{st_mode=S_IFREG|0644, st_size=56329, ...}) = 0
14983 renameat2(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el~",
RENAME_NOREPLACE) = -1 EEXIST (File exists)
14983
rename("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el~")
= 0
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
0x7fff0a7bb2c0) = -1 ENOENT (No such file or directory)
14983 renameat2(AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el14983kCk",
AT_FDCWD,
"/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
RENAME_NOREPLACE) = 0
14983
stat("/home/eggert/src/gnu/emacs/static-checking/lisp/net/tramp-loaddefs.el",
{st_mode=S_IFREG|0644, st_size=56329, ...}) = 0


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: strange build error today: "Renaming: Invalid argument"

Paul Eggert
I managed to reproduce the bug on a RHEL 7 host with NFS, and installed the
attached patch to fix it. Please give it a try.

0001-Port-recent-rename-changes-to-RHEL-7-NFS.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: strange build error today: "Renaming: Invalid argument"

Ted Zlatanov
On Thu, 3 Aug 2017 16:21:29 -0700 Paul Eggert <[hidden email]> wrote:

PE> I managed to reproduce the bug on a RHEL 7 host with NFS, and installed the
PE> attached patch to fix it. Please give it a try.

Hi Paul,

I can confirm that the latest master fixes the renaming issue. I should
have opened a bug but wasn't sure it wasn't just me. Thanks for working
on this.

Ted


Loading...