Strange fstatat / stat behavour on directories causing tar "file changed as we read it" error

Larry Hall (Cygwin)
Sat Jan 8 05:19:00 GMT 2011

On 1/7/2011 9:00 PM, Steven Hartland wrote:
> ----- Original Message ----- From: "Eric Blake"
> On 01/07/2011 11:21 AM, Steven Hartland wrote:
>> What file system is this on? Someone else reported the same behavior
>> for "Samba share on QNX through Virtual PC." - if the problem is limited
>> to just a subset of (known-buggy) file systems, it would be nicer to
>> limit the workaround to just those file systems (and have st_size always
>> return 0 for directories from those systems).
> FS was just NTFS, at first we thought it might be being caused by compression
> being enabled on the files / directories but we confirmed the behavour
> on an machine with uncompressed volumes as well.
>>> Is there some "meta data" caching going on in cygwin or
>>> Windows which causes this very strange behaviour?
>> Giving us more details about your filesystem would help us answer that
>> question.
> Just NTFS I'm afraid nothing special.
> You can see the behaviour with ls -l as well, as you would expect.
> A simpler, which may help is:-
> ls -l
> drwxr-xr-x 1 test test 0 Oct 20 14:09 testdir
> find testdir > /dev/null # lots of files
> ls -l
> drwxr-xr-x 1 test test 8192 Oct 20 14:09 testdir
> uname -a
> CYGWIN_NT-6.0-WOW64 hern4 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin
Did you try with the current version of the cygwin package?  I tried your
test on W7 uses the 1.7.7 and had no problem.  It would be interesting
to know if what you're seeing is and old bug or possibly W2K8-specific.



A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list