nextcloud / nextcloud/desktop

[Bug]: Nextcloud Desktop causing shutdown/restart to hang due to keeping disk busy (unable to unmount).

Open
#5,690 2 comments 1 reaction 0 assignees View on GitHub
0. Needs triage bug os: :penguin: Linux
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

### ⚠️ Before submitting, please verify the following: ⚠️

- [X] This is a **bug**, not a question or a configuration issue.
- [X] This issue is **not** already reported on Github (I've searched it).
- [X] Nextcloud Server and Desktop Client are **up to date**. See [Server Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and [Desktop Releases](https://nextcloud.com/install/#install-clients) for supported versions.
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/)

### Bug description

When shutting down or rebooting my system, I get the following message:
```
[FAILED] Failed to unmount .
```
Looking into this drive, the only service using it is Nextcloud Desktop. I'm guessing this is because sync is active at shutdown which is preventing the shutdown from occuring. What ends up happening is that the shutdown/reboot will hang for 30 seconds or so.

### Steps to reproduce

I'm not sure what the exact steps to reproduce are. Something along the lines of
1. Have Nextcloud Desktop sync to an external drive (the external drive is mounted somewhere)
2. Reboot/Shutdown the system
3. Observe that reboot/shutdown hangs and the message [FAILED] Failed to unmount is displayed.

### Expected behavior

I expect that Nextcloud Desktop does not interract with the system shutdown or reboot.

### Which files are affected by this bug

None.

### Operating system

Linux

### Which version of the operating system you are running.

Arch Linux

### Package

Other

### Nextcloud Server version

25.0.6

### Nextcloud Desktop Client version

3.8.1

### Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

### Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

### Are you using an external user-backend?

- [X] Default internal user-backend
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other

### Nextcloud Server logs

```shell
N/A? (This is not a server issue)
```

### Additional info

Possibly related to #2561
Nextcloud Desktop installed via Flatpak

[Output of `lsof | grep '/media/files'`](https://pastebin.com/rGdPpsRv)
Portion of `journalctl` that is related to the shutdown:
```
May 11 18:58:29 systemd[1]: Unmounting ...
May 11 18:58:29 systemd[1]: Unmounting /media/files...
May 11 18:58:29 systemd[1]: Unmounting ...
May 11 18:58:29 umount[7972]: umount: /media/files: target is busy.
.
.
.
May 11 18:58:29 systemd[1]: media-files.mount: Mount process exited, code=exited, status=32/n/a
May 11 18:58:29 systemd[1]: Failed unmounting /media/files.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.