Sonarr crashes randomly after RSS Sync

I have been experiencing these same issues for roughly a week now. Crashes, typically in the early morning and the last thing in Sonarr’s log is an RSS Sync.

I have already reinstalled Sonarr without any change.

Previously…

Ubuntu 14.04
Linux version 3.13.0-77-generic (buildd@lcy01-30) (gcc version 4.8.2 (Ubuntu 4.8 .2-19ubuntu1) ) #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016
Sonarr Version: 2.0.0.3732
Mono Version: 4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Nov 12 09:52:44 UTC 2015)

Log pulled with: mono --debug /opt/NzbDrone/NzbDrone.exe &>sonarrcrash

System.Byte[] doesn’t implement interface System.IFormatProvider

Stacktrace:

at <0xffffffff>
at System.Globalization.NumberFormatInfo.GetInstance (System.IFormatProvider) <0x000de>
at byte.Parse (string,System.Globalization.NumberStyles,System.IFormatProvider) <0x00023>
at System.Convert.ToByte (string,System.IFormatProvider) <0x0002b>
at string.System.IConvertible.ToByte (System.IFormatProvider) <0x00011>
at NzbDrone.Common.Extensions.StreamExtensions.ToBytes (System.IO.Stream) [0x00013] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Extensions\StreamExtensions.cs:16
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest,System.Net.CookieContainer) [0x00100] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispa$
at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest,System.Net.CookieContainer) [0x0003c] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDis$
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest) [0x00081] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Common\Http\HttpClient.cs:70
at NzbDrone.Core.Indexers.HttpIndexerBase1<T_REF>.FetchIndexerResponse (NzbDrone.Core.Indexers.IndexerRequest) [0x00044] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:276
at NzbDrone.Core.Indexers.HttpIndexerBase1.FetchPage (NzbDrone.Core.Indexers.IndexerRequest,NzbDrone.Core.Indexers.IParseIndexerResponse) [0x00000] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\HttpIndexerB$
at NzbDrone.Core.Indexers.HttpIndexerBase1<T_REF>.FetchReleases (NzbDrone.Core.Indexers.IndexerPageableRequestChain,bool) [0x0009b] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:142
at NzbDrone.Core.Indexers.HttpIndexerBase1.FetchRecent () [0x00015] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\HttpIndexerBase.cs:51
at NzbDrone.Core.Indexers.FetchAndParseRssService/<>c__DisplayClass5.b__2 () [0x00000] in m:\BuildAgent\work\6c3239faf2b92630\src\NzbDrone.Core\Indexers\FetchAndParseRssService.cs:50
at System.Threading.Tasks.Task.InnerInvoke () <0x0004f>
at System.Threading.Tasks.Task.Execute () <0x00055>
at System.Threading.Tasks.Task.ExecutionContextCallback (object) <0x00055>
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x0016e>
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x00020>
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) <0x00116>
at System.Threading.Tasks.Task.ExecuteEntry (bool) <0x000ee>
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork (object) <0x00057>
at System.Threading.ThreadHelper.ThreadStart_Context (object) <0x000d0>
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x0016e>
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x00020>
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) <0x00059>
at System.Threading.ThreadHelper.ThreadStart (object) <0x0004c>
at (wrapper runtime-invoke) .runtime_invoke_void__this___object (object,intptr,intptr,intptr)

Native stacktrace:

mono() [0x49cf0c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f7c35d1d340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7f7c3597ecc9]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f7c359820d8]
mono() [0x62a329]
mono() [0x62a537]
mono() [0x62a5e2]
mono() [0x49f037]
mono() [0x49f410]
[0x40a1005d]

Debug info from gdb:

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.

Appears to be a similar mono native crash to an older one I found.

I remembered that I had ran a dist-upgrade to update SABnzbd fully. I noticed my kernel got upgraded to 3.13.0-77. I reverted back to kernel 3.13.0-74. First I made sure the old kernel was still there and then I purged the new:

dpkg --list | grep linux-image
ii linux-image-3.13.0-74-generic 3.13.0-74.118 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-77-generic 3.13.0-77.121 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-74-generic 3.13.0-74.118 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-77-generic 3.13.0-77.121 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-generic 3.13.0.77.83 amd64 Generic Linux kernel image

apt-get purge linux-image-3.13.0-77-generic

Now…

Ubuntu 14.04
Linux version 3.13.0-74-generic (buildd@lcy01-07) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015
Sonarr Version: 2.0.0.3732
Mono Version: 4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Nov 12 09:52:44 UTC 2015)

It crashed again on me but I was not logging.

Was mono upgraded as well?

Trace logs might indicate if you’re seeing this issue with a specific indexer, especially if its not crashing every RSS sync.

I’m honestly not sure. I do know that at first I manually installed mono-devel and when it still crashed I removed it before reinstalling Sonarr. What version installs from the Sonarr repository?

One of my indexers did change their name very recently, though I updated all the information and the connection tests cleanly.

Here is the trace log from before the crash, starting with the first thing out of the ordinary and ending with the first RSS sync after starting the service again. This error has occurred before without a crash, several places in the logs.

16-2-17 01:40:26.7|Warn|HttpClient|HTTP Error - Res: [GET] https://api.nzbgeek.info/api?t=tvsearch&cat=5030,5040,5070&extended=1&apikey=&offset=0&limit=100 : 502.BadGateway

502 Proxy Error

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /api.

Reason: Error reading from remote server


Apache/2.4.7 (Ubuntu) Server at api.nzbgeek.info Port 443

16-2-17 01:40:26.8|Warn|Newznab|nzbgeek.info HTTP request failed: [502:BadGateway] [GET] at [https://api.nzbgeek.info/api?t=tvsearch&cat=5030,5040,5070&extended=1&apikey=&offset=0&limit=100]
16-2-17 01:40:28.8|Info|DownloadDecisionMaker|Processing 600 releases
16-2-17 01:40:31.6|Info|RssSyncService|RSS Sync Completed. Reports found: 600, Reports grabbed: 0
16-2-17 01:55:56.2|Info|RssSyncService|Starting RSS Sync
16-2-17 01:56:00.7|Info|DownloadDecisionMaker|Processing 700 releases
16-2-17 01:56:03.8|Info|RssSyncService|RSS Sync Completed. Reports found: 700, Reports grabbed: 0
16-2-17 02:11:27.8|Info|RssSyncService|Starting RSS Sync
16-2-17 02:11:31.6|Info|DownloadDecisionMaker|Processing 700 releases

Well just to be sure I did:

apt-get remove nzbdrone (instead of --reinstall)

apt-get autoremove

apt-get install nzbdrone

It appears to have reinstalled mono 4.2.1 so that answers my previous question. I will start it back up with logging once again.

Version
2.0.0.3732
Mono Version
4.2.1 (Stable 4.2.1.102/6dd2d0d Thu Nov 12 09:52:44 UTC 2015)

Thats an Info level log, not trace, trace shows a lot more information, you’ll need to enable it in settings.

Got it! Enabled now. :slight_smile:

Here’s what I found in the logs this morning:

EPIC FAIL: System.NullReferenceException: Object reference not set to an instance of an object
at System.Threading.Tasks.Task.AddException (System.Object exceptionObject, Boolean representsCancellation) <0x7fb5c609d600 + 0x00037> in :0
at System.Threading.Tasks.Task.AddException (System.Object exceptionObject) <0x7fb5c609d5e0 + 0x00013> in :0
at System.Threading.Tasks.Task.HandleException (System.Exception unhandledException) <0x7fb5c609e850 + 0x000c7> in :0
at System.Threading.Tasks.Task.Execute () <0x7fb5c609e050 + 0x0010f> in :0
at System.Threading.Tasks.Task.ExecutionContextCallback (System.Object obj) <0x7fb5c609e720 + 0x00055> in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af850 + 0x0016e> in <filename unk$
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af820 + 0x00020> in :0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) <0x7fb5c609e5b0 + 0x00116> in :0
at System.Threading.Tasks.Task.ExecuteEntry (Boolean bPreventDoubleExecution) <0x7fb5c609e450 + 0x000ee> in :0
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork (System.Object obj) <0x7fb5c60ad140 + 0x00057> in :0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x7fb5c60b1010 + 0x000d0> in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af850 + 0x0016e> in <filename unk$
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af820 + 0x00020> in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x7fb5c60af770 + 0x00059> in :0
at System.Threading.ThreadHelper.ThreadStart (System.Object obj) <0x7fb5c60b1120 + 0x0004c> in :0

