findutils uses nearly 100% CPU and memory resources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
findutils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
findutils is using a find command, probably to auto-update indexing database.
While this is normal behaviour, i found out that shortly after the indexing update started, findutils is using 100% of CPU resources (Haswell Pentium G3258), all of my system's memory (8GB RAM) and some of the swap, rendering the system completely unusable.
Issueing the command 'ps ax | grep find' results in:
29729 ? SN 0:00 /bin/sh /usr/bin/
29737 ? SN 0:00 /bin/sh /usr/bin/
29758 ? SN 0:00 su nobody -s /bin/sh -c /usr/bin/find / -ignore_
29767 ? SNs 0:00 sh -c /usr/bin/find / -ignore_
29768 ? RN 57:29 /usr/bin/find / -ignore_
Results from 'top':
top - 19:16:00 up 1:40, 3 users, load average: 1,14, 1,20, 1,53
Tasks: 274 total, 2 running, 272 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2,9 us, 22,9 sy, 24,4 ni, 42,4 id, 7,6 wa, 0,0 hi, 0,0 si, 0,0 st
KiB Mem: 8086304 total, 7876904 used, 209400 free, 60 buffers
KiB Swap: 20971516 total, 373796 used, 20597720 free. 4627412 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29768 nobody 30 10 14968 1556 1116 R 92,2 0,0 70:16.74 find
System installation is Ubuntu Utopic on Unity 7 desktop, using nouveau nvidia drivers.
findutils version is 4.4.2-9
Sorry for posting the commands output in here, if there is another guideline for this i'll be happy to edit that.
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: findutils 4.4.2-9
ProcVersionSign
Uname: Linux 3.16.0-11-generic x86_64
ApportVersion: 2.14.7-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Sep 2 19:03:25 2014
Dependencies:
gcc-4.9-base 4.9.1-10ubuntu2
libc6 2.19-10ubuntu1
libgcc1 1:4.9.1-10ubuntu2
multiarch-support 2.19-10ubuntu1
InstallationDate: Installed on 2014-08-19 (14 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140815)
SourcePackage: findutils
UpgradeStatus: No upgrade log present (probably fresh install)
I found a similar issue in Ubuntu 16.04.1 LTS. 20160126- 2.
The included "findutils" package is 4.6.0+git+
I recently developed a fix:
The problem was a memory leak in the "find" program source code. If you apply the attached patch and the solution works for you, please, let me know about it.