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
Priority:  5 - 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

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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.gma ... ndutils.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.d ... an.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.g ... u.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>

 

Attached Files

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

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    History

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-02 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.5.11
    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.16-ed84.
    Corresponding source code