Skip to content

dtar produces corrupted archive with symlinks and --preserve-{xattrs,acl,flags} #628

Open
@rezib

Description

@rezib

For example:

$ ls -lh test/
total 4.0K
-rw-rw-r-- 1 remi remi 4 Mar  6 14:07 file1
lrwxrwxrwx 1 remi remi 5 Mar  6 14:07 symlink1 -> file1
$ mpirun --mca mpi_abort_print_stack 1 -N 4 /home/remi/Documents/git/cea/env/bin/dtar --preserve-xattrs -cf archive.tar test
[2025-03-06T14:09:23] Walking /path/to/test
[2025-03-06T14:09:23] Walked 3 items in 0.003 secs (935.879 items/sec) ...
[2025-03-06T14:09:23] Walked 3 items in 0.003 seconds (888.621 items/sec)
[2025-03-06T14:09:23] Writing archive to archive.tar
[2025-03-06T14:09:23] Items: 3
[2025-03-06T14:09:23]   Directories: 1
[2025-03-06T14:09:23]   Files: 1
[2025-03-06T14:09:23]   Links: 1
[2025-03-06T14:09:23] Data: 4.000 B (4.000 B per file)
[2025-03-06T14:09:23] Sorted 3 items in 0.000 seconds (9201.325 items/sec)
[2025-03-06T14:09:23] Truncating archive
[2025-03-06T14:09:23] Gathering index
[2025-03-06T14:09:23] Writing index as last entry in archive.tar
[2025-03-06T14:09:23] Writing entry headers
[2025-03-06T14:09:23] Copying file data
[2025-03-06T14:09:23] Started:   Mar-06-2025, 14:09:23
[2025-03-06T14:09:23] Completed: Mar-06-2025, 14:09:23
[2025-03-06T14:09:23] Seconds: 0.003
[2025-03-06T14:09:23] Archive size: 8.500 KiB
[2025-03-06T14:09:23] Rate: 3.040 MiB/s (8704 bytes in 0.003 seconds)

The generated archive is corrupted:

$ tar -tf archive.tar 
test/
test/file1
test/symlink1
tar: Skipping to next header
archive.tar.dtaridx
tar: Exiting with failure status due to previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions