You have been subscribed to a public bug by Daniel Axtens (daxtens):

[Impact]

A user reports that cachefilesd will spin at 100% of a cpu when started
on a filesystem where the free space is less than the bcull threshold
and culling the cache is insufficient to free up space.

Investigation shows that this is because cachefilesd detects that
culling is required, tries to cull, and does not realise that culling
cannot free up enough space, so just keeps retrying.

[Testing/Reproducing]

I created a VM with a spare disk, mounted it to /raid (or whatever).
I changed the /etc/default/cachefilesd to start at boot, filled the /raid 
filesystem to over the bcull threshold, and started cachefilesd. When running 
top, the cachefilesd process is at the top using approx 100% of 1 CPU. It 
appears to be trying to free up space in the cache (that is not even used) 
because the filesystem is over the threshold for culling.

[Fix]

This is fixed upstream in 0.10.6:

* Wed Feb 3 2016 David Howells <dhowe...@redhat.com> 0.10.6-1
...
- Suspend culling when cache space is short and cache objects are pinned.

The particular patch is ce353f5b6b5b ("cachefilesd can spin when disk
space is short.")

[Regression Potential]
The patch is small and easily understood and backports with minimal effort.

** Affects: cachefilesd (Ubuntu)
     Importance: Undecided
     Assignee: Daniel Axtens (daxtens)
         Status: Confirmed


** Tags: patch
-- 
Infinite busy-loop trying to cull when cache space is short
https://bugs.launchpad.net/bugs/1810372
You received this bug notification because you are a member of STS Sponsors, 
which is subscribed to the bug report.

-- 
Mailing list: https://launchpad.net/~sts-sponsors
Post to     : sts-sponsors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sts-sponsors
More help   : https://help.launchpad.net/ListHelp

Reply via email to