Bug 579476

Summary: find: ftsfind.c:470: consider_visiting: Assertion `ent->fts_info == 11 || state.type != 0' failed.
Product: [Fedora] Fedora Reporter: Sami Farin <hvtaifwkbgefbaei>
Component: findutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: kdudka
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: findutils-4.5.7-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-06 00:00:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
temporary solution
none
follow-up none

Description Sami Farin 2010-04-05 13:25:41 UTC
Description of problem:
find aborts when fstatat or stat fails.

Version-Release number of selected component (if applicable):
4.5.7-3

How reproducible:
100%

Steps to Reproduce:
1. mkdir -p foo/bar
2. chmod a-x foo
3. find foo
  
Actual results:
find: ftsfind.c:470: consider_visiting: Assertion `ent->fts_info == 11 || state.type != 0' failed.
Aborted


Expected results:
The same as since 1990's or so: no abort.

Additional info:

Comment 1 Kamil Dudka 2010-04-05 13:59:19 UTC
Created attachment 404487 [details]
temporary solution

Thank you for the bug report!

Attached is a patch which just reverts the change causing the failure.  Please test the following scratch build if it solves the problem for you:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2095307

Comment 2 Sami Farin 2010-04-05 14:15:09 UTC
It takes more to convince me.

$ find 
.
./foo
./foo/bar

$ find -ls
3717493    0 drwx------   3 safari   xuser          16 Apr  5 17:13 .
156927567    0 drw-------   3 safari   xuser          16 Apr  5 17:13 ./foo
find: `./foo/bar': Permission denied
find: util.c:280: get_info: Assertion `state.have_type' failed.
Aborted

Comment 3 Kamil Dudka 2010-04-05 14:48:38 UTC
Created attachment 404490 [details]
follow-up

Thank you for the thorough testing!

I am not sure if I understand the code, but this sounds like yet another bug to me.  Looking into get_info(), I see it verifies the result in case of failure.  This must be wrong.  It should verify the result in case of success instead.

Attached is another patch addressing this flaw and built a new scratch build including both patches:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2095409

Comment 4 Kamil Dudka 2010-04-05 18:03:43 UTC
I've raised the issue on upstream mailing-list:

http://lists.gnu.org/archive/html/bug-findutils/2010-04/msg00060.html

Comment 5 Kamil Dudka 2010-04-05 21:47:44 UTC
upstream bug:
http://savannah.gnu.org/bugs/?27213

latest upstream patches:
http://lists.gnu.org/archive/html/findutils-patches/2010-04/msg00056.html

Comment 6 Kamil Dudka 2010-04-06 00:00:32 UTC
built as findutils-4.5.7-4.fc14