Mail Archives: cygwin/2009/11/26/16:30:45
Dear list,
I've been using Cygwin daily for years and I'm very happy with it.
But today it threw a nice puzzle at me. I must confess I became
a list member just to report it.
My Cygwin /usr/bin/tar hangs when unpacking an archive:
curl ftp://ftp.debian.org/debian/pool/main/c/calcoo/calcoo_1.3.16.orig.tar.gz
| tar zxvf -
hangs after printing the line
calcoo-1.3.16/src/aux.c
This happens on two different i386 systems, both running an up to date Cygwin
on an up to date Windows XP with the latest security patches applied.
The file system is NTFS.
No such problem exists on Linux.
There must be something odd with this particular archive;
the ones preceding it on the FTP server have no such problem.
But tar should never hang in an infinite loop,
regardless of the input we throw at it.
The same thing happens when the tarball is saved to disk,
gunzipped, and then untarred without the z option.
It also happens with tar-1.20 (current is tar-1.21),
and with tar-1.20 compiled from source, both with and without
Cygwin patches applied. gdb reveals that the problem is in the loop in
src/extract.c
which looks like this (in tar-1.20):
763 do
764 fd = open_output_file (file_name, typeflag, mode ^ invert_permissions);
765 while (fd < 0 && maybe_recoverable (file_name, &interdir_made));
fd is set to -1, which causes maybe_recoverable() to be entered,
which attempts to unlink(file_name), which returns 0 even though
the file does *not* exist, which causes maybe_recoverable() to return 1
and the loop to repeat forever.
I don't know why this is happening, let alone how to repair it.
Does Cygwin have a bugtracker?
Help!
--
Reinier Post
TU Eindhoven
--
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
- Raw text -