Hi, Using tar 1.34 compiled from source, on RHEL 7.8.
I sometimes get an extract error using "tar zxf p.tar.gz", with lines like the following: tar: XXXXXX_config/static: Cannot stat: No such file or directory tar: etc/x86_64-pc-linux_el8-gnu/jre/lib/amd64/server: Cannot stat: No such file or directory tar: etc/x86_64-pc-linux_el8-gnu/jre/lib/amd64: Cannot stat: No such file or directory tar: etc/x86_64-pc-linux_el8-gnu/jre/lib: Cannot stat: No such file or directory tar: etc/x86_64-pc-linux_el8-gnu/jre: Cannot stat: No such file or directory tar: etc/x86_64-pc-linux_el8-gnu: Cannot stat: No such file or directory tar: etc: Cannot stat: No such file or directory A lot of tar files are created and extracted without problem. And when a problem like the above occurs, our process tries it again and it usually succeeds (that is, I've never witnessed two successive failures). The directories that fail happen to have symlinks in them, but not all such directories generate errors. I've used strace within our processes to dump these tar extractions, in order to get a real pair of failure + success. The error seems to occur in some post-processing after all files have been extracted, to set file times. There is also this SIGCHLD in the failure.txt file that is not in success.txt. Since I've setup strace, I have 2 such very similar errors over 3 days, over tens of similar tar extracts. A sample from strace: # last file extracted mkdirat(AT_FDCWD, "util", 0750) = 0 openat(AT_FDCWD, "util/GNUEmacs", O_WRONLY|O_CREAT|O_EXCL|O_NOCTTY|O_NONBLOCK|O_CLOEXEC, 0640) = 4 write(4, "(defun c-special-indent ()\n \"Kl"..., 1024) = 1024 read(3, "-local 'font-lock-mode-hook)\n\n(a"..., 10240) = 10240 write(4, "-local 'font-lock-mode-hook)\n\n(a"..., 423) = 423 utimensat(4, NULL, [UTIME_OMIT, {tv_sec=978325200, tv_nsec=0} /* 2001-01-01T00:00:00-0500 */], 0) = 0 close(4) = 0 close(3) = 0 # suspicious SIGCHLD wait4(47737, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 47737 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=47737, si_uid=759245037, si_status=0, si_utime=674, si_stime=37} --- # some successful file time updates utimensat(AT_FDCWD, "util", [UTIME_OMIT, {tv_sec=978325200, tv_nsec=0} /* 2001-01-01T00:00:00-0500 */], AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", {st_mode=S_IFREG|000, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0 unlinkat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", 0) = 0 symlinkat("../../etc/x86_64-pc-linux_el6-gnu/jre", AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0") = 0 utimensat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", [UTIME_OMIT, {tv_sec=978325200, tv_nsec=0} /* 2001-01-01T00:00:00-0500 */], AT_SYMLINK_NOFOLLOW) = 0 newfstatat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", {st_mode=S_IFLNK|0777, st_size=37, ...}, AT_SYMLINK_NOFOLLOW) = 0 openat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 3 newfstatat(3, "", {st_mode=S_IFLNK|0777, st_size=37, ...}, AT_EMPTY_PATH) = 0 close(3) = 0 newfstatat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el8-gnu/jdk1.8.0", {st_mode=S_IFREG|000, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0 unlinkat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el8-gnu/jdk1.8.0", 0) = 0 linkat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", AT_FDCWD, "prebuilt/x86_64-pc-linux_el8-gnu/jdk1.8.0", 0) = 0 newfstatat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el7-gnu/jdk1.8.0", {st_mode=S_IFREG|000, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0 unlinkat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el7-gnu/jdk1.8.0", 0) = 0 linkat(AT_FDCWD, "prebuilt/x86_64-pc-linux_el6-gnu/jdk1.8.0", AT_FDCWD, "prebuilt/x86_64-pc-linux_el7-gnu/jdk1.8.0", 0) = 0 # first errors newfstatat(AT_FDCWD, "XXXXXX_config/static/users", 0x7ffc9b136f50, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "XXXXXX_config/static/unlockInLine.bm", 0x7ffc9b136f50, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory) newfstatat(AT_FDCWD, "XXXXXX_config/static/unlock.bm", 0x7ffc9b136f50, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory) The archives were created using options to guarantee reproducible results: tar --sort=name --mtime=2001-01-01T00:00 -I 'gzip -n' -c -f p.tar.gz file1 file2 file3 dir1 dir2 dir3 where file? and dir? all come from the same level of a given (sub)-directory, with an ordering that favors fast extraction of key files. I had the same problem with tar 1.32. I could recompile tar with local modifications, or try other things if suggested. Regards, -- Daniel Villeneuve