[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
This bug was fixed in the package cachefilesd - 0.10.5-1ubuntu0.16.04.1 --- cachefilesd (0.10.5-1ubuntu0.16.04.1) xenial; urgency=medium [ Daniel Axtens ] * cachefilesd can spin when disk space is short (LP: #1810372) -- Dan Streetman Fri, 11 Jan 2019 09:22:23 -0500 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
This bug was fixed in the package cachefilesd - 0.10.5-1ubuntu0.14.04.1 --- cachefilesd (0.10.5-1ubuntu0.14.04.1) trusty; urgency=medium [ Daniel Axtens ] * cachefilesd can spin when disk space is short (LP: #1810372) -- Dan Streetman Fri, 11 Jan 2019 09:21:15 -0500 ** Changed in: cachefilesd (Ubuntu Trusty) Status: Fix Committed => Fix Released ** Changed in: cachefilesd (Ubuntu Xenial) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
Hi, Thanks Eric. I specifically tested the version from Trusty: 0.10.5-1ubuntu0.14.04.1. I tested it by enabling cachefilesd and using dd to get the disk to about 95% full. With 0.10.5-1, starting cachefilesd with a full disk caused the process to spin at 100% cpu usage. With the version from proposed, CPU usage was down to normal negligible levels. The other user did a similar test with the Xenial version 0.10.5-1ubuntu0.16.04.1 and had similar results: the version in -proposed does not max out a CPU core when the disk is full. Regards, Daniel -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
Hi Daniel, As discussed on irc, can you be a little bit more specific about the test you did for both releases (X/T), the package version used, the outcome, ... I'm sure you did the necessary testing but the SRU team will definitely appreciate hearing about it in order to have more information to take the right decision when they will be ready to release the package into -updates. Thanks in advance ! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Tags removed: verification-needed ** Tags added: verification-done ** Tags removed: sts-sponsor sts-sponsor-ddstreet -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
User has verified the Xenial version. I have verified the Trusty version. Regards, Daniel ** Tags removed: verification-needed-trusty ** Tags added: verification-done-trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Tags removed: verification-needed-xenial ** Tags added: verification-done-xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
Hello Daniel, or anyone else affected, Accepted cachefilesd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cachefilesd/0.10.5-1ubuntu0.16.04.1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: cachefilesd (Ubuntu Xenial) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-xenial ** Changed in: cachefilesd (Ubuntu Trusty) Status: In Progress => Fix Committed ** Tags added: verification-needed-trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
test ppa https://launchpad.net/~ddstreet/+archive/ubuntu/lp1810372 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Description changed: [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. [Test Case] - 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. + Create a trusty or xenial VM, and install cachefilesd. Using either a real disk or loopback image, create a ext4 filesystem, and edit fstab to mount it at /var/cache/fscache, e.g.: + $ sudo dd if=/dev/zero of=/cache.img bs=1024m count=1024 + $ sudo losetup -f /cache.img + $ sudo losetup -a + $ sudo mkfs.ext4 /dev/loop0 (note, adjust loop0 if needed) + + edit fstab e.g.: + $ grep fscache /etc/fstab + /cache.img /var/cache/fscache ext4 defaults,loop,user_xattr 0 0 + + It's important to include the 'user_xattr' option as cachefilesd + requires that. + + stop the cachefilesd service and move the fscache contents: + $ sudo service cachefilesd stop + $ cd /var/cache + $ sudo mkdir fscache2 + $ sudo mv -vf fscache/* fscache2/ + $ sudo mount fscache + $ sudo mv -vf fscache2/* fscache/ + $ sudo rmdir fscache2 + + create a file to fill up the fscache space, e.g.: + $ sudo dd if=/dev/zero of=/var/cache/fscache/largefile.txt bs=1024k count=850 + $ df /var/cache/fscache + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/loop0999320 922896 7612 100% /var/cache/fscache + + edit /etc/default/cachefilesd to uncomment 'RUN=yes', e.g.: + $ grep RUN /etc/default/cachefilesd + RUN=yes + + reboot, or just restart cachefilesd service + $ sudo service cachefilesd start + + check top + $ top + + cachefilesd should be spinning, using 100% (or as much as it can) cpu + time. [Regression Potential] The patch makes changes to how cachefilesd detects if it should sleep or cull, so regressions would be in the area of cachefilesd spinning instead of sleeping (which is what it does now) or sleeping instead of culling. However the patch is small and easily understood and backports with minimal effort. [Other Info] This is fixed upstream in 0.10.6: * Wed Feb 3 2016 David Howells 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.") Since bionic has version 0.10.10-0.1, this fix is needed only for xenial and trusty. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Also affects: cachefilesd (Ubuntu Trusty) Importance: Undecided Status: New ** Changed in: cachefilesd (Ubuntu Trusty) Status: New => In Progress ** Changed in: cachefilesd (Ubuntu Xenial) Status: New => In Progress ** Changed in: cachefilesd (Ubuntu Trusty) Assignee: (unassigned) => Daniel Axtens (daxtens) ** Changed in: cachefilesd (Ubuntu Xenial) Assignee: (unassigned) => Daniel Axtens (daxtens) ** Changed in: cachefilesd (Ubuntu Trusty) Importance: Undecided => Medium ** Changed in: cachefilesd (Ubuntu Xenial) Importance: Undecided => Medium ** Changed in: cachefilesd (Ubuntu) Importance: Undecided => Medium ** Changed in: cachefilesd (Ubuntu) Status: Confirmed => Fix Released ** Description changed: [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. [Test Case] 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. [Regression Potential] The patch makes changes to how cachefilesd detects if it should sleep or cull, so regressions would be in the area of cachefilesd spinning instead of sleeping (which is what it does now) or sleeping instead of culling. However the patch is small and easily understood and backports with minimal effort. [Other Info] This is fixed upstream in 0.10.6: * Wed Feb 3 2016 David Howells 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.") + + Since bionic has version 0.10.10-0.1, this fix is needed only for xenial + and trusty. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Description changed: [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] + [Test Case] 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. + + [Regression Potential] + + The patch makes changes to how cachefilesd detects if it should sleep + or cull, so regressions would be in the area of cachefilesd spinning + instead of sleeping (which is what it does now) or sleeping instead + of culling. + + However the patch is small and easily understood and backports with + minimal effort. [Fix] This is fixed upstream in 0.10.6: * Wed Feb 3 2016 David Howells 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. ** Description changed: [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. [Test Case] 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. [Regression Potential] The patch makes changes to how cachefilesd detects if it should sleep or cull, so regressions would be in the area of cachefilesd spinning instead of sleeping (which is what it does now) or sleeping instead of culling. However the patch is small and easily understood and backports with minimal effort. - [Fix] + [Other Info] This is fixed upstream in 0.10.6: * Wed Feb 3 2016 David Howells 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.") -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Also affects: cachefilesd (Ubuntu Xenial) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
** Tags added: sts sts-sponsor sts-sponsor-ddstreet -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
The full .diff.tar.gz is attached. ** Attachment added: "cachefilesd_0.10.5-1ubuntu1.diff.gz" https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+attachment/5227284/+files/cachefilesd_0.10.5-1ubuntu1.diff.gz -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
The attachment "0001-cachefilesd-can-spin-when-disk-space-is- short.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team. [This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1810372] Re: Infinite busy-loop trying to cull when cache space is short
It turns out the package uses the cdbs system rather than quilt, so providing a debdiff is a bit tricky. Here's the patch that I applied, the result is at https://launchpad.net/~daxtens/+archive/ubuntu/builder/+build/16226405 and it works on my test system, and I am asking the original reporter to verify it as well. ** Patch added: "0001-cachefilesd-can-spin-when-disk-space-is-short.patch" https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+attachment/5226523/+files/0001-cachefilesd-can-spin-when-disk-space-is-short.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1810372 Title: Infinite busy-loop trying to cull when cache space is short To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cachefilesd/+bug/1810372/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs