Mail Archives: cygwin/2003/08/07/14:49:28
David Rothenberger writes:
> "Biederman, Steve" wrote:
> >
> > I want to allow the users I support to be able to run Cygwin tar on their Windows machines.
> > These machines have not had any Cygwin installed; they're just bare Windows machines.
> >
> > I provided them tar.exe and cygwin1.dll and assumed that with these, they could run
> > Cygwin tar sucessfully. It appears that that isn't the case: machines without Cygwin
> > installed see different behavior than machines which have it installed. (Running tar
> > on machines without Cygwin installed creates incorrect tar archives.)
>
[snip]
> Through experimentation, I discovered that the problem went away if I
> created an /etc mount.
I did a little debugging on this. It turns out that when tar
"hangs", the process is in an infinite loop in malloc_consolidate().
For some reason, one of the chunk's forward links points to itself.
I can "solve" this problem by adding (p != nextp) to the loop check
in malloc_consolidate(), but I doubt that's the right solution.
I'm just guessing, but I don't think a malloc chunk should be linked
to itself. Is this an indication that the app is trashing memory?
I tried recompiling tar after fiddling with configure so it would
think that malloc() was not working and use its own replacement, but
this didn't change the behavior.
I compared the strace output for both cases and the only difference
I found was 2 extra
etc::dir_changed: fn[1] \etc\passwd change_possible 1
...
pwdgrp::load: /etc/passwd
pwdgrp::load: strange path_conv problem
load: /etc/passwd load failed
etc::dir_changed: fn[2] \etc\group change_possible 1
...
pwdgrp::load: /etc/group
pwdgrp::load: strange path_conv problem
pwdgrp::load: /etc/group load failed
sequences in the failing case and one additional sequence just for
/etc/passwd.
I find it curious that
* The problem is related to the length of the paths of the
directories being added to the tar file.
* The problem goes away when /etc is a valid directory.
I'm out of ideas on what to try next. Anyone have a suggestion on
how I can continue debugging this?
Dave
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -