RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1305063 - find command crashes on assertion failure after stat() failure
Summary: find command crashes on assertion failure after stat() failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: findutils
Version: 6.8
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Kamil Dudka
QA Contact: Branislav Náter
URL:
Whiteboard:
: 1306313 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-05 13:54 UTC by Jaroslav Kortus
Modified: 2020-12-11 12:03 UTC (History)
9 users (show)

Fixed In Version: findutils-4.4.2-9.el6
Doc Type: Bug Fix
Doc Text:
Cause: A backported upstream patch optimizing directory tree traversal did not properly handle failure of stat() calls. Consequence: If a stat() call failed, the find utility terminated abnormally due to assertion failure. Fix: An upstream patch has been applied on findutils source code to print a non-fatal error message in that case and continue the traversal. Result: find no longer terminates abnormally if stat() fails.
Clone Of:
Environment:
Last Closed: 2016-02-25 17:49:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
abrt report (1.48 MB, application/x-gzip)
2016-02-05 13:54 UTC, Jaroslav Kortus
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0298 0 normal SHIPPED_LIVE findutils bug fix update 2016-08-17 19:30:16 UTC

Description Jaroslav Kortus 2016-02-05 13:54:11 UTC
Description of problem:
Abrt caught find util crashing

Version-Release number of selected component (if applicable):
findutils-4.4.2-8.el6.x86_64

How reproducible:
unknown

Steps to Reproduce:
1. unknown, got caught as part of our test suite, repeating the command does not fail
2.
3.

Actual results:
abrt caught find crashing

Expected results:
no crashing

Additional info:
abrt report attached

Comment 1 Jaroslav Kortus 2016-02-05 13:54:44 UTC
Created attachment 1121387 [details]
abrt report

Comment 3 Kamil Dudka 2016-02-05 15:41:31 UTC
Where is "our" test suite?  How can one run it?

Comment 4 Jaroslav Kortus 2016-02-05 17:24:15 UTC
that is cluster test suite (so completely unrelated to find testing as such). find was just one of the commands we routinely use to locate our bits.

To run it you must have working cluster environment. I can provide you with one if you find it a necessity to reproduce.

Comment 5 Kamil Dudka 2016-02-08 12:58:30 UTC
(gdb) bt full
#0  0x00007fd98e26a5e5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
        resultvar = 0
        pid = <value optimized out>
        selftid = <value optimized out>
#1  0x00007fd98e26bdc5 in abort () at abort.c:92
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x429330 <__dso_handle+616>, sa_sigaction = 0x429330 <__dso_handle+616>}, sa_mask = {__val = {
              140572370728028, 140720995885280, 25477408, 140720995885520, 140572369740246, 206158430232, 140720995885536, 140720995885312, 
              140572369646344, 206158430256, 140720995885568, 25483488, 327680, 0, 8295767386174337312, 140720995888238}}, sa_flags = -1908875956, 
          sa_restorer = 0x4290d0 <__dso_handle+8>}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007fd98e26370e in __assert_fail_base (fmt=<value optimized out>, assertion=0x429330 "ent->fts_info == 11 || state.type != 0", 
    file=0x4290d0 "ftsfind.c", line=<value optimized out>, function=<value optimized out>) at assert.c:96
        str = 0x184d8e0 ""
        total = 4096
#3  0x00007fd98e2637d0 in __assert_fail (assertion=0x429330 "ent->fts_info == 11 || state.type != 0", file=0x4290d0 "ftsfind.c", line=447, 
    function=0x429420 "consider_visiting") at assert.c:105
No locals.
#4  0x0000000000403751 in consider_visiting (arg=<value optimized out>) at ftsfind.c:447
        statbuf = {st_dev = 3, st_ino = 43818, st_nlink = 8, st_mode = 16749, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, 
          st_blksize = 1024, st_blocks = 0, st_atim = {tv_sec = 1454679024, tv_nsec = 716004049}, st_mtim = {tv_sec = 1454679024, tv_nsec = 716004049}, 
          st_ctim = {tv_sec = 1454679024, tv_nsec = 716004049}, __unused = {0, 0, 0}}
        ignore = <value optimized out>
        isdir = <value optimized out>
        mode = <value optimized out>
#5  find (arg=<value optimized out>) at ftsfind.c:603
        level = 2
        arglist = {0x7ffc28f8ec73 "/", 0x0}
        p = 0x184c120
        ent = 0x1892310
#6  0x0000000000403cae in process_all_startpoints (argc=<value optimized out>, argv=<value optimized out>) at ftsfind.c:620
        i = <value optimized out>
#7  main (argc=<value optimized out>, argv=<value optimized out>) at ftsfind.c:701
        end_of_leading_options = 1
        eval_tree = 0x184aa40

Comment 6 Kamil Dudka 2016-02-08 13:56:41 UTC
Local reproducer (needs to be run as a non-root user):

$ mkdir dir
$ ln -s /root/xxx dir
$ find -L dir
dir
find: ftsfind.c:447: consider_visiting: Assertion `ent->fts_info == 11 || state.type != 0' failed.
Aborted (core dumped)

Downgrading to findutils-4.4.2-6.el6 seems to fix the bug.

Comment 8 Kamil Dudka 2016-02-08 14:14:12 UTC
The following upstream commit fixes the bug:

http://git.savannah.gnu.org/cgit/findutils.git/commit/?id=20171feb

Comment 16 Kamil Dudka 2016-02-11 20:35:31 UTC
*** Bug 1306313 has been marked as a duplicate of this bug. ***

Comment 19 errata-xmlrpc 2016-02-25 17:49:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0298.html


Note You need to log in before you can comment on or make changes to this bug.