Skip to content
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

https requests from chrome cause radarr to crash with mono System.IO.IOException #6680

Closed
kaysond opened this issue Jan 26, 2018 · 13 comments
Closed
Assignees

Comments

@kaysond
Copy link

kaysond commented Jan 26, 2018

I'm running radarr 0.2.0.910 on Ubuntu 17.10 with mono 5.4.1.7. Connecting to the https server using chrome or internet explorer causes a fatal error. No issue with firefox, though.

See: Radarr/Radarr#2443

  at Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () [0x000e7] in <bb0aa140fcf44b559cb1e44a088e9226>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at Mono.Net.Security.AsyncProtocolRequest+<StartOperation>d__23.MoveNext () [0x0008b] in <bb0aa140fcf44b559cb1e44a088e9226>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at Mono.Net.Security.MobileAuthenticatedStream+<ProcessAuthentication>d__47.MoveNext () [0x00254] in <bb0aa140fcf44b559cb1e44a088e9226>:0
   --- End of inner exception stack trace ---
  at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Threading.Tasks.Task.Wait () [0x00000] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at Mono.Net.Security.MobileAuthenticatedStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Boolean clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00011] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.Security.SslStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Boolean clientCertificateRequired, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00006] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.HttpConnection..ctor (System.Net.Sockets.Socket sock, System.Net.EndPointListener epl, System.Boolean secure, System.Security.Cryptography.X509Certificates.X509Certificate cert) [0x000a1] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.EndPointListener.ProcessAccept (System.Net.Sockets.SocketAsyncEventArgs args) [0x00046] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.EndPointListener.OnAccept (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) [0x00000] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted (System.Net.Sockets.SocketAsyncEventArgs e) [0x0000e] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.Sockets.SocketAsyncEventArgs.Complete () [0x00000] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.Sockets.Socket+<>c.<.cctor>b__307_0 (System.IAsyncResult ares) [0x00092] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Net.Sockets.SocketAsyncResult+<>c.<Complete>b__27_0 (System.Object state) [0x0000b] in <bb0aa140fcf44b559cb1e44a088e9226>:0
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00008] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <e29f59307e5e4e33ab73bb6530764ec9>:0
---> (Inner Exception #0) System.IO.IOException: Remote prematurely closed connection.
  at Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () [0x000e7] in <bb0aa140fcf44b559cb1e44a088e9226>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at Mono.Net.Security.AsyncProtocolRequest+<StartOperation>d__23.MoveNext () [0x0008b] in <bb0aa140fcf44b559cb1e44a088e9226>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <e29f59307e5e4e33ab73bb6530764ec9>:0
  at Mono.Net.Security.MobileAuthenticatedStream+<ProcessAuthentication>d__47.MoveNext () [0x00254] in <bb0aa140fcf44b559cb1e44a088e9226>:0 <---```
@marek-safar
Copy link
Member

Could you provide more details how we can reproduce the issue

/cc @baulig @brendanzagaeski

@kaysond
Copy link
Author

kaysond commented Jan 26, 2018

  1. Install radarr - https://github.com/Radarr/Radarr/wiki/Installation (and its dependencies - I'm using mono 5.4.1.7, curl 7.55.1-1ubuntu2.2, mediainfo 0.7.98-1)
  2. Generate ssl certificates/install them following this guide - https://github.com/Sonarr/Sonarr/wiki/SSL (NB: I'm using certificates from Lets Encrypt, which includes the intermediate cert. I've read this is a potential issue)
  3. Access the radarr config web ui, localhost:7878 by default, enable ssl (General tab, advance settings->shown), and set the port
  4. Access the web ui via chrome/iexplore/firefox

If there's an easy way for me to just test the mono https server implementation, I can do that too.

@kaysond
Copy link
Author

kaysond commented Feb 1, 2018

@baulig @brendanzagaeski @marek-safar
Anything else I can do to debug this?

@baulig
Copy link
Contributor

baulig commented Feb 1, 2018

It is very likely related to installing the custom certificates.

@kaysond
Copy link
Author

kaysond commented Feb 1, 2018

But why would that cause it to fail on some browsers and not others? There must be something different in the ssl request or response...

@baulig
Copy link
Contributor

baulig commented Feb 1, 2018

Oh, I may have been confused - are you using Mono no the server-side and then connect with these browsers?

@baulig baulig self-assigned this Feb 1, 2018
@kaysond
Copy link
Author

kaysond commented Feb 2, 2018

Correct. radarr uses the mono https server. I can connect to it with firefox, but connecting to it with chrome and internet explorer causes a fatal exception

@baulig
Copy link
Contributor

baulig commented Feb 2, 2018

Very interesting. I'll have a look at this next week.

@kaysond
Copy link
Author

kaysond commented Feb 27, 2018

FYI: This issue still exists as of 5.8.0.127. Tried checking 5.10, but it breaks radarr in a different way that has yet to be resolved, so I had to roll back.

@marek-safar
Copy link
Member

@kaysond could you include the description how it breaks with 5.10

@kaysond
Copy link
Author

kaysond commented Mar 9, 2018

@marek-safar It was an issue with a particular version of NLog, apparently. It's been fixed: Radarr/Radarr#2585

@kaysond
Copy link
Author

kaysond commented Mar 9, 2018

Haven't gotten around to checking the ssl issue on 5.10 yet

@kaysond
Copy link
Author

kaysond commented Mar 9, 2018

Issue seems to be resolved with 5.10.

Tested on chrome 64 on android and ie on win10

@kaysond kaysond closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants