Red Hat Bugzilla – Bug 1293087
Deluge daemon does not stop correctly on system reboot or shutdown
Last modified: 2016-08-10 11:36:11 EDT
Description of problem:
Whenever deluge-daemon is running and the system is restarted or shutdown, then the next time the system is up, all torrents will have lost their state and start downloading from 0% again. If you force a recheck on them, they will be found to be 100% completed. I believe this has something to do with shutdown/reboot because the problem does not occur when I manually stop deluge-daemon using systemctl before rebooting.
Version-Release number of selected component (if applicable):
Happens on every system reboot or shutdown-boot if deluge-daemon was not stopped manually.
Steps to Reproduce:
1. Enable and start deluge-daemon.
1. Have a lot of completed torrents in Deluge.
2. Reboot system.
3. See all of your torrents start downloading from 0% again, until you force a recheck.
State is lost.
State is kept.
I cannot reproduce this.
Depending on the number of torrents loaded it could be the timeout for service shutdown is not long enough to wait for a graceful shutdown of deluged. You can enable logging for the daemon and see what is actually happening when a shutdown request is received.
I have implemented a more robust code implementation for the 'corrupt state on crash' issue which will land in 1.3.13 and should (fingers crossed) finally prevent this.
Further inspection, I have found the root cause and fix. The deluge-web.service unit file has the wrong ExecStart value. It should be set to
ExecStart=/usr/bin/deluge-web -l /var/log/deluge-web.log -L warning
With this set, the /usr/bin/deluge binary is not required and you can remove the deluge-gtk dependency.
Ignore my previous comment. Was added to the wrong bug.
Deluge 1.3.13 has been released. This issue should be resolved.