Sonarr Keeps Closing


#1

Sonarr version (exact version): 2.0.0.5252
OS: Windows 10
Debug logs: https://drive.google.com/file/d/11fX2RZkPV2vCLFt9gplI4woeL5l8e05Q/view?usp=sharing
Description of issue: Every time I load Sonarr, a short while later it disappears from my system tray and needs to be reloaded. I’ve attached debug logs from just now, but please let me know if different ones are needed.

Any ideas please?


#2

Is the web UI accessible?
Is the process still running? (Check Task Manager)

Those aren’t debug logs, just normal info level logs. In this case you’ll want to enable trace logging and post the trace logs when Sonarr stops responding/processing (before starting Sonarr again; assuming it’s crashing).


#3

Thanks for your reply, sorry for the delay

No the web UI isn’t accessible, process dies.

Link for trace logs, hope this is correct:

https://drive.google.com/open?id=19ATs9NY4aGuluiIZFzGb_0l3L_ewJByt


#4

That link doesn’t have sharing enabled so I can’t access it.

It’d also be worth redirecting the standard output and error to a separate log file (with trace enabled), that will allow capturing of any errors that lead to mono crashing which may not be logged by Sonarr due to mono taking Sonarr down before it can write to the log file.


#5

Hi, the link is:

https://drive.google.com/file/d/19ATs9NY4aGuluiIZFzGb_0l3L_ewJByt/view?usp=sharing

I’ve checked and can access from another gmail account…

I’m not technical and not sure what you mean by the rest of your comment I’m afraid… Don’t even know what Mono is?


#6

The link still doesn’t work for me. You need to give all users access to view it.

Disregard the rest, I was thinking of a different issue.


#7

Weird as I can open from another gmail account, but it fits in PasteBin so:

https://pastebin.com/fZi3sMzC

Thanks again for looking…


#8

Does Sonarr stop responding at the end of the logs?
I’m not seeing any issues in the logs that would indicate it’s crashing.


#9

Yes… I waiting until it crashed, then obtained the logs. Any other logs we can look at maybe?


#10

You could also check Windows Event Viewer.


#11

Searching the system event viewer, there’s a mention this morning, not sure if this is when the crash occured:

The application \Device\HarddiskVolume2\ProgramData\NzbDrone\bin\NzbDrone.exe with process id 12504 stopped the removal or ejection for the device PCI\VEN_1022&DEV_7801&SUBSYS_78011849&REV_40\3&11583659&0&88.

Any ideas? Likely to be related? I’ve just loaded Sonarr again so hopefully I’ll see when it fails and check the logs again…


#12

Sonarr stopped the removal of a device?

Unless it was a USB drive that it was actively using I don’t see how that’s possible. If it somehow blocked it and it was forcibly removed that could explain the crash, can’t think of what it’d be.


#13

No Usb attached, only keyboard and mouse, and they’ve been attached for years… Confused


#14

Would this be an issue:

An error occurred while processing feed. : ‘class’ is an unexpected token. The expected token is ‘>’. Line 38, position 11.


#15

Not something that would crash Sonarr, just prevent it from using that indexer because it returned HTML instead of XML.


#17

Anything else I can check? It’s only Sonarr that has issues, and it just won’t stay running.

This error appears a lot too:

SignalR exception thrown by Task: System.AggregateException: One or more errors occurred. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Net.HttpListenerResponse.SerializeHeaders(HTTP_RESPONSE_HEADERS& headers, Boolean isWebSocketHandshake)
   at System.Net.HttpListenerResponse.SendHeaders(HTTP_DATA_CHUNK* pDataChunk, HttpResponseStreamAsyncResult asyncResult, HTTP_FLAGS flags, Boolean isWebSocketHandshake)
   at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Owin\ServerResponse.cs:line 50
   at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.<>c.<.ctor>b__0_0(ArraySegment`1 data, Object state) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:line 12
   at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter.ChunkedWriter.Flush(Byte[] byteBuffer, Boolean flushEncoder) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:line 182
   at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter.ChunkedWriter.Flush(Boolean flushEncoder) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:line 163
   at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter.ChunkedWriter.Write(ArraySegment`1 data) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:line 149
   at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.Write(ArraySegment`1 data) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:line 31
   at Microsoft.AspNet.SignalR.Transports.PersistentResponse.WriteMessages(TextWriter writer, JsonTextWriter jsonWriter) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:line 163
   at Microsoft.AspNet.SignalR.Transports.PersistentResponse.Microsoft.AspNet.SignalR.Json.IJsonWritable.WriteJson(TextWriter writer) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:line 131
   at Microsoft.AspNet.SignalR.Json.JsonNetSerializer.Serialize(Object value, TextWriter writer) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Json\JsonNetSerializer.cs:line 61
   at NzbDrone.SignalR.Serializer.Serialize(Object value, TextWriter writer) in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.SignalR\Serializer.cs:line 20
   at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.PerformSend(Object state) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:line 315
   at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.<>c.<Send>b__43_0(Object state) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:line 157
   at Microsoft.AspNet.SignalR.Infrastructure.TaskQueue.<Enqueue>b__14_0(Func`2 next, Object nextState) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs:line 85
   at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod[T1,T2](Func`3 func, T1 arg1, T2 arg2) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:line 764
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Net.HttpListenerResponse.SerializeHeaders(HTTP_RESPONSE_HEADERS& headers, Boolean isWebSocketHandshake)
   at System.Net.HttpListenerResponse.SendHeaders(HTTP_DATA_CHUNK* pDataChunk, HttpResponseStreamAsyncResult asyncResult, HTTP_FLAGS flags, Boolean isWebSocketHandshake)
   at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Owin\ServerResponse.cs:line 50
   at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.<>c.<.ctor>b__0_0(ArraySegment`1 data, Object state) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:line 12
   at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter.ChunkedWriter.Flush(Byte[] byteBuffer, Boolean flushEncoder) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:line 182
   at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter.ChunkedWriter.Flush(Boolean flushEncoder) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:line 163
   at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter.ChunkedWriter.Write(ArraySegment`1 data) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:line 149
   at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.Write(ArraySegment`1 data) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:line 31
   at Microsoft.AspNet.SignalR.Transports.PersistentResponse.WriteMessages(TextWriter writer, JsonTextWriter jsonWriter) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:line 163
   at Microsoft.AspNet.SignalR.Transports.PersistentResponse.Microsoft.AspNet.SignalR.Json.IJsonWritable.WriteJson(TextWriter writer) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:line 131
   at Microsoft.AspNet.SignalR.Json.JsonNetSerializer.Serialize(Object value, TextWriter writer) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Json\JsonNetSerializer.cs:line 61
   at NzbDrone.SignalR.Serializer.Serialize(Object value, TextWriter writer) in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.SignalR\Serializer.cs:line 20
   at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.PerformSend(Object state) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:line 315
   at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.<>c.<Send>b__43_0(Object state) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:line 157
   at Microsoft.AspNet.SignalR.Infrastructure.TaskQueue.<Enqueue>b__14_0(Func`2 next, Object nextState) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs:line 85
   at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod[T1,T2](Func`3 func, T1 arg1, T2 arg2) in C:\BuildAgent\work\5d7581516c0ee5b3\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:line 764<---

#18

I’d expect something to be logged when Sonarr goes down unless something is killing it completely. We’ve seen anti virus software causes issues, may be worth excluding Sonarr from those scans.

I don’t recall seeing signalR (a 3rd party library Sonarr uses) throwing an exception in that way, especially on Windows.


#19

No anti-virus, and still only program that starts, runs for a short time, then forces close… Not sure what else to do!


#20

Found this in my Windows logs, any ideas?

Source
NzbDrone.exe

Summary
Stopped working

Date
‎29/‎01/‎2019 01:23

Status
Report sent

Description
Faulting Application Path: C:\ProgramData\NzbDrone\bin\NzbDrone.exe

Problem signature
Problem Event Name: APPCRASH
Application Name: NzbDrone.exe
Application Version: 2.0.0.5301
Application Timestamp: 5c48c1db
Fault Module Name: MediaInfo.dll
Fault Module Version: 17.10.0.0
Fault Module Timestamp: 59fb476c
Exception Code: c0000005
Exception Offset: 00109e3a
OS Version: 10.0.17134.2.0.0.256.48
Locale ID: 2057
Additional Information 1: 2beb
Additional Information 2: 2beba6fb4680d73a8c78ca7c24ccdb46
Additional Information 3: 5e24
Additional Information 4: 5e242fda7d18813327ab5a22faeed05c

Extra information about the problem
Bucket ID: 9c6e07e3b2dcd1bc308ec022d4c0027e (1193102207130534526)


#21

Could be that mediainfo is trying to process a file that it can’t process and causing it all to crash, trace logs should show the file being processed before the crash though.