bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tar is creating corrupt archives when soft links are present


From: Paul Eggert
Subject: Re: tar is creating corrupt archives when soft links are present
Date: Thu, 1 Dec 2022 11:24:36 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Thanks for reporting the problem. I'm not seeing the problem with GNU tar 1.34 as shipped with Ubuntu 22.10 x86-64. On this platform, the command:

  cd /
  tar -cf - bin/* | tar -tvf - >/tmp/tar.txt

outputs the attached file tar.txt, which looks OK, as it seems to match the output of the command 'cd /; ls -li bin/* >/tmp/ls-i.txt' which is attached. This is on an ext4 file system. (All the attachments are compressed with gzip.)

What would help to debug here is a smaller reproducer. Can you reproduce it with a smaller command like this?

   tar -cf - bin/awk bin/bash

In other words, make it as small as you can.

Also, even if you can't make it small, it'd be helpful to see the strace output so that we can see the information that tar is basing its decisions on. For example, I ran this command:

  strace -v --trace %%stat -o /tmp/tar-tr.txt tar -cf /dev/null bin/*

and got the attached file tar-tr.txt to see what the stat-like syscalls are yielding; can you do something similar?

Also, can you send the output of 'ls -il bin/*'? The inode numbers would be helpful for debugging, I expect.

Attachment: tar.txt.gz
Description: application/gzip

Attachment: ls-i.txt.gz
Description: application/gzip

Attachment: tar-tr.txt.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]