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

 
 

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

Submitted by:  James Youngman <jay>
Submitted on:  Sun 08 Nov 2009 11:04:20 PM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Elias PippingOpen/Closed: Closed
Release: NoneFixed Release: 4.5.6b

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

I've applied and pushed the patch now.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 29 Nov 2009 04:45:42 PM UTC, comment #3:

Thanks for the fast feedback.

James Youngman <jay>
Project AdministratorIn charge of this item.
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 AdministratorIn charge of this item.
Sun 08 Nov 2009 11:04:20 PM UTC, original submission:

Hi,

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 AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by pipping (Posted a comment)
  • -unavailable- added by pipping
  • -unavailable- added by jay (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 31 Mar 2010 07:28:14 AM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.5.6b
    Wed 02 Dec 2009 10:32:58 PM UTCjayStatusIn Progress=>Fixed
    Sun 29 Nov 2009 04:45:42 PM UTCjayStatusNeed Info=>In Progress
    Sun 29 Nov 2009 03:25:58 PM UTCjayStatusNone=>Need Info
    Mon 09 Nov 2009 12:04:58 AM UTCpippingCarbon-Copy-=>Added -unavailable-
    Sun 08 Nov 2009 11:06:28 PM UTCjayAttached File-=>Added out, #19017
      Attached File-=>Added loop.sh, #19018

    Back to the top


    Powered by Savane 3.1-cleanup1