Scheduled Tasks not running

Yeah I had started a thread on Reddit about this last week:

I also had the same issue and posted a thread. Reinstall of sonarr seems to have fixed it for now. (Didn’t lose any settings).

We have made a fix in this area (in develop), we’re not 100% certain that it will fix the issue since we weren’t able to reproduce it. It will be available in 2.0.0.2306 or newer if you’re able to switch to develop and test it out it would be greatly appreciated.

Reverted back to the previous Master (3004) and ran for longer than I had previously without the tasks hanging. I went ahead and moved to the latest dev build this morning. I’ll report back after it’s been running stable for awhile or something hangs. Trace logging is turned on just in case!

Thanks for looking into it!

1 Like

I just changed over to the develop branch and still have trace logging on. I’ll post an update tomorrow.

1 Like

Some good news. Tnx to a memory dump a user provided us we’ve been put on the right trail.
markus already committed a fix for the problem on develop, but we weren’t sure yet if that was the cause.

This was a typical Murphy scenario.
Tnx to a tiny bug, if 3 specific things happened at the same time, Sonarr would end up with a stale cached command state, preventing that command from ever running again until the app got restarted.

Once we figured out how those 3 things played a role, it became much easier to get it to reproduce.
So the fix markus applied earlier is now confirmed with a probability of >95%, if it continues to work we’ll cherrypick the fixes to master tomorrow, maybe a bit earlier. merged to master now.

Thank you for your patience.

4 Likes

Great news, thanks

So far, so good. It’s been running for 24 hours and it picked up last night’s downloads. Thanks!

I moved 3 posts to a new topic: No tasks running after startup

Working fine again for me, thanks all.

I think i had mine working for a few days after the recent update to fix this issue, looks like back again for me.

Here is some logs.
https://externalz.homelinux.com/Public/nzbdrone.txt

https://externalz.homelinux.com/Public/nzbdrone_2.txt

The first log only has trace logging at the end, but the 2nd shows the CheckForFinishedDownload task running regularly.

What makes you think the issues is reoccurring? Are tasks not running?

I realized when episodes weren’t downloading, then i checked my Tasks tab and it showed every task hadn’t been completed in over a day.
I then copy pasted my first log, enabled trace and restarted. Then followed it up with another log in case you needed more.

I will leave trace on over the next week to see if it does it again.

Update,

Looks like it started doing it rather quickly again,

Another Log
https://externalz.homelinux.com/Public/nzbdrone_3.txt

Version
2.0.0.3212
Mono Version
3.10.0 (tarball Wed Nov 5 12:50:04 UTC 2014)

Update #3,

It must have restarted on its own?

https://externalz.homelinux.com/Public/update_3.txt

Which kernel are you running?

3.13.0-54-generic

Ubuntu 14.04

Edit: the update#3 was a result from a OS restart. Disregard that :wink:

If you try to manually run one of the tasks, does it run?

@Taloth round 2! Depending on the answer for the above question this might be scheduler related.

Still waiting on it to play up again, i will post the results when it does.

@markus101 I don’t think I’m ready for a round 2. Still got headaches from the last mono debugging.

I had this issue before the previous fix, and just now it has popped up again. I didn’t have trace logging enabled before, but I do now so I will post a log next time it happens.

I WAS able to run the tasks manually from the UI, and they run perfectly fine once.

OS info:
kernel 3.13.0-53-generic
Ubuntu 14.04.2 LTS