Bug 1544429 - find crashes on live directory
Summary: find crashes on live directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: findutils
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-12 13:00 UTC by Miroslav Lichvar
Modified: 2018-03-20 12:18 UTC (History)
13 users (show)

Fixed In Version: findutils-4.6.0-16.fc28 findutils-4.6.0-16.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1544392
Environment:
Last Closed: 2018-02-20 17:14:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1544392 0 unspecified CLOSED du crashes on live directory 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1558249 0 unspecified CLOSED [abrt] findutils: leave_dir(): find killed by SIGABRT 2021-02-22 00:41:40 UTC

Internal Links: 1544392 1558249

Description Miroslav Lichvar 2018-02-12 13:00:08 UTC
Cloning for findutils, as find seems to be crashing in the same situation as du does. I tested it with findutils-4.6.0-14.fc27.x86_64.

+++ This bug was initially created as a clone of Bug #1544392 +++

Description of problem:
I have a directory with about 40000 subdirectories, each containing several small files and symlinks outside that directory. When copying the directory with cp -r and running du on the new directory to see how much data was already copied, du sometimes crashes.

I have seen this with coreutils-8.27-17.fc27.x86_64 and coreutils-8.27-19.fc27.x86_64, but not coreutils-8.29-3.fc28.x86_64.

Backtrace:
#0  0x00007ffff6dc666b in raise () from /lib64/libc.so.6
#1  0x00007ffff6dc8381 in abort () from /lib64/libc.so.6
#2  0x000055555562762b in leave_dir (ent=ent@entry=0x5555558ef5f0, fts=<optimized out>, fts=<optimized out>)
    at ../lib/fts-cycle.c:136
#3  0x0000555555627b71 in fts_build (sp=sp@entry=0x55555589d510, type=type@entry=3) at ../lib/fts.c:1355
#4  0x000055555562899d in fts_read (sp=sp@entry=0x55555589d510) at ../lib/fts.c:931
#5  0x0000555555594017 in du_files (files=0x5555558867d0 <temp_argv>, bit_flags=280) at ../src/du.c:691
#6  single_binary_main_du (argc=<optimized out>, argv=<optimized out>) at ../src/du.c:1123
#7  0x0000555555564752 in launch_program (prog_name=<optimized out>, prog_argc=1, prog_argv=0x7fffffffd688)
    at ../src/coreutils.c:127
#8  0x0000555555564542 in launch_program (prog_argv=<optimized out>, prog_argc=1, prog_name=0x7fffffffda3b "du")
    at ../src/coreutils.c:195
#9  main (argc=<optimized out>, argv=0x7fffffffd678) at ../src/coreutils.c:177

--- Additional comment from Kamil Dudka on 2018-02-12 07:02:44 EST ---

There are not many relevant changes in FTS between those releases of coreutils.  Anyway, I have submitted a scratch build of f27 coreutils with f29 version of FTS:

https://koji.fedoraproject.org/koji/taskinfo?taskID=24965509

Could you please give it a try in case it is something easy to test for you?

--- Additional comment from Miroslav Lichvar on 2018-02-12 07:21:12 EST ---

It doesn't seem to crash with du from the scratch build.

--- Additional comment from Kamil Dudka on 2018-02-12 07:37:46 EST ---

Not that I understand why, but I will submit it as an update anyway.  Hopefully it will not come back again.  Thank you for testing the scratch build!

--- Additional comment from Kamil Dudka on 2018-02-12 07:47:17 EST ---

Note that findutils shares the code in question with coreutils.  If you were by any chance able to reproduce the crash in your environment with find(1), please create a separate bug for it and I will update the FTS code in findutils, too.

Comment 1 Kamil Dudka 2018-02-12 17:25:21 UTC
Thanks for the bug report!  I will reuse the fix from the coreutils bug.

Comment 2 Fedora Update System 2018-02-12 18:34:09 UTC
findutils-4.6.0-16.fc27 coreutils-8.27-20.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-89733ea3d9

Comment 3 Fedora Update System 2018-02-13 16:40:53 UTC
coreutils-8.27-20.fc27, findutils-4.6.0-16.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-89733ea3d9

Comment 4 Fedora Update System 2018-02-20 17:14:45 UTC
coreutils-8.27-20.fc27, findutils-4.6.0-16.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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