Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes: > > On Apr 24 17:14, Dima Pasechnik wrote: > > Dear all, > > reposting, as the message did not get through to the mailing list yesterday: > > > > The issue I have is exactly as described in > > http://sourceware.org/ml/cygwin/2011-04/msg00299.html > > I can reproduce this on a very similar Windows 7 host. > > (To be precise, it seems hard to predict when creating symlinks fails; > > I could say > > that perhaps 20% of them, on average, are not created correctly (i.e. > > I get files of size 0 instead)). > > A simple testcase in plain C to reproduce the issue would be fine. > Did you try to create the symlinks under strace? It should contain > some valuable hint from the function "symlink_worker". > > Corinna >
The problem seems to be with untar, not tar per se. Just today, I did `tar cp` a directory of a few hundred links under Cygwin. Under an unbuntu machine I recovered all files and links just fine. Under Cygwin, all files were 0 and permissions were "----------" instead of "lrwxrwxrwx" as in the original directory. (Yesterday, half the links were 0. After compiling tar-12.6 from gnu.org I still got 8 0's. I then moved that tar to tar-1.26 yesterday.) I include an excerpt of the log of `tar xfp` doing this with strace just for one file, index.html. 2510 1010065 [main] tar 7272 open: open (/home/ingber/www-ssl/index.html, 0xA01) 247 1010312 [main] tar 7272 normalize_posix_path: src /home/ingber/www- ssl/index.html 93 1010405 [main] tar 7272 normalize_posix_path: /home/ingber/www- ssl/index.html = normalize_posix_path (/home/ingber/www-ssl/index.html) 154 1010559 [main] tar 7272 mount_info::conv_to_win32_path: conv_to_win32_path (/home/ingber/www-ssl/index.html) 262 1010821 [main] tar 7272 set_flags: flags: binary (0x2) 152 1010973 [main] tar 7272 mount_info::conv_to_win32_path: src_path /home/ingber/www-ssl/index.html, dst C:\cygwin\home\ingber\www-ssl\index.html, flags 0x3000A, rc 0 255 1011228 [main] tar 7272 symlink_info::check: 0xC0000034 = NtCreateFile (\??\C:\cygwin\home\ingber\www-ssl\index.html) 197 1011425 [main] tar 7272 symlink_info::check: 0xC0000034 = NtQueryInformationFile (\??\C:\cygwin\home\ingber\www-ssl\index.html) 280 1011705 [main] tar 7272 symlink_info::check: 0xC0000034 = NtCreateFile (\??\C:\cygwin\home\ingber\www-ssl\index.html.exe) 205 1011910 [main] tar 7272 symlink_info::check: 0xC0000034 = NtQueryInformationFile (\??\C:\cygwin\home\ingber\www-ssl\index.html.exe) 260 1012170 [main] tar 7272 symlink_info::check: 0xC0000034 = NtCreateFile (\??\C:\cygwin\home\ingber\www-ssl\index.html.lnk) 162 1012332 [main] tar 7272 symlink_info::check: 0xC0000034 = NtQueryInformationFile (\??\C:\cygwin\home\ingber\www-ssl\index.html.lnk) 262 1012594 [main] tar 7272 symlink_info::check: 0xC0000034 = NtCreateFile (\??\C:\cygwin\home\ingber\www-ssl\index.html.exe.lnk) 199 1012793 [main] tar 7272 symlink_info::check: 0xC0000034 = NtQueryInformationFile (\??\C:\cygwin\home\ingber\www-ssl\index.html.exe.lnk) 188 1012981 [main] tar 7272 symlink_info::check: 0 = symlink.check (C:\cygwin\home\ingber\www-ssl\index.html, 0x28B590) (0x3000A) 241 1013222 [main] tar 7272 mount_info::conv_to_win32_path: conv_to_win32_path (/home/ingber/www-ssl) 122 1013344 [main] tar 7272 set_flags: flags: binary (0x2) 213 1013557 [main] tar 7272 mount_info::conv_to_win32_path: src_path /home/ingber/www-ssl, dst C:\cygwin\home\ingber\www-ssl, flags 0x3000A, rc 0 243 1013800 [main] tar 7272 symlink_info::check: 0x0 = NtCreateFile (\?? \C:\cygwin\home\ingber\www-ssl) 235 1014035 [main] tar 7272 symlink_info::check: not a symlink 233 1014268 [main] tar 7272 symlink_info::check: 0 = symlink.check (C:\cygwin\home\ingber\www-ssl, 0x28B590) (0x3000A) 110 1014378 [main] tar 7272 path_conv::check: this- >path(C:\cygwin\home\ingber\www-ssl\index.html), has_acls(1) 147 1014525 [main] tar 7272 build_fh_pc: fh 0x61244584 305 1014830 [main] tar 7272 fhandler_base::open: (\?? \C:\cygwin\home\ingber\www-ssl\index.html, 0x100A01) 1307 1016137 [main] tar 7272 alloc_sd: uid -1, gid -1, attribute 80000000 196 1016333 [main] tar 7272 cygsid::debug_print: alloc_sd: owner SID = S-1-5- 21-2524525894-1771701056-721517013-1000 (+) 215 1016548 [main] tar 7272 cygsid::debug_print: alloc_sd: group SID = S-1-5- 21-2524525894-1771701056-721517013-513 (+) 217 1016765 [main] tar 7272 alloc_sd: ACL-Size: 100 450 1017215 [main] tar 7272 alloc_sd: Created SD-Size: 176 416 1017631 [main] tar 7272 set_file_attribute: 0 = set_file_attribute (\?? \C:\cygwin\home\ingber\www-ssl\index.html, -1, -1, 0x80000000) 151 1017782 [main] tar 7272 fhandler_base::set_flags: flags 0x100A01, supplied_bin 0x10000 72 1017854 [main] tar 7272 fhandler_base::set_flags: filemode set to binary 115 1017969 [main] tar 7272 fhandler_base::open: 0 = NtCreateFile (0x198, 40160080, \??\C:\cygwin\home\ingber\www-ssl\index.html, io, NULL, 80, 7, 2, 4020, NULL, 0) 147 1018116 [main] tar 7272 fhandler_base::open: 1 = fhandler_base::open (\?? \C:\cygwin\home\ingber\www-ssl\index.html, 0x100A01) 403 1018519 [main] tar 7272 fhandler_base::open_fs: 1 = fhandler_disk_file::open (\??\C:\cygwin\home\ingber\www-ssl\index.html, 0xA01) 202 1018721 [main] tar 7272 open: 4 = open (/home/ingber/www-ssl/index.html, 0xA01) 425 1019146 [main] tar 7272 cygpsid::debug_print: get_sids_info: owner SID = S-1-5-21-2524525894-1771701056-721517013-1000 190 1019336 [main] tar 7272 cygpsid::debug_print: get_sids_info: group SID = S-1-5-21-2524525894-1771701056-721517013-513 204 1019540 [main] tar 7272 get_info_from_sd: ACL 0, uid 1000, gid 513 335 1019875 [main] tar 7272 fhandler_base::fstat_helper: 0 = fstat (\?? \C:\cygwin\home\ingber\www-ssl\index.html, 0x28CB28) st_atime=4DB58943 st_size=0, st_mode=0x8000, st_ino=11540474045393930, sizeof=96 179 1020054 [main] tar 7272 fstat64: 0 = fstat (4, 0x28CB28) 202 1020256 [main] tar 7272 close: close (4) 154 1020410 [main] tar 7272 fhandler_base::close: closing '/home/ingber/www- ssl/index.html' handle 0x198 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple