This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: untarring symlinks with ../ fails randomly


On Thu, 2011-06-30 at 11:05 -0400, Ken Brown wrote:
> On 6/30/2011 9:37 AM, Corinna Vinschen wrote:
> > On Jun 30 14:43, Wolf Geldmacher wrote:
> >> Dear all,
> >>
> >> just joining after being hit by an obviously known issue:
> >>
> >> Running tar (in my case to extract openssl-0.9.8r.tar.gz) results in
> >> symbolic links being randomly substituted by zero length mode 0 files as
> >> described in http://sourceware.org/ml/cygwin/2011-04/msg00299.html.
> >>
> >> For me this happens on both Windows 7 and Windows Server 2008.
> >>
> >> The interesting (new?) tidbit:
> >>
> >> In sheer desparation I downgraded from cygwin1.dll/1.7.9.1 to
> >> cygwin1.ddl/1.7.8.1 via setup.exe and the issue seems to be gone.
> >>
> >> As this is the only change I made: Is it possible that the problem is
> >> not an issue with tar (as discussed on the mailing list) but in fact a
> >> regression in cygwin1.dll?
> >
> > I never saw this happen.  Therefore, somebody actually seeing this
> > problem has to debug it.  The least I need is an strace.
> 
> I'm not sure it needs further debugging.  The patch to tar given in
> 
>    http://cygwin.com/ml/cygwin/2011-04/msg00385.html
> 
> solves the problem.  Eric said (in the next message) that he will apply 
> this to the next release of tar.  In the meantime, it's easy to download 
> the tar source, apply the patch, and rebuild.
I'm afraid this might only solve a symptom and not fix the root cause.

Anyways, pls find attached two (rather big and therefore gzip'd) script
files with:
	- cygcheck -srv output,
	- strace of the tar command (succeeding for 1.7.8, failing
	  for 1.7-9),
	- ls -lR of the resulting directory hierarchy
of a tar archive that has a src directory with 100 files and a tgt
directory with symlinks to the files in ../src. The archive was
created via:

 mkdir symlinks symlinks/src symlinks/tgt
 cd symlinks/src
 let i=0
 while [ $i -lt 100 ]; do
    j=`printf '%03d' $i`; echo $j > $j; let i=$((i+1))
 done
 cd ../tgt
 ln -s ../src/* .
 cd ../..
 tar czvf symlinks.tar.gz symlinks

Regards,
Wolf

Attachment: typescript-1.7.8.1.gz
Description: GNU Zip compressed data

Attachment: typescript-1.7.9.1.gz
Description: GNU Zip compressed data

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]