Debian Bug report logs - #712792
find silently misses all folder contents when there is a gazillion of entries

version graph

Package: findutils; Maintainer for findutils is Andreas Metzler <ametzler@debian.org>; Source for findutils is src:findutils.

Reported by: Ángel González <keisial@gmail.com>

Date: Wed, 19 Jun 2013 14:21:01 UTC

Severity: normal

Tags: fixed-upstream

Found in version findutils/4.4.2-4

Fixed in version findutils/4.5.12-1

Done: Andreas Metzler <ametzler@debian.org>

Forwarded to http://savannah.gnu.org/bugs/index.php?39324

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Andreas Metzler <ametzler@debian.org>:
Bug#712792; Package findutils. (Wed, 19 Jun 2013 14:21:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ángel González <keisial@gmail.com>:
New Bug report received and forwarded. Copy sent to Andreas Metzler <ametzler@debian.org>. (Wed, 19 Jun 2013 14:21:06 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ángel González <keisial@gmail.com>
To: submit@bugs.debian.org
Subject: find silently misses all folder contents when there is a gazillion of entries
Date: Wed, 19 Jun 2013 16:21:11 +0200
Package: findutils
Version: 4.4.2-4

If a folder has enough entries relative to the available memory, find 
doesn't return any of them:

cd folder-with-too-many-entries
$ find
.
$ echo $?
0

$ ls -U | wc -l
1914188

$ ls
ls: memory exhausted

$ find --version
find (GNU findutils) 4.4.2
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Built using GNU gnulib version e5573b1bad88bfabcda181b9e0125fb0c52b7d3b
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS() 
CBO(level=0)


Other actions are equally oblivious to the contents:
$ find -exec echo '{}' \;
.


Tail of strace find:
...
brk(0x1ad9f000)                         = 0x1ad9f000
getdents(5, /* 846 entries */, 32768)   = 32752
brk(0x1adc0000)                         = 0x1adc0000
brk(0x1ade1000)                         = 0x1ade1000
getdents(5, /* 848 entries */, 32768)   = 32768
brk(0x1ae02000)                         = 0x1ae02000
brk(0x1ae23000)                         = 0x1ae23000
getdents(5, /* 851 entries */, 32768)   = 32760
brk(0x1ae44000)                         = 0x1ae23000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = -1 ENOMEM (Cannot allocate memory)
mmap(NULL, 134217728, PROT_NONE, 
MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x2b8208005000
munmap(0x2b8208005000, 67088384)        = 0
munmap(0x2b8210000000, 20480)           = 0
mprotect(0x2b820c000000, 135168, PROT_READ|PROT_WRITE) = -1 ENOMEM 
(Cannot allocate memory)
munmap(0x2b820c000000, 67108864)        = 0
mmap(NULL, 134217728, PROT_NONE, 
MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x2b8208005000
munmap(0x2b8208005000, 67088384)        = 0
munmap(0x2b8210000000, 20480)           = 0
mprotect(0x2b820c000000, 135168, PROT_READ|PROT_WRITE) = -1 ENOMEM 
(Cannot allocate memory)
munmap(0x2b820c000000, 67108864)        = 0
brk(0x15285000)                         = 0x15285000
brk(0x1527d000)                         = 0x1527d000
close(5)                                = 0
fchdir(4)                               = 0
close(4)                                = 0
close(1)                                = 0
munmap(0x2b82073d2000, 4096)            = 0
close(2)                                = 0
exit_group(0)                           = ?


Expected:
find should either run completely or fail with an error on stderr and 
non-zero exit code.




Set Bug forwarded-to-address to 'http://savannah.gnu.org/bugs/index.php?39324'. Request was from Andreas Metzler <ametzler@debian.org> to control@bugs.debian.org. (Sat, 22 Jun 2013 14:00:10 GMT) Full text and rfc822 format available.

Added tag(s) fixed-upstream. Request was from bts-link-upstream@lists.alioth.debian.org to control@bugs.debian.org. (Thu, 26 Sep 2013 19:18:46 GMT) Full text and rfc822 format available.

Reply sent to Andreas Metzler <ametzler@debian.org>:
You have taken responsibility. (Sat, 28 Sep 2013 07:06:17 GMT) Full text and rfc822 format available.

Notification sent to Ángel González <keisial@gmail.com>:
Bug acknowledged by developer. (Sat, 28 Sep 2013 07:06:17 GMT) Full text and rfc822 format available.

Message #14 received at 712792-close@bugs.debian.org (full text, mbox):

From: Andreas Metzler <ametzler@debian.org>
To: 712792-close@bugs.debian.org
Subject: Bug#712792: fixed in findutils 4.5.12-1
Date: Sat, 28 Sep 2013 07:03:31 +0000
Source: findutils
Source-Version: 4.5.12-1

We believe that the bug you reported is fixed in the latest version of
findutils, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 712792@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Metzler <ametzler@debian.org> (supplier of updated findutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.8
Date: Sat, 28 Sep 2013 08:46:13 +0200
Source: findutils
Binary: findutils locate
Architecture: source i386
Version: 4.5.12-1
Distribution: experimental
Urgency: low
Maintainer: Andreas Metzler <ametzler@debian.org>
Changed-By: Andreas Metzler <ametzler@debian.org>
Description: 
 findutils  - utilities for finding files--find, xargs
 locate     - maintain and query an index of a directory tree
Closes: 650795 689620 704879 712792
Changes: 
 findutils (4.5.12-1) experimental; urgency=low
 .
   * New upstream version.
   * Includes upstream bug fixes:
     + find -execdir leaks file descriptors for the working directory
       Closes: #650795
     + exits without error on OOM. Closes: #712792
   * find -perm +octalmode now exits with an error instead of failing
     silently. Closes: #704879 Add Breaks for versions of debconf and debhelper
     which used this feature. I will also try to come up with lintian test.
   * Drop 20_missing-variable-initialisati.patch completely, and also parts of
     10_bashism.diff.
   * Fix config.(sub|guess) update, the relevant files are in build-aux/.
     Closes: #689620
   * Point Vcs-* to anonscm.d.o.
Checksums-Sha1: 
 c032d9682afa1d808174cc5b88e0010504e530f7 1443 findutils_4.5.12-1.dsc
 c6c3d5b921fba12cf8eeabbcffab2fc9ecb893e2 3236073 findutils_4.5.12.orig.tar.gz
 29627cc561b0137f7f4bc10c2bc2b4ec1c99877e 23659 findutils_4.5.12-1.debian.tar.gz
 2f77ae4b66aaa8cc0851b77ed2fe7a2678ace6f2 557988 findutils_4.5.12-1_i386.deb
 7af10290ad453d4633c4e1d1b0df442427c7d6ef 188292 locate_4.5.12-1_i386.deb
Checksums-Sha256: 
 d532cdacd06669bf9593ae6f3b18b6fff7e2702ef3e01ff71be2245ff2e6128f 1443 findutils_4.5.12-1.dsc
 df859eebad68c216204363f163c0e4200208ce7348f3658564a120e32e4f63de 3236073 findutils_4.5.12.orig.tar.gz
 94834b695f24aedefb250f46800fa6e21ed36c9795d9467f7206881a4825aa95 23659 findutils_4.5.12-1.debian.tar.gz
 ff8ddab6c5ad0b10685289d9786aa151c92dd67c95118c9cc19926424911a298 557988 findutils_4.5.12-1_i386.deb
 ef1106273948f5c5cbd6e865e4926dec97828eb2eff659dc3a72aca9c6282eb7 188292 locate_4.5.12-1_i386.deb
Files: 
 e0808ee62d45e9ce81fcc0edb1f58344 1443 utils required findutils_4.5.12-1.dsc
 e5f8d618aab0641cbbb738c43bcbc104 3236073 utils required findutils_4.5.12.orig.tar.gz
 14118cb882b6a2b9550f5f8fe7e723d6 23659 utils required findutils_4.5.12-1.debian.tar.gz
 1b92e0624b82d96a473c16c28805dd2d 557988 utils required findutils_4.5.12-1_i386.deb
 ba881dea8fe1e366cd7b85f283e186f5 188292 utils optional locate_4.5.12-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEAREDAAYFAlJGfcUACgkQHTOcZYuNdmMo2wCggWpOEbp5vUTR06NR+t/x4YXg
n5kAoK0Zldsn9mEpQF6GMjySfM5GDevq
=SqTJ
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 07:12:48 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.