New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonarr crashes with mono 5.0.0 #1928

Closed
smmalis37 opened this Issue May 15, 2017 · 32 comments

Comments

Projects
None yet
@smmalis37
Contributor

smmalis37 commented May 15, 2017

After leaving sonarr running for a few minutes on mono 5, it crashes and the core gets dumped. Logs are:
dump.txt. This appears to be a segfault inside mono, so I don't think it's a sonarr issue, but somehow jackett isn't hitting this issue despite also making https connections.

@fryfrog

This comment has been minimized.

Show comment
Hide comment
@fryfrog

fryfrog commented May 15, 2017

The fix is in https://www.reddit.com/r/sonarr/comments/6b3ifc/sonarrs_crashing_because_of_something_to_do_with/

Right now, MONO_TLS_PROVIDER=legacy is needed.

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37

smmalis37 May 18, 2017

Contributor

Here is a trace log of me causing the crash on purpose.
sonarr.trace.txt

Contributor

smmalis37 commented May 18, 2017

Here is a trace log of me causing the crash on purpose.
sonarr.trace.txt

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37

smmalis37 May 18, 2017

Contributor

Here's some potentially more useful trace output, and the stuff mono dumped when it died
output.txt

Contributor

smmalis37 commented May 18, 2017

Here's some potentially more useful trace output, and the stuff mono dumped when it died
output.txt

@mescon

This comment has been minimized.

Show comment
Hide comment
@mescon

mescon May 28, 2017

I have the same problem. I did the MONO_TLS_PROVIDER thing... hopefully things don't crash anymore.

mescon commented May 28, 2017

I have the same problem. I did the MONO_TLS_PROVIDER thing... hopefully things don't crash anymore.

@shpankey

This comment has been minimized.

Show comment
Hide comment
@shpankey

shpankey May 29, 2017

Mono ver 5.0.1.1 is out, have you tried it?

shpankey commented May 29, 2017

Mono ver 5.0.1.1 is out, have you tried it?

@mescon

This comment has been minimized.

Show comment
Hide comment
@mescon

mescon May 29, 2017

Yes, that's what I'm running.

Output of mono --version is the following:

Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 09:16:53 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)

mescon commented May 29, 2017

Yes, that's what I'm running.

Output of mono --version is the following:

Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 09:16:53 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)
@thezoggy

This comment has been minimized.

Show comment
Hide comment
@thezoggy

thezoggy Jun 25, 2017

should update sonarr upstart on wiki to include mono 5.x fix
https://github.com/Sonarr/Sonarr/wiki/Autostart-on-Linux
exec env MONO_TLS_PROVIDER=legacy mono --debug $DIR/NzbDrone.exe

thezoggy commented Jun 25, 2017

should update sonarr upstart on wiki to include mono 5.x fix
https://github.com/Sonarr/Sonarr/wiki/Autostart-on-Linux
exec env MONO_TLS_PROVIDER=legacy mono --debug $DIR/NzbDrone.exe

@Taloth

This comment has been minimized.

Show comment
Hide comment
@Taloth

Taloth Jun 25, 2017

Member

Nope, coz that's just a workaround. I just haven't gotten the time yet to spin up an VM to repro.

We had a user do some test with a standalone app, which seemed to work, so it's likely something in Sonarr.

Member

Taloth commented Jun 25, 2017

Nope, coz that's just a workaround. I just haven't gotten the time yet to spin up an VM to repro.

We had a user do some test with a standalone app, which seemed to work, so it's likely something in Sonarr.

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37

smmalis37 Jul 7, 2017

Contributor

After much effort Taloth managed to create a simple program that repros this issue.
test.txt

I have filed this issue since it seems to be a mono bug.

Contributor

smmalis37 commented Jul 7, 2017

After much effort Taloth managed to create a simple program that repros this issue.
test.txt

I have filed this issue since it seems to be a mono bug.

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37
Contributor

smmalis37 commented Jul 7, 2017

@KarmaPoliceT2

This comment has been minimized.

Show comment
Hide comment
@KarmaPoliceT2

KarmaPoliceT2 Jul 9, 2017

Is this resolved in the July 4th update (4855)

From update log: "Support for Mono 5.x with the newer BoringTLS provider."

KarmaPoliceT2 commented Jul 9, 2017

Is this resolved in the July 4th update (4855)

From update log: "Support for Mono 5.x with the newer BoringTLS provider."

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37

smmalis37 Jul 9, 2017

Contributor

Sadly no, we thought that had fixed it but further testing revealed it hadn't.

Contributor

