bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find command trigger coredump


From: Paul Eggert
Subject: Re: find command trigger coredump
Date: Wed, 15 Apr 2020 21:03:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Thanks for the bug report archived at <https://lists.gnu.org/r/bug-gnulib/2020-04/msg00068.html>. What you appear to be saying is that the Gnulib fts NOSTAT_LEAF_OPTIMIZATION code is buggy when an XFS filesystem is mutating, and that your test case illustrates a mutating filesystem that can cause 'find' and 'du' to dump core because fts.c's tight-cycle check messes up its hash table.

I reproduced the bug on an XFS filesystem on Fedora 31 x86-64.

I worked around the bug by removing that optimization from Gnulib fts.c, by installing the attached patch. I expect that this optimization is obsolete nowadays, as XFS is now working and ReiserFS is either working, or is so unpopular that high performance for du and find is not that important for it.

I have the sneaking suspicion that we can now remove at least some of the special cases for AFS, CIFS, NFS, and /proc filesystems in the leaf_optimization subroutine. However, doing so would merely improve performance, so I resisted the temptation to make that change. I'll cc this message to other people who've touched the fts.c code to see whether they have any advice about that.

Thanks again for reporting the bug.

Attachment: 0001-fts-remove-NOSTAT_LEAF_OPTIMIZATION.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]