bugfindutils - Bugs: bug #37356, excessive memory usage when using...

 
 

bug #37356: excessive memory usage when using -printf and %A %C or %T

Submitter:  Andreas Metzler <ametzler>
Submitted:  Sat 15 Sep 2012 01:43:45 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Nemo Maelstrom Thorx Open/Closed:  Closed
Release:  4.4.2 Fixed Release:  4.5.11
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 17 Nov 2012 01:41:20 PM UTC, comment #2: 

I've applied and pushed Jim's fix.  Thanks, Jim.

James Youngman <jay>
Group administrator
Tue 18 Sep 2012 10:30:06 AM UTC, comment #1: 

Note that the V2 patch should be applied after the three patches I posted here: http://thread.gmane.org/gmane.comp.gnu.findutils.bugs/5216

However, they are really independent, and that order is imposed solely due to the fact that ChangeLog is version-controlled.

Jim Meyering <meyering>
Sat 15 Sep 2012 01:43:45 PM UTC, original submission:  

Hello,

Nemo Maelstrom Thorx reported the following issue in the Debian bts <http://bugs.debian.org/687358>. Afaict it applies to both 4.4.2 and 4.5.10. As it also is found in the oldfind variant this should not be a duplicate of <http://savannah.gnu.org/bugs/?34079>

cu Andreas

---------------------------------
Find appears to consume and not release large amounts of memory when asked to print time directives with custom formatting. ie, %Ak, %Ck and %Tk.

The rate of memory consumption appears to correlate with the number of these directives used

Observable by running, for eg:
# find / -printf "[%y %11s %TY.%Tm.%Td %TH:%TM]\t%p\n"

...and simultaneously 'top' or other memory monitor. Resident size grows without check.

With enough files being found, this can grow to trigger an OOM.

I've marked this as upstream, as I've since observed the same behaviour on find 4.4.2 in CentOS (as well as in debian derivatives mint and ubuntu)

Experimental 4.5 also appears to have the same issue.

However 4.2 on an older non-debian system did not have this issue.

.../Nemo
---------------------------------

Andreas Metzler <ametzler>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #26578:  find-leaks-v2.patch added by meyering (3KiB - text/x-patch - I see findutils still VCs ChangeLog, so here's a revised patch.)
file #26574:  find-leaks.patch added by meyering (2KiB - text/x-patch - Thanks for the report. There were two leaks. I've attached a patch that fixes them.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by meyering (Updated 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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-02 jay Fixed ReleaseNone 4.5.11
        Open/ClosedOpen Closed
    2012-11-17 jay StatusNone Fixed
        Assigned toNone jay
    2012-09-18 meyering Attached File- Added find-leaks-v2.patch, #26578
    2012-09-18 meyering Attached File- Added find-leaks.patch, #26574
    2012-09-15 ametzler Carbon-CopyRemoved 20807 -

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code