Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687640 - app-portage/portage-utils-0.80_pre20190605 - qgrep quickly runs out of file descriptors
Summary: app-portage/portage-utils-0.80_pre20190605 - qgrep quickly runs out of file d...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-08 12:59 UTC by James Le Cuirot
Modified: 2019-06-11 07:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2019-06-08 12:59:38 UTC
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)
Comment 1 Fabian Groffen gentoo-dev 2019-06-08 18:38:43 UTC
oh yeah! it leaks, Linux is way more restrictive than Solaris, which is why I could grep an entire tree and not notice ...  oops
Comment 2 Larry the Git Cow gentoo-dev 2019-06-08 18:42:45 UTC
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(+)
Comment 3 Larry the Git Cow gentoo-dev 2019-06-11 07:51:44 UTC
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(-)