smmalis37 commented Jul 9, 2017

Sadly no, we thought that had fixed it but further testing revealed it hadn't.

@Mahmoud87

This comment has been minimized.

Show comment
Hide comment
@Mahmoud87

Mahmoud87 Jul 10, 2017

@smmalis37 I agree with ya mate, I thought I should get rid of the MONO_TLS_PROVIDER=legacy after seeing Sonarr broadcasting a message saying "Sonarr now supports Mono 5.x with btls enabled, consider removing MONO_TLS_PROVIDER=legacy option" and deleted this from my systemd straight away couple of indexers stopped working, so I had to added it again and they worked perfectly fine.

Mahmoud87 commented Jul 10, 2017

@smmalis37 I agree with ya mate, I thought I should get rid of the MONO_TLS_PROVIDER=legacy after seeing Sonarr broadcasting a message saying "Sonarr now supports Mono 5.x with btls enabled, consider removing MONO_TLS_PROVIDER=legacy option" and deleted this from my systemd straight away couple of indexers stopped working, so I had to added it again and they worked perfectly fine.

@Taloth

This comment has been minimized.

Show comment
Hide comment
@Taloth

Taloth Jul 10, 2017

Member

That's my fault, I tested it in an ArchLinux vm which original crashes quickly, and after the fix didn't appear to crash anymore. Wasn't till later that we found out it still crashed in certain cases, only later.
Yet it doesn't crash in Ubuntu, afaik.

Member

Taloth commented Jul 10, 2017

That's my fault, I tested it in an ArchLinux vm which original crashes quickly, and after the fix didn't appear to crash anymore. Wasn't till later that we found out it still crashed in certain cases, only later.
Yet it doesn't crash in Ubuntu, afaik.

@shocker2

This comment has been minimized.

Show comment
Hide comment
@shocker2

shocker2 Jul 24, 2017

I can confirm that is not working without MONO_TLS_PROVIDER=legacy and the issue is not fixed
CentOS v7.3.1611 x64
Mono v5.0.1.1
Sonarr v2.0.0.4881

shocker2 commented Jul 24, 2017

I can confirm that is not working without MONO_TLS_PROVIDER=legacy and the issue is not fixed
CentOS v7.3.1611 x64
Mono v5.0.1.1
Sonarr v2.0.0.4881

@Firemad03

This comment has been minimized.

Show comment
Hide comment
@Firemad03

Firemad03 Jul 29, 2017

#2078 I got this problem on Debian.

Firemad03 commented Jul 29, 2017

#2078 I got this problem on Debian.

@Firemad03

This comment has been minimized.

Show comment
Hide comment
@Firemad03

Firemad03 Jul 29, 2017

Environment=MONO_TLS_PROVIDER=legacy in systemd doesn't work on Debian 9.1. Don't know why.

#
# Systemd unit file for sonarr
#

[Unit]
Description=Sonarr Daemon
After=syslog.target network.target

[Service]
User=root
Group=root
Environment=MONO_TLS_PROVIDER=legacy
Type=simple
ExecStart=/usr/bin/mono --debug /appz/NzbDrone/NzbDrone.exe --nobrowser
TimeoutStopSec=20
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target

Firemad03 commented Jul 29, 2017

Environment=MONO_TLS_PROVIDER=legacy in systemd doesn't work on Debian 9.1. Don't know why.

#
# Systemd unit file for sonarr
#

[Unit]
Description=Sonarr Daemon
After=syslog.target network.target

[Service]
User=root
Group=root
Environment=MONO_TLS_PROVIDER=legacy
Type=simple
ExecStart=/usr/bin/mono --debug /appz/NzbDrone/NzbDrone.exe --nobrowser
TimeoutStopSec=20
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target
@Firemad03

This comment has been minimized.

Show comment
Hide comment
@Firemad03

Firemad03 Jul 29, 2017

Strange that I got this bug and I don't have Mono 5, here is my mono --version

Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen

Firemad03 commented Jul 29, 2017

Strange that I got this bug and I don't have Mono 5, here is my mono --version

Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen
@markus101

This comment has been minimized.

Show comment
Hide comment
@markus101

markus101 Jul 29, 2017

Member

It's not the same issue then. It only affects mono 5.0 (by default) or 4.8 if you opted to use the new TLS provider. Since you're not using either of those it's not the same issue and the workaround won't work. Please open a thread on the forums for support.

Member

markus101 commented Jul 29, 2017

It's not the same issue then. It only affects mono 5.0 (by default) or 4.8 if you opted to use the new TLS provider. Since you're not using either of those it's not the same issue and the workaround won't work. Please open a thread on the forums for support.

@Firemad03

This comment has been minimized.

Show comment
Hide comment
@Firemad03

Firemad03 Jul 29, 2017

Ok I'll open a thread on the forums then.

I upgraded to mono 5 and I got the same problem and the environment variable didn't work on Debian.

My indexer is nzbhydra if it's help you out to find something in the meantime

Firemad03 commented Jul 29, 2017

Ok I'll open a thread on the forums then.

I upgraded to mono 5 and I got the same problem and the environment variable didn't work on Debian.

My indexer is nzbhydra if it's help you out to find something in the meantime

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37

smmalis37 Aug 21, 2017

Contributor

This appears to be fixed in mono/mono@e6e0fb8. Testing locally with a nightly has no segfaults.

Contributor

smmalis37 commented Aug 21, 2017

This appears to be fixed in mono/mono@e6e0fb8. Testing locally with a nightly has no segfaults.

@kaso17

This comment has been minimized.

Show comment
Hide comment
@kaso17

kaso17 Nov 14, 2017

Contributor

Can confirm the fix too. Working fine for me since the mono-5.4.0.167 release.

Contributor

kaso17 commented Nov 14, 2017

Can confirm the fix too. Working fine for me since the mono-5.4.0.167 release.

@rradar

This comment has been minimized.

Show comment
Hide comment
@rradar

rradar Dec 17, 2017

Can't confirm it working. But the opposite 👎 Same applies to radar btw... hard times

Sonarr Version: 2.0.0.5085 (latest stable)
Mono Version: 5.4.1.6 (latest stable)
OS Version: Debian 8.10, kernel 4.14.4-sunxi64 (arm64)

rradar commented Dec 17, 2017

Can't confirm it working. But the opposite 👎 Same applies to radar btw... hard times

Sonarr Version: 2.0.0.5085 (latest stable)
Mono Version: 5.4.1.6 (latest stable)
OS Version: Debian 8.10, kernel 4.14.4-sunxi64 (arm64)

@justinhelmer

This comment has been minimized.

Show comment
Hide comment
@justinhelmer

justinhelmer Dec 18, 2017

Right there with you my friend. Same exact versions:

Sonarr Version: 2.0.0.5085 (latest stable)
Mono Version: 5.4.1.6 (latest stable)

EDIT:

[v2.0.0.5085] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
  at System.Net.WebConnection.BeginWrite (System.Net.HttpWebRequest request, System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback cb, System.Object state) [0x0002b] in <50d80b08c1a5449282b22aedf03ce925>:0
  at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback cb, System.Object state) [0x00270] in <50d80b08c1a5449282b22aedf03ce925>:0
  at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00007] in <50d80b08c1a5449282b22aedf03ce925>:0
  at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000d2] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:59
  at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000b5] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:53
  at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\HttpClient.cs:119
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00000] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\HttpClient.cs:55
  at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.ProcessRequest (NzbDrone.Common.Http.HttpRequestBuilder requestBuilder, NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdSettings settings) [0x0001d] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:178
  at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.DownloadNzb (System.Byte[] nzbData, System.String filename, System.String category, System.Int32 priority, NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdSettings settings) [0x00048] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:46
  at NzbDrone.Core.Download.Clients.Sabnzbd.Sabnzbd.AddFromNzbFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String filename, System.Byte[] fileContent) [0x0002d] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\Clients\Sabnzbd\Sabnzbd.cs:41
  at NzbDrone.Core.Download.UsenetClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00179] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\UsenetClientBase.cs:79
  at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00175] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\DownloadService.cs:69
  at NzbDrone.Api.Indexers.ReleaseModule.DownloadRelease (NzbDrone.Api.Indexers.ReleaseResource release) [0x0002d] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Api\Indexers\ReleaseModule.cs:67
  at NzbDrone.Api.Indexers.ReleaseModule.<.ctor>b__7_0 (System.Object x) [0x00000] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Api\Indexers\ReleaseModule.cs:46
  at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0

justinhelmer commented Dec 18, 2017

Right there with you my friend. Same exact versions:

Sonarr Version: 2.0.0.5085 (latest stable)
Mono Version: 5.4.1.6 (latest stable)

EDIT:

