bugfindutils - Bugs: bug #50326, Memory leak due to missing...


bug #50326: Memory leak due to missing me_mntroot deallocation

Submitter:  Herwig Hochleitner <bendlas>
Submitted:  Thu 16 Feb 2017 10:38:37 AM UTC
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  berny
Originator Name:  Open/Closed:  Closed
Release:  4.6.0 Fixed Release:  4.7.0
* Mandatory Fields

Add a New Comment Rich Markup

Thu 16 Feb 2017 06:05:10 PM UTC, comment #2: 

Right.  I've just committed the original fix to:
and the fix for the NEWS entry is here:

The reason for the bug - stat() on BTRFS returning device ids for
snapshots and subvolumes which do not exist in "/proc/self/mountinfo" -
still exists.  This also leads to performance issues, yet I don't
know numbers.  I'm thinking about adding a BTRFS-specific workaround
in "find/ftype.c".

Thanks & have a nice day,

Bernhard Voelker <berny>
Group administrator
Thu 16 Feb 2017 04:11:14 PM UTC, comment #1: 

Possibly related to


i.e. caused by a btrfs bug.

Andreas Metzler <ametzler>
Thu 16 Feb 2017 10:38:37 AM UTC, original submission:  

Long running invocations of find, e.g. as part of update-locatedb, grow their allocated memory beyond all bounds. On my system (NixOS), I have regularly observed it to take more than 12G of RES memory.

This bug was originally reported to the ubuntu tracker (https://bugs.launchpad.net/ubuntu/+source/findutils/+bug/1364492) and the patch that was posted there by Juan Carlos Cordero González (https://launchpadlibrarian.net/304000719/find_bug.patch) fixed the condition for me.

% find --version
find (GNU findutils) 4.6.0
Copyright (C) 2015 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.
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)

% /nix/store/yarp3aqw768wi94nh4n9wzrdb4k74bva-findutils-4.6.0/bin/find/(-fstypeafs-o-fstypeanon_inodefs-o-fstypeauto-o-fstypeautofs-o-fstypebdev-o-fstypebinfmt-o-fstypebinfmt_misc-o-fstypecgroup-o-fstypecifs-o-fstypecoda-o-fstypeconfigfs-o-fstypecramfs-o-fstypecpuset-o-fstypedebugfs-o-fstypedevfs-o-fstypedevpts-o-fstypedevtmpfs-o-fstypeecryptfs-o-fstypeeventpollfs-o-fstypeexofs-o-fstypefutexfs-o-fstypeftpfs-o-fstypefuse-o-fstypefusectl-o-fstypegfs-o-fstypegfs2-o-fstypehostfs-o-fstypehugetlbfs-o-fstypeinotifyfs-o-fstypeiso9660-o-fstypejffs2-o-fstypelustre-o-fstypemisc-o-fstypemqueue-o-fstypencpfs-o-fstypennpfs-o-fstypeocfs-o-fstypeocfs2-o-fstypepipefs-o-fstypeproc-o-fstyperamfs-o-fstyperpc_pipefs-o-fstypesecurityfs-o-fstypeselinuxfs-o-fstypesfs-o-fstypeshfs-o-fstypesmbfs-o-fstypesockfs-o-fstypespufs-o-fstypenfs-o-fstypeNFS-o-fstypenfs4-o-fstypenfsd-o-fstypesshfs-o-fstypesubfs-o-fstypesupermount-o-fstypesysfs-o-fstypetmpfs-o-fstypeubifs-o-fstypeudf-o-fstypeusbfs-o-fstypevboxsf-o-fstypevperfctrfs-o-typed-regex\(^/tmp$\)\|\(^/var/tmp$\)\|\(^/var/cache$\)\|\(^/var/lock$\)\|\(^/var/run$\)\|\(^/var/spool$\)\|\(^/nix/store$\))-prune-o-print0

Herwig Hochleitner <bendlas>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by berny (Posted a comment)
  • -email is unavailable- added by bendlas (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-29 jay Open/ClosedOpen Closed
    2019-08-29 berny Fixed ReleaseNone 4.7.0
    2017-02-16 berny StatusNone Fixed
        Assigned toNone berny

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code