Nextcloud snap auto-updated a few days ago. Since then, I've had 100% CPU use by snapfuse.

Bug #1847673 reported by Alex Ingram
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Invalid
Undecided
Unassigned

Bug Description

I previously opened a bug report with nextcloud-snap. That bug report was immediately closed, and I was told to instead file a bug here.

The bug I opened there can be found here: https://github.com/nextcloud/nextcloud-snap/issues/1141

---

I have an LXC container running Ubuntu 18.04. The host system that this container is running on was also on Ubuntu 18.04, but in the process of troubleshooting an unrelated bug in ZFS (https://github.com/zfsonlinux/zfs/issues/9430) that was triggered by this bug, the host system was updated to the Ubuntu 19.10 development release. No change in behavior resulted.

Inside of the aforementioned LXC container, I have installed Nextcloud, via the Nextcloud snap package. Nothing else runs on this container. At some point recently (I think roughly a week ago), the Nextcloud snap package auto-updated in this container. Since then, the snapfuse process associated with the Nextcloud snap has been consuming an entire CPU core, and reading from disk at a roughly constant 6 MB/sec.

I can provide any relevant logs upon request that may assist in finding the root cause of this issue.

Alex Ingram (acingram)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Graham Morrison (morrisong) wrote :

Thanks for reporting this.

I've just tried to quickly reproduce your issue, albeit on a host running 18.04 rather than 19.10. My Nextcloud snap running within LXC/18.04 is currently running correctly.

You could try reverting your Nextcloud snap to the previous release, to see if this temporarily resolves this issue (see https://snapcraft.io/docs/getting-started#heading--revert). But it seems more likely that this issue is maybe with the Nextcloud snap itself, rather than snapd.

Sorry for asking you to refile your issue yet again, but the best place to get some eyes on this, and hopefully find someone with the same problem or greater knowledge of the Nextcloud snap, is on our forum:

https://forum.snapcraft.io/c/snap

Changed in snapd:
status: New → Invalid
Revision history for this message
Ilya Molokanov (f-mg-r) wrote :
Download full text (3.9 KiB)

100% same situation with 100% load of snapfuse process from me here:

root@nextcloud ~# snap list nextcloud
Name Version Rev Tracking Publisher Notes
nextcloud 16.0.5snap2 16402 stable nextcloud✓ -
root@nextcloud ~# snap version
snap 2.42
snapd 2.42
series 16
ubuntu 18.04
kernel 4.15.0-64-generic
root@nextcloud ~# snap info nextcloud
name: nextcloud
summary: Nextcloud Server - A safe home for all your data
publisher: Nextcloud✓
contact: https://github.com/nextcloud/nextcloud-snap
license: unset
description: |
  Where are your photos and documents? With Nextcloud you pick a server of your choice, at home, in
  a data center or at a provider. And that is where your files will be. Nextcloud runs on that
  server, protecting your data and giving you access from your desktop or mobile devices. Through
  Nextcloud you also access, sync and share your existing data on that FTP drive at school, a
  Dropbox or a NAS you have at home.
commands:
  - nextcloud.disable-https
  - nextcloud.enable-https
  - nextcloud.export
  - nextcloud.import
  - nextcloud.manual-install
  - nextcloud.mysql-client
  - nextcloud.mysqldump
  - nextcloud.occ
services:
  nextcloud.apache: simple, enabled, active
  nextcloud.mdns-publisher: simple, enabled, active
  nextcloud.mysql: simple, enabled, active
  nextcloud.nextcloud-cron: simple, enabled, active
  nextcloud.nextcloud-fixer: simple, enabled, inactive
  nextcloud.php-fpm: simple, enabled, active
  nextcloud.redis-server: simple, enabled, active
  nextcloud.renew-certs: simple, enabled, active
snap-id: njObIbGQEaVx1H4nyWxchk1i8opy4h54
tracking: stable
refresh-date: 15 days ago, at 08:38 MSK
channels:
  stable: 16.0.5snap2 2019-10-04 (16402) 228MB -
  candidate: ↑
  beta: ↑
  edge: master-2019-10-18 2019-10-19 (16610) 232MB -
  17/stable: –
  17/candidate: –
  17/beta: –
  17/edge: 16.0.5snap1+git1.d080caa 2019-09-30 (16296) 230MB -
  16/stable: 16.0.5snap2 2019-10-04 (16402) 228MB -
  16/candidate: ↑
  16/beta: ↑
  16/edge: 16-2019-10-18 2019-10-19 (16606) 228MB -
  15/stable: 15.0.11snap2 2019-09-13 (15910) 222MB -
  15/candidate: ↑
  15/beta: 15.0.11snap2 2019-09-30 (16300) 222MB -
  15/edge: 15-2019-10-18 2019-10-19 (16607) 222MB -
  14/stable: 14.0.10snap1 2019-05-04 (13208) 202MB -
  14/candidate: ↑
  14/beta: ↑
  14/edge: ↑
  13/stable: 13.0.12snap1 2019-05-03 (13155) 193MB -
  13/candidate: ↑ ...

Read more...

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Can you try to pinpoint the process that does the IO? A collection of tools such as "htop", "iotop" and "dstat" can help to understand what is going on in the system. From there we can look at what gets written and if that is legitimate or not.

Revision history for this message
William (william1066) wrote :

I had the same issue with NextCloud and snapfuse in an lxd container
I have uploaded a screenshot of htop cpu when I refresh a page on the nextcloud instance. CPU sits around 100% for about 12 seconds while the page loads

container - DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
host - DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

Name Version Rev Tracking Publisher Notes
core 16-2.42.5 8268 stable canonical✓ core
nextcloud 16.0.5snap3 16739 stable nextcloud✓ -

root@lxdhost:~# lxd --version
3.18

root@nextcloud-container:~# ls -al /usr/bin/snapfuse
-rwxr-xr-x 1 root root 30856 Mar 21 2019 /usr/bin/snapfuse
(above root@pihole1:~# snapfuse --version
squashfuse 0.1.100 (c) 2012 Dave Vasilevsky
"version" of snapfuse before upgrade of the container)

After upgrading my container and host and restarting (container only) so that snapfuse was at the latest version the issue went away. I am not sure if this was the container restarting or the upgrade of snapfuse

After upgrading the container (apt upgrade) the file size changed but the version did not seem to
root@nextcloud:~# ls -al /usr/bin/snapfuse
-rwxr-xr-x 1 root root 34952 Oct 30 12:17 /usr/bin/snapfuse

Though the output of snapfuse --version has an extra line starting with "FUSE ...."

FUSE library version: 2.9.7
squashfuse 0.1.100 (c) 2012 Dave Vasilevsky

My problem has gone away and page loads are almost instantaneous, though I am none the wiser as to what caused the problem and did not take any zfs snapshots before upgrade - sorry!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.