[Fatal] GlobalExceptionHandlers: EPIC FAIL: Object reference not set to an instance of an object

System.NullReferenceException: Object reference not set to an instance of an object
at System.Threading.Tasks.Task.AddException (System.Object exceptionObject, Boolean representsCancellation) <0x7fb5c609d600 + 0x00037> in :0
at System.Threading.Tasks.Task.AddException (System.Object exceptionObject) <0x7fb5c609d5e0 + 0x00013> in :0
at System.Threading.Tasks.Task.HandleException (System.Exception unhandledException) <0x7fb5c609e850 + 0x000c7> in :0
at System.Threading.Tasks.Task.Execute () <0x7fb5c609e050 + 0x0010f> in :0
at System.Threading.Tasks.Task.ExecutionContextCallback (System.Object obj) <0x7fb5c609e720 + 0x00055> in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af850 + 0x0016e> in <filename unk$
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af820 + 0x00020> in :0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) <0x7fb5c609e5b0 + 0x00116> in :0
at System.Threading.Tasks.Task.ExecuteEntry (Boolean bPreventDoubleExecution) <0x7fb5c609e450 + 0x000ee> in :0
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork (System.Object obj) <0x7fb5c60ad140 + 0x00057> in :0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x7fb5c60b1010 + 0x000d0> in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af850 + 0x0016e> in <filename unk$
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af820 + 0x00020> in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x7fb5c60af770 + 0x00059> in :0
at System.Threading.ThreadHelper.ThreadStart (System.Object obj) <0x7fb5c60b1120 + 0x0004c> in :0

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at System.Threading.Tasks.Task.AddException (System.Object exceptionObject, Boolean representsCancellation) <0x7fb5c609d600 + 0x00037> in :0
at System.Threading.Tasks.Task.AddException (System.Object exceptionObject) <0x7fb5c609d5e0 + 0x00013> in :0
at System.Threading.Tasks.Task.HandleException (System.Exception unhandledException) <0x7fb5c609e850 + 0x000c7> in :0
at System.Threading.Tasks.Task.Execute () <0x7fb5c609e050 + 0x0010f> in :0
at System.Threading.Tasks.Task.ExecutionContextCallback (System.Object obj) <0x7fb5c609e720 + 0x00055> in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af850 + 0x0016e> in <filename unk$
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af820 + 0x00020> in :0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) <0x7fb5c609e5b0 + 0x00116> in :0
at System.Threading.Tasks.Task.ExecuteEntry (Boolean bPreventDoubleExecution) <0x7fb5c609e450 + 0x000ee> in :0
at System.Threading.Tasks.ThreadPoolTaskScheduler.LongRunningThreadWork (System.Object obj) <0x7fb5c60ad140 + 0x00057> in :0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x7fb5c60b1010 + 0x000d0> in :0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af850 + 0x0016e> in <filename unk$
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x7fb5c60af820 + 0x00020> in :0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x7fb5c60af770 + 0x00059> in :0
at System.Threading.ThreadHelper.ThreadStart (System.Object obj) <0x7fb5c60b1120 + 0x0004c> in :0

That looks a lot like:

Which was fixed and then new kernel versions started exhibiting similar issues, but without a fix that we’ve seen yet.

One thing to try before blaming it on the kernel + mono would be to run a memtest on the system, for 12+ hours if possible to eliminate any hardware cause. Mono is more sensitive to memory issues because of how applications are executed under it.

Test your memory, really.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.