bugfindutils - Bugs: bug #27975, Infinite loop for -exec [..] {} +


bug #27975: Infinite loop for -exec [..] {} +

Submitter:  James Youngman <jay>
Submitted:  Sun 08 Nov 2009 11:04:20 PM UTC
Category:  None Severity:  4 - Important
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Elias Pipping Open/Closed:  Closed
Release:  None Fixed Release:  4.5.6b
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Wed 02 Dec 2009 10:32:58 PM UTC, comment #4: 

I've applied and pushed the patch now.

James Youngman <jay>
Project Administrator
Sun 29 Nov 2009 04:45:42 PM UTC, comment #3: 

Thanks for the fast feedback.

James Youngman <jay>
Project Administrator
Sun 29 Nov 2009 03:58:24 PM UTC, comment #2: 

Your patch appears to fix this indeed.

Elias Pipping <pipping>
Sun 29 Nov 2009 03:25:58 PM UTC, comment #1: 

I've attached a patch (against the current git head) to bug #27328.  Could you let me know if it resolves this problem too?

James Youngman <jay>
Project Administrator
Sun 08 Nov 2009 11:04:20 PM UTC, original submission:  


I've come across a situation in which find will enter an infinite loop when it shouldn't. I've written a script to reproduce the issue, loop.sh, that I'm attaching together w/ the output, out.

The problem occurs when find is run on a file that cannot be opened for reading as well as a large number of file (the order matters).

The problem will only occur when -exec [..] {} + is used, not w/ -exec [..] {} \; or -print0 | xargs.

The problem will not occur if the number of files is too small (6664 does it for me, if you're unable to reproduce the issue w/ my script, please try something greater than that) or if the above-mentioned file is missing.

This is probably related to bug #27328 (I've had segfaults w/ slightly different invocations earlier as well, I find myself unable to come up w/ a test case that doesn't involve the 2G directory I ran it on, for that, though)

-- Elias

James Youngman <jay>
Project Administrator


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

Attach Files:

Attached Files
file #19018:  loop.sh added by jay (881B - application/x-sh)
file #19017:  out added by jay (1KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


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

    Date Changed by Updated Field Previous Value => Replaced by
    2010-03-31 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.5.6b
    2009-12-02 jay StatusIn Progress Fixed
    2009-11-29 jay StatusNeed Info In Progress
    2009-11-29 jay StatusNone Need Info
    2009-11-09 pipping Carbon-Copy- Added -email is unavailable-
    2009-11-08 jay Attached File- Added out, #19017
        Attached File- Added loop.sh, #19018

    Back to the top

    Powered by Savane 3.9