Sonarr version (exact version): 2.0.0.4949 Mono version (if Sonarr is not running on Windows):5.2.0.224 OS: Linux raspberrypi 4.9.52-v7+ #1038 ((Debug logs)): (Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here) Description of issue: For quite a while I have noticed that sonarr leaves a process or two spinning with high CPU utilisation when shutdown is requested via the system > status page, but only after sonarr has been running for a while, perhaps an hour or two of normal operation - rss checks etc. Invoking sonarr via the command line, waiting an hour or so, commanding shutdown then looking at the text logged to the console shows the lifecyclecontroller has requested shutdown but that’s it. I have let it sit in this condition for over two hours and there is no further text output.
To prove it is not a problem with my PI’s configuration I have clean installed xubuntu on a PC, installed nzbget, mono, sonarr and copied the sonarr databases across and can reproduce the problem precisely.
In addition I have installed nzbget and sonarr on a Windows PC, transferred the databases, then adjusted the all the paths in nzbdrone.db to make them ‘Windows friendly’ using sql search / update commands and found that sonarr shuts down correctly and cleanly when commanded via the system > status page.
Normally via an init script, which itself is kicked off by systemd these days. However, if I key in the mono command to start sonarr myself, the same problem is observed.
No more entries appear in the trace log after that point and the remaining sonarr processes do not terminate, two of them spin with continual high CPU use. The only way forward in this situation is to kill the processes.
There are absolutely no additional entries in the logs once the situation is encountered. Until the shutdown command is issued everything runs normally none spin at high CPU use. Continual high CPU use is only observed after shutdown is requested.
So … since the support tap seems to have been turned off, I decided to try another thing. A new database, ie as if sonarr has just been installed.
Both nzbdrone.db and log.db moved to simulate a new installaton, and sonarr started.
The problem persists even in this configuration clearly demonstrating that the problem lays with either sonarr itself or mono and not anything peculiar with my linux systems.
I wanted to check a few things before getting back to you as I didn’t have any further questions.
This appears to be a new issue with mono 5, or at least 5.2, though I have no idea what the issue could be. I tested with mono 4.8.0.524 and I was not able to reproduce this issue, but I do see it with 5.2.0.224, both with fresh installs of Sonarr. I left them running for an hour+ and then shut them down.