| Summary: | find command crashes on assertion failure after stat() failure | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Jaroslav Kortus <jkortus> | ||||
| Component: | findutils | Assignee: | Kamil Dudka <kdudka> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Branislav NĂ¡ter <bnater> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.8 | CC: | bnater, bwelterl, hartsjc, jkortus, kdudka, msvistun, ovasik, rskvaril, tlavigne | ||||
| Target Milestone: | rc | Keywords: | Patch, Regression | ||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| 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.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-02-25 17:49:55 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Jaroslav Kortus
2016-02-05 13:54:11 UTC
Created attachment 1121387 [details]
abrt report
Where is "our" test suite? How can one run it? 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. (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
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. The following upstream commit fixes the bug: http://git.savannah.gnu.org/cgit/findutils.git/commit/?id=20171feb *** Bug 1306313 has been marked as a duplicate of this bug. *** 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 |