Problem [1.7] find ... | xargs ... in [1.7]: too fast for its own good?

Fergus fergus@bonhard.uklinux.net
Mon Oct 12 11:50:00 GMT 2009


Current Cygwin 1.7.0-62
Windows 7 v.6.1.7600
Attached: cygcheck output

Operations of the style
find ... | xargs ...
seem orders of magnitude faster in [1.7] than they have been in [1.5], 
which is just great.

However I have been experiencing flakey and inconsistent behaviours with 
bad consequences, which I have reduced to the following example.

$ find . -type f | xargs md5sum | grep d41d8c
d41d8cd98f00b204e9800998ecf8427e *./xdelta/xdelta-1.1.3-3-src.tar.bz2
d41d8cd98f00b204e9800998ecf8427e *./syslog-ng/syslog-ng-2.1.1-1.tar.bz2
.. (and so on, several files found all with the same md5sum indicating 
size 0)

$ find . -type f | xargs md5sum | grep d41d8c
d41d8cd98f00b204e9800998ecf8427e 
*./X.Org/libXft/libXft-2.1.13-10-src.tar.bz2
d41d8cd98f00b204e9800998ecf8427e 
*./X.Org/libXau/libXau-devel/libXau-devel-1.0.4-10.tar.bz2
.. (and so on)

$ find . -type f | xargs md5sum | grep d41d8c
d41d8cd98f00b204e9800998ecf8427e 
*./X.Org/libX11/libX11-xcb1/libX11-xcb1-1.2.1-1.tar.bz2
d41d8cd98f00b204e9800998ecf8427e *./which/which-2.20-2-src.tar.bz2
.. (and so on)

The directory I used (actually a local Cygwin release/ directory) 
contains a large number of files (6000+). None of the files are of size 
0 (md5sum d41d8cd98f00b204e9800998ecf8427e) but
(a) the find ... command suggests that some are; and
(b) the findings are variable when the command is repeated.

This does not happen in [1.5] or using the same find ... command syntax 
in Linux. I think it is related to the sheer size of the directory 
(somewhere from 2 to 10 errors in 6000+ file operations). Naively it 
seems that the files are being processed more rapidly than they can be 
reliably picked up (in some sense) ..

In a separate exercise not involving find or md5sum (or xargs) just cp I 
copied the entire Cygwin release/ subdirectory
cp -vr release /p
to a remote P: drive and then checked the reliability of the 
transaction: no fewer than 6 files of the 6000+ arrived empty (name and 
location correct, but size 0). Repeated using [1.5] and then again, 
using Linux, with no errors.

Fergus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.srv.bz2
Type: application/octet-stream
Size: 19167 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091012/509d2df9/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list