[v2.0.0.5085] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
  at System.Net.WebConnection.BeginWrite (System.Net.HttpWebRequest request, System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback cb, System.Object state) [0x0002b] in <50d80b08c1a5449282b22aedf03ce925>:0
  at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback cb, System.Object state) [0x00270] in <50d80b08c1a5449282b22aedf03ce925>:0
  at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00007] in <50d80b08c1a5449282b22aedf03ce925>:0
  at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000d2] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:59
  at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000b5] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\Dispatchers\FallbackHttpDispatcher.cs:53
  at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\HttpClient.cs:119
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00000] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Common\Http\HttpClient.cs:55
  at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.ProcessRequest (NzbDrone.Common.Http.HttpRequestBuilder requestBuilder, NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdSettings settings) [0x0001d] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:178
  at NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdProxy.DownloadNzb (System.Byte[] nzbData, System.String filename, System.String category, System.Int32 priority, NzbDrone.Core.Download.Clients.Sabnzbd.SabnzbdSettings settings) [0x00048] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\Clients\Sabnzbd\SabnzbdProxy.cs:46
  at NzbDrone.Core.Download.Clients.Sabnzbd.Sabnzbd.AddFromNzbFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String filename, System.Byte[] fileContent) [0x0002d] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\Clients\Sabnzbd\Sabnzbd.cs:41
  at NzbDrone.Core.Download.UsenetClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00179] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\UsenetClientBase.cs:79
  at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00175] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Core\Download\DownloadService.cs:69
  at NzbDrone.Api.Indexers.ReleaseModule.DownloadRelease (NzbDrone.Api.Indexers.ReleaseResource release) [0x0002d] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Api\Indexers\ReleaseModule.cs:67
  at NzbDrone.Api.Indexers.ReleaseModule.<.ctor>b__7_0 (System.Object x) [0x00000] in M:\BuildAgent\work\3a352f0853732683\src\NzbDrone.Api\Indexers\ReleaseModule.cs:46
  at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
  at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0
@kaso17

This comment has been minimized.

Show comment
Hide comment
@kaso17

kaso17 Dec 18, 2017

Contributor

@rradar please provide your error log, for arm64 platforms I'm aware of an arm64 specific issues causing failed HTTP requests to servers when elliptic curve TLS is used (depends on the certificate too).
@justinhelmer is the error only occurring with nzb downloads or with torrent downloads too?

Contributor

kaso17 commented Dec 18, 2017

@rradar please provide your error log, for arm64 platforms I'm aware of an arm64 specific issues causing failed HTTP requests to servers when elliptic curve TLS is used (depends on the certificate too).
@justinhelmer is the error only occurring with nzb downloads or with torrent downloads too?

@justinhelmer

This comment has been minimized.

Show comment
Hide comment
@justinhelmer

justinhelmer Dec 18, 2017

justinhelmer commented Dec 18, 2017

@akujinnoninjin

This comment has been minimized.

Show comment
Hide comment
@akujinnoninjin

akujinnoninjin Dec 23, 2017

Another case here - here's some of what I'd noticed:

  • It only happens with NZBs, and has affected multiple clients - I've tested both SAB and NZBget.
  • I'm hooking into a remote seedbox, so it's not limited to local setup conflicts
  • It's persisted across different hardware, fresh installs, and different host OSs (I'm running as a VM)
  • That I know of, I haven't encountered it in Radarr yet, but it's used far less often.
  • It can affect multiple releases for any one episode, and it seems to be able to affect any series.
  • The error doesn't necessarily mean it doesn't get sent to the download client; several times now I've had Sonarr throw the error, but NZBget pulling something down.
  • That makes me believe it's related to another issue: intermittently Sonarr will download multiple releases of the same episode until it runs out of sources/space. It only seems to happen alongside this communication error, and it falls back through quality levels like it's encountering bad releases. I'm guessing a confirmation of the download being started/completed isn't being received.

Mono 5.4.1.6, Sonarr 2.0.0.5085, running in an Ubuntu 16.04 Server based LXC container (PVE kernel 4.13.4-25), NZBget 19.1

Here's the relevant trace log from a release that was just doing it reliably:

17-12-23 15:09:17.2|Trace|HttpClient|Req: [GET] https://api.nzbgeek.info/api?t=get&id=(removed)&apikey=(removed)
17-12-23 15:09:17.2|Trace|ConfigService|Using default config value for 'proxytype' defaultValue:'Http'
17-12-23 15:09:17.2|Trace|ConfigService|Using default config value for 'proxyport' defaultValue:'8080'
17-12-23 15:09:17.2|Trace|ConfigService|Using default config value for 'proxybypasslocaladdresses' defaultValue:'True'
17-12-23 15:09:25.9|Trace|HttpClient|Res: [GET] https://api.nzbgeek.info/api?t=get&id=(removed)&apikey=(removed) 200.OK (8741 ms)
17-12-23 15:09:25.9|Debug|Nzbget|Downloaded nzb for episode '(Removed, no abnormal sequences)' finished (399516 bytes from https://api.nzbgeek.info/api?t=get&id=(removed)&apikey=(removed)
17-12-23 15:09:25.9|Info|Nzbget|Adding report [(Removed, no abnormal sequences)] to the queue.
17-12-23 15:09:25.9|Trace|HttpClient|Req: [POST] http://(removed):24186/jsonrpc: append("(Removed, no abnormal sequences)", [blob 399516 bytes], "Sonarr", 0, false, false, "", 0, "all", [...])
17-12-23 15:09:25.9|Trace|ConfigService|Using default config value for 'proxytype' defaultValue:'Http'
17-12-23 15:09:25.9|Trace|ConfigService|Using default config value for 'proxyport' defaultValue:'8080'
17-12-23 15:09:25.9|Trace|ConfigService|Using default config value for 'proxybypasslocaladdresses' defaultValue:'True'
17-12-23 15:09:30.9|Trace|NzbDroneErrorPipeline|Handling Exception
17-12-23 15:09:30.9|Fatal|NzbDroneErrorPipeline|Request Failed. POST /api/release

[v2.0.0.5085] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.WebConnectionStream.EndWrite (System.IAsyncResult r) [0x00097] in <50d80b08c1a5449282b22aedf03ce925>:0
at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00053] in <50d80b08c1a5449282b22aedf03ce925>:0
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000e1] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000b5] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00000] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.ProcessRequest[T] (NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings, System.String method, System.Object[] parameters) [0x00047] in :0
at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.DownloadNzb (System.Byte[] nzbData, System.String title, System.String category, System.Int32 priority, System.Boolean addpaused, NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings) [0x00032] in :0
at NzbDrone.Core.Download.Clients.Nzbget.Nzbget.AddFromNzbFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String filename, System.Byte[] fileContent) [0x0004a] in :0
at NzbDrone.Core.Download.UsenetClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00179] in :0
at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00175] in :0
at NzbDrone.Api.Indexers.ReleaseModule.DownloadRelease (NzbDrone.Api.Indexers.ReleaseResource release) [0x0002d] in <59c31134724b4d578ad9c86cb9d20b66>:0
at NzbDrone.Api.Indexers.ReleaseModule.<.ctor>b__7_0 (System.Object x) [0x00007] in <59c31134724b4d578ad9c86cb9d20b66>:0
at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
at Nancy.Routing.Route+<>c__DisplayClass4.b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0

17-12-23 15:09:30.9|Trace|Http|Res: 526 [POST] /api/release: 500.InternalServerError (13741 ms)
17-12-23 15:09:30.9|Debug|Api|[POST] /api/release: 500.InternalServerError (13741 ms)

akujinnoninjin commented Dec 23, 2017

Another case here - here's some of what I'd noticed:

  • It only happens with NZBs, and has affected multiple clients - I've tested both SAB and NZBget.
  • I'm hooking into a remote seedbox, so it's not limited to local setup conflicts
  • It's persisted across different hardware, fresh installs, and different host OSs (I'm running as a VM)
  • That I know of, I haven't encountered it in Radarr yet, but it's used far less often.
  • It can affect multiple releases for any one episode, and it seems to be able to affect any series.
  • The error doesn't necessarily mean it doesn't get sent to the download client; several times now I've had Sonarr throw the error, but NZBget pulling something down.
  • That makes me believe it's related to another issue: intermittently Sonarr will download multiple releases of the same episode until it runs out of sources/space. It only seems to happen alongside this communication error, and it falls back through quality levels like it's encountering bad releases. I'm guessing a confirmation of the download being started/completed isn't being received.

Mono 5.4.1.6, Sonarr 2.0.0.5085, running in an Ubuntu 16.04 Server based LXC container (PVE kernel 4.13.4-25), NZBget 19.1

Here's the relevant trace log from a release that was just doing it reliably:

17-12-23 15:09:17.2|Trace|HttpClient|Req: [GET] https://api.nzbgeek.info/api?t=get&id=(removed)&apikey=(removed)
17-12-23 15:09:17.2|Trace|ConfigService|Using default config value for 'proxytype' defaultValue:'Http'
17-12-23 15:09:17.2|Trace|ConfigService|Using default config value for 'proxyport' defaultValue:'8080'
17-12-23 15:09:17.2|Trace|ConfigService|Using default config value for 'proxybypasslocaladdresses' defaultValue:'True'
17-12-23 15:09:25.9|Trace|HttpClient|Res: [GET] https://api.nzbgeek.info/api?t=get&id=(removed)&apikey=(removed) 200.OK (8741 ms)
17-12-23 15:09:25.9|Debug|Nzbget|Downloaded nzb for episode '(Removed, no abnormal sequences)' finished (399516 bytes from https://api.nzbgeek.info/api?t=get&id=(removed)&apikey=(removed)
17-12-23 15:09:25.9|Info|Nzbget|Adding report [(Removed, no abnormal sequences)] to the queue.
17-12-23 15:09:25.9|Trace|HttpClient|Req: [POST] http://(removed):24186/jsonrpc: append("(Removed, no abnormal sequences)", [blob 399516 bytes], "Sonarr", 0, false, false, "", 0, "all", [...])
17-12-23 15:09:25.9|Trace|ConfigService|Using default config value for 'proxytype' defaultValue:'Http'
17-12-23 15:09:25.9|Trace|ConfigService|Using default config value for 'proxyport' defaultValue:'8080'
17-12-23 15:09:25.9|Trace|ConfigService|Using default config value for 'proxybypasslocaladdresses' defaultValue:'True'
17-12-23 15:09:30.9|Trace|NzbDroneErrorPipeline|Handling Exception
17-12-23 15:09:30.9|Fatal|NzbDroneErrorPipeline|Request Failed. POST /api/release

[v2.0.0.5085] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.WebConnectionStream.EndWrite (System.IAsyncResult r) [0x00097] in <50d80b08c1a5449282b22aedf03ce925>:0
at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00053] in <50d80b08c1a5449282b22aedf03ce925>:0
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000e1] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000b5] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Common.Http.HttpClient.ExecuteRequest (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00000] in <28afedda32c5499dab128da6b50bbb86>:0
at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.ProcessRequest[T] (NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings, System.String method, System.Object[] parameters) [0x00047] in :0
at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.DownloadNzb (System.Byte[] nzbData, System.String title, System.String category, System.Int32 priority, System.Boolean addpaused, NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings) [0x00032] in :0
at NzbDrone.Core.Download.Clients.Nzbget.Nzbget.AddFromNzbFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String filename, System.Byte[] fileContent) [0x0004a] in :0
at NzbDrone.Core.Download.UsenetClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00179] in :0
at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00175] in :0
at NzbDrone.Api.Indexers.ReleaseModule.DownloadRelease (NzbDrone.Api.Indexers.ReleaseResource release) [0x0002d] in <59c31134724b4d578ad9c86cb9d20b66>:0
at NzbDrone.Api.Indexers.ReleaseModule.<.ctor>b__7_0 (System.Object x) [0x00007] in <59c31134724b4d578ad9c86cb9d20b66>:0
at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object)
at Nancy.Routing.Route+<>c__DisplayClass4.b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0

17-12-23 15:09:30.9|Trace|Http|Res: 526 [POST] /api/release: 500.InternalServerError (13741 ms)
17-12-23 15:09:30.9|Debug|Api|[POST] /api/release: 500.InternalServerError (13741 ms)

@piejanssens

This comment has been minimized.

Show comment
Hide comment
@piejanssens

piejanssens Jan 5, 2018

I think this is related? https://bugzilla.xamarin.com/show_bug.cgi?id=58641
If so, we should join the discussion on Mono's Bugzilla to get things moving...

Edit: But I should add that the last posts about "Cannot access a disposed object" does not seem to be related to the OP 'segfault' dump. I'm running Sonarr with mono 5.4.1.6 and suffer from the "Cannot access a disposed object", but it's not crashing.

piejanssens commented Jan 5, 2018

I think this is related? https://bugzilla.xamarin.com/show_bug.cgi?id=58641
If so, we should join the discussion on Mono's Bugzilla to get things moving...

Edit: But I should add that the last posts about "Cannot access a disposed object" does not seem to be related to the OP 'segfault' dump. I'm running Sonarr with mono 5.4.1.6 and suffer from the "Cannot access a disposed object", but it's not crashing.

@atytel

This comment has been minimized.

Show comment
Hide comment
@atytel

atytel Jan 7, 2018

What is the status on this, is there a fix?
I'm also experiencing this but my torrents are also affected.

atytel commented Jan 7, 2018

What is the status on this, is there a fix?
I'm also experiencing this but my torrents are also affected.

@piejanssens

This comment has been minimized.

Show comment
Hide comment
@piejanssens

piejanssens Jan 7, 2018

@atytel What are you experiencing exactly? SEGFAULT or "Cannot access a disposed object"?

piejanssens commented Jan 7, 2018

@atytel What are you experiencing exactly? SEGFAULT or "Cannot access a disposed object"?

@smmalis37

This comment has been minimized.

Show comment
Hide comment
@smmalis37

smmalis37 Jan 7, 2018

Contributor

I believe the status is that the segfault I started this issue with is fixed by mono upstream. There may be a new incompatibility between Sonarr and new versions of mono resulting in exceptions. If so, that should be made into a separate isssue. I've tested again and can confirm that if you run a version of mono containing mono/mono@e6e0fb8 then this issue is fixed. Note that certain distros current version of mono might not contain this commit yet.

Contributor

smmalis37 commented Jan 7, 2018

I believe the status is that the segfault I started this issue with is fixed by mono upstream. There may be a new incompatibility between Sonarr and new versions of mono resulting in exceptions. If so, that should be made into a separate isssue. I've tested again and can confirm that if you run a version of mono containing mono/mono@e6e0fb8 then this issue is fixed. Note that certain distros current version of mono might not contain this commit yet.

@BetaLeaf

This comment has been minimized.

Show comment
Hide comment
@BetaLeaf

BetaLeaf Feb 5, 2018

Thanks @fryfrog for #1928 (comment) as this fixed my issue with the following error:

SignalR exception thrown by Task: System.AggregateException: One or more errors occurred. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse'.
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.ResponseBodyStarted () [0x0001a] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.OnResponseBodyStarted (System.Object state) [0x00007] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream+OneTimeCallback.TryInvoke () [0x00019] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.FirstWrite () [0x00000] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00024] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Owin\ServerResponse.cs:50 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter+<>c.<.ctor>b__0_0 (System.ArraySegment`1[T] data, System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:12 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Byte[] byteBuffer, System.Boolean flushEncoder) [0x00027] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:182 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Boolean flushEncoder) [0x00008] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:163 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush () [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:155 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:149 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:31 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.WriteMessages (System.IO.TextWriter writer, Newtonsoft.Json.JsonTextWriter jsonWriter) [0x00063] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:167 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.Microsoft.AspNet.SignalR.Json.IJsonWritable.WriteJson (System.IO.TextWriter writer) [0x000f5] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:131 
  at Microsoft.AspNet.SignalR.Json.JsonNetSerializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0000a] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Json\JsonNetSerializer.cs:61 
  at NzbDrone.SignalR.Serializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0001f] in C:\projects\radarr-usby1\src\NzbDrone.SignalR\Serializer.cs:20 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.PerformSend (System.Object state) [0x00085] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:315 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport+<>c.<Send>b__43_0 (System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:157 
  at Microsoft.AspNet.SignalR.Infrastructure.TaskQueue.<Enqueue>b__14_0 (System.Func`2[T,TResult] next, System.Object nextState) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs:85 
  at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod[T1,T2] (System.Func`3[T1,T2,TResult] func, T1 arg1, T2 arg2) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:764 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse'.
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.ResponseBodyStarted () [0x0001a] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.OnResponseBodyStarted (System.Object state) [0x00007] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream+OneTimeCallback.TryInvoke () [0x00019] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.FirstWrite () [0x00000] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00024] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Owin\ServerResponse.cs:50 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter+<>c.<.ctor>b__0_0 (System.ArraySegment`1[T] data, System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:12 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Byte[] byteBuffer, System.Boolean flushEncoder) [0x00027] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:182 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Boolean flushEncoder) [0x00008] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:163 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush () [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:155 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:149 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:31 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.WriteMessages (System.IO.TextWriter writer, Newtonsoft.Json.JsonTextWriter jsonWriter) [0x00063] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:167 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.Microsoft.AspNet.SignalR.Json.IJsonWritable.WriteJson (System.IO.TextWriter writer) [0x000f5] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:131 
  at Microsoft.AspNet.SignalR.Json.JsonNetSerializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0000a] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Json\JsonNetSerializer.cs:61 
  at NzbDrone.SignalR.Serializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0001f] in C:\projects\radarr-usby1\src\NzbDrone.SignalR\Serializer.cs:20 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.PerformSend (System.Object state) [0x00085] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:315 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport+<>c.<Send>b__43_0 (System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:157 
  at Microsoft.AspNet.SignalR.Infrastructure.TaskQueue.<Enqueue>b__14_0 (System.Func`2[T,TResult] next, System.Object nextState) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs:85 
  at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod[T1,T2] (System.Func`3[T1,T2,TResult] func, T1 arg1, T2 arg2) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:764 <---

BetaLeaf commented Feb 5, 2018

Thanks @fryfrog for #1928 (comment) as this fixed my issue with the following error:

SignalR exception thrown by Task: System.AggregateException: One or more errors occurred. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse'.
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.ResponseBodyStarted () [0x0001a] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.OnResponseBodyStarted (System.Object state) [0x00007] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream+OneTimeCallback.TryInvoke () [0x00019] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.FirstWrite () [0x00000] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00024] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Owin\ServerResponse.cs:50 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter+<>c.<.ctor>b__0_0 (System.ArraySegment`1[T] data, System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:12 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Byte[] byteBuffer, System.Boolean flushEncoder) [0x00027] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:182 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Boolean flushEncoder) [0x00008] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:163 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush () [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:155 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:149 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:31 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.WriteMessages (System.IO.TextWriter writer, Newtonsoft.Json.JsonTextWriter jsonWriter) [0x00063] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:167 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.Microsoft.AspNet.SignalR.Json.IJsonWritable.WriteJson (System.IO.TextWriter writer) [0x000f5] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:131 
  at Microsoft.AspNet.SignalR.Json.JsonNetSerializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0000a] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Json\JsonNetSerializer.cs:61 
  at NzbDrone.SignalR.Serializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0001f] in C:\projects\radarr-usby1\src\NzbDrone.SignalR\Serializer.cs:20 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.PerformSend (System.Object state) [0x00085] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:315 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport+<>c.<Send>b__43_0 (System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:157 
  at Microsoft.AspNet.SignalR.Infrastructure.TaskQueue.<Enqueue>b__14_0 (System.Func`2[T,TResult] next, System.Object nextState) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs:85 
  at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod[T1,T2] (System.Func`3[T1,T2,TResult] func, T1 arg1, T2 arg2) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:764 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse'.
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.ResponseBodyStarted () [0x0001a] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerResponse.OnResponseBodyStarted (System.Object state) [0x00007] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream+OneTimeCallback.TryInvoke () [0x00019] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.FirstWrite () [0x00000] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.Owin.Host.HttpListener.RequestProcessing.ExceptionFilterStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00024] in <208c8ef8a4ba4b878f0e4420d5960bea>:0 
  at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Owin\ServerResponse.cs:50 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter+<>c.<.ctor>b__0_0 (System.ArraySegment`1[T] data, System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:12 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Byte[] byteBuffer, System.Boolean flushEncoder) [0x00027] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:182 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush (System.Boolean flushEncoder) [0x00008] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:163 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Flush () [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:155 
  at Microsoft.AspNet.SignalR.Infrastructure.BufferTextWriter+ChunkedWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BufferTextWriter.cs:149 
  at Microsoft.AspNet.SignalR.Infrastructure.BinaryTextWriter.Write (System.ArraySegment`1[T] data) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\BinaryTextWriter.cs:31 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.WriteMessages (System.IO.TextWriter writer, Newtonsoft.Json.JsonTextWriter jsonWriter) [0x00063] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:167 
  at Microsoft.AspNet.SignalR.Transports.PersistentResponse.Microsoft.AspNet.SignalR.Json.IJsonWritable.WriteJson (System.IO.TextWriter writer) [0x000f5] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\PersistentResponse.cs:131 
  at Microsoft.AspNet.SignalR.Json.JsonNetSerializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0000a] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Json\JsonNetSerializer.cs:61 
  at NzbDrone.SignalR.Serializer.Serialize (System.Object value, System.IO.TextWriter writer) [0x0001f] in C:\projects\radarr-usby1\src\NzbDrone.SignalR\Serializer.cs:20 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport.PerformSend (System.Object state) [0x00085] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:315 
  at Microsoft.AspNet.SignalR.Transports.LongPollingTransport+<>c.<Send>b__43_0 (System.Object state) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Transports\LongPollingTransport.cs:157 
  at Microsoft.AspNet.SignalR.Infrastructure.TaskQueue.<Enqueue>b__14_0 (System.Func`2[T,TResult] next, System.Object nextState) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\Infrastructure\TaskQueue.cs:85 
  at Microsoft.AspNet.SignalR.TaskAsyncHelper.FromMethod[T1,T2] (System.Func`3[T1,T2,TResult] func, T1 arg1, T2 arg2) [0x00000] in C:\projects\radarr-usby1\src\Microsoft.AspNet.SignalR.Core\TaskAsyncHelper.cs:764 <---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment