qgrep only returns one result for "media-libs/libsdl2". strace reveals that it is not closing each file each use so it quickly runs out of file descriptors. Here's the point in the strace output where that happens. openat(1021, "app-crypt/easy-rsa/easy-rsa-3.0.5.ebuild", O_RDONLY|O_CLOEXEC) = 1022 openat(4, "../..", O_RDONLY|O_CLOEXEC) = 1022 openat(1022, "app-crypt/keylookup/keylookup-2.2.ebuild", O_RDONLY|O_CLOEXEC) = 1023 openat(4, "../..", O_RDONLY|O_CLOEXEC) = 1023 openat(1023, "app-crypt/hashcat/hashcat-5.0.0.ebuild", O_RDONLY|O_CLOEXEC) = -1 EMFILE (Too many open files) openat(4, "../..", O_RDONLY|O_CLOEXEC) = -1 EMFILE (Too many open files) openat(AT_FDCWD, "app-crypt/ccrypt/ccrypt-1.11.ebuild", O_RDONLY) = -1 EMFILE (Too many open files) openat(4, "../..", O_RDONLY|O_CLOEXEC) = -1 EMFILE (Too many open files) openat(AT_FDCWD, "app-crypt/certbot-nginx/certbot-nginx-0.33.1.ebuild", O_RDONLY) = -1 EMFILE (Too many open files) openat(4, "../..", O_RDONLY|O_CLOEXEC) = -1 EMFILE (Too many open files)
oh yeah! it leaks, Linux is way more restrictive than Solaris, which is why I could grep an entire tree and not notice ... oops
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=a12c799e0df591ec90814328fd6f6e90bca772ae commit a12c799e0df591ec90814328fd6f6e90bca772ae Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-06-08 18:42:18 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-06-08 18:42:18 +0000 qgrep: plug filedescritor leak Bug: https://bugs.gentoo.org/687640 Signed-off-by: Fabian Groffen <grobian@gentoo.org> qgrep.c | 1 + 1 file changed, 1 insertion(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19f1ab79dd1d2b743fded7ef26648d61499acc62 commit 19f1ab79dd1d2b743fded7ef26648d61499acc62 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-06-11 07:51:29 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-06-11 07:51:29 +0000 app-portage/portage-utils: version bump for 0.80 RC Closes: https://bugs.gentoo.org/687640 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Package-Manager: Portage-2.3.66, Repoman-2.3.11 app-portage/portage-utils/Manifest | 2 +- ...ls-0.80_pre20190605.ebuild => portage-utils-0.80_pre20190610.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-)