You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ls -lh test/total 4.0K-rw-rw-r-- 1 remi remi 4 Mar 6 14:07 file1lrwxrwxrwx 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/file1test/symlink1tar: Skipping to next headerarchive.tar.dtaridxtar: Exiting with failure status due to previous errors
The text was updated successfully, but these errors were encountered:
rezib
added a commit
to rezib/mpifileutils
that referenced
this issue
Mar 6, 2025
Fix creation of corrupted archive with symlink when
--preserve-{xattrs,acl,flags} command line option is used.
When it is provided a valid file descriptor, libarchive
archive_read_disk_entry_from_file() calls fstat() which follows
symlinks. This commit introduces an exception for symlinks to not
provide a file descriptor to archive_read_disk_entry_from_file() which
makes it call lstat() on entry path and create a valid symlink archive
entry eventually.
fixhpc#628
Signed-off-by: Rémi Palancher <remi@rackslab.io>
rezib
linked a pull request
Mar 6, 2025
that will
close
this issue
Fix creation of corrupted archive with symlink when
--preserve-{xattrs,acl,flags} command line option is used.
When it is provided a valid file descriptor, libarchive
archive_read_disk_entry_from_file() calls fstat() which follows
symlinks. This commit introduces an exception for symlinks to not
provide a file descriptor to archive_read_disk_entry_from_file() which
makes it call lstat() on entry path and create a valid symlink archive
entry eventually.
fixhpc#628
Signed-off-by: Rémi Palancher <remi@rackslab.io>
For example:
The generated archive is corrupted:
The text was updated successfully, but these errors were encountered: