{"action":"created","issue":{"url":"https://api.github.com/repos/MediaBrowser/Emby/issues/1954","repository_url":"https://api.github.com/repos/MediaBrowser/Emby","labels_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/1954/labels{/name}","comments_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/1954/comments","events_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/1954/events","html_url":"https://github.com/MediaBrowser/Emby/issues/1954","id":166168475,"number":1954,"title":"Websocket listener crash on Ubuntu 14.04","user":{"login":"neagix","id":3188699,"avatar_url":"https://avatars.githubusercontent.com/u/3188699?v=3","gravatar_id":"","url":"https://api.github.com/users/neagix","html_url":"https://github.com/neagix","followers_url":"https://api.github.com/users/neagix/followers","following_url":"https://api.github.com/users/neagix/following{/other_user}","gists_url":"https://api.github.com/users/neagix/gists{/gist_id}","starred_url":"https://api.github.com/users/neagix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neagix/subscriptions","organizations_url":"https://api.github.com/users/neagix/orgs","repos_url":"https://api.github.com/users/neagix/repos","events_url":"https://api.github.com/users/neagix/events{/privacy}","received_events_url":"https://api.github.com/users/neagix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-18T19:05:24Z","updated_at":"2016-07-18T23:14:43Z","closed_at":null,"body":"After about 1 minute of streaming this happens:\r\n```\r\nUnhandledException\r\nObject reference not set to an instance of an object\r\nSystem.NullReferenceException\r\n  at System.Threading.Tasks.TaskContinuation.ContinuationStatusCheck (TaskContinuationOptions kind) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.TaskContinuation.Execute () [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.ContinueWith (IContinuation continuation, Boolean canExecuteInline) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.ContinueWithCore (System.Threading.Tasks.Task continuation, TaskContinuationOptions options, System.Threading.Tasks.TaskScheduler scheduler) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task`1[System.Threading.Tasks.Task].ContinueWith (System.Action`2 continuationAction, System.Object state, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, System.Threading.Tasks.TaskScheduler scheduler) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.TaskExtensionsImpl.Unwrap (System.Threading.Tasks.Task`1 task) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.Run (System.Func`1 function, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.Run (System.Func`1 function) [0x00000] in <filename unknown>:0 \r\n  at MediaBrowser.Server.Implementations.ServerManager.ServerManager+<ProcessWebSocketMessageReceived>c__async0+<ProcessWebSocketMessageReceived>c__AnonStorey15.<>m__0 (IWebSocketListener i) [0x00000] in <filename unknown>:0 \r\n  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[MediaBrowser.Controller.Net.IWebSocketListener,System.Threading.Tasks.Task].MoveNext () [0x00000] in <filename unknown>:0 \r\n  at System.Collections.Generic.List`1[System.Threading.Tasks.Task].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0 \r\n  at System.Collections.Generic.List`1[System.Threading.Tasks.Task]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0 \r\n  at System.Threading.Tasks.Task.WhenAll (IEnumerable`1 tasks) [0x00000] in <filename unknown>:0 \r\n  at MediaBrowser.Server.Implementations.ServerManager.ServerManager+<ProcessWebSocketMessageReceived>c__async0.MoveNext () [0x00000] in <filename unknown>:0 \r\n```\r\n\r\nI have not dived in the related code yet, is this a known issue? Seems like a websocket assumption fails somewhere.\r\n\r\nCompiled with mono 3.2.8 on Ubuntu 14.04"},"comment":{"url":"https://api.github.com/repos/MediaBrowser/Emby/issues/comments/233487003","html_url":"https://github.com/MediaBrowser/Emby/issues/1954#issuecomment-233487003","issue_url":"https://api.github.com/repos/MediaBrowser/Emby/issues/1954","id":233487003,"user":{"login":"neagix","id":3188699,"avatar_url":"https://avatars.githubusercontent.com/u/3188699?v=3","gravatar_id":"","url":"https://api.github.com/users/neagix","html_url":"https://github.com/neagix","followers_url":"https://api.github.com/users/neagix/followers","following_url":"https://api.github.com/users/neagix/following{/other_user}","gists_url":"https://api.github.com/users/neagix/gists{/gist_id}","starred_url":"https://api.github.com/users/neagix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neagix/subscriptions","organizations_url":"https://api.github.com/users/neagix/orgs","repos_url":"https://api.github.com/users/neagix/repos","events_url":"https://api.github.com/users/neagix/events{/privacy}","received_events_url":"https://api.github.com/users/neagix/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T23:14:43Z","updated_at":"2016-07-18T23:14:43Z","body":"I checked transcoding logs (when using transcoding, not the case with x264), no issues there.\r\nHowever in the server log:\r\n```\r\n2016-07-19 01:09:54.4485 Error App: Error streaming media. The client has most likely disconnected or transcoding has failed.\r\n\t*** Error Report ***\r\n\tVersion: 3.0.5986.0\r\n\tCommand line: /home/neagix/src/emby/MediaBrowser.Server.Mono.exe\r\n\tOperating system: Unix 3.8.13.30\r\n\tProcessor count: 4\r\n\t64-Bit OS: False\r\n\t64-Bit Process: False\r\n\tProgram data path: /home/neagix/src/emby/ProgramData-Server\r\n\tMono: 4.4.1 (Nightly 4.4.1.0/4747417 Wed Jun 22 11:38:12 UTC 2016)\r\n\tApplication Path: /home/neagix/src/emby/MediaBrowser.Server.Mono.exe\r\n\tOne or more errors occurred.\r\n\tSystem.AggregateException\r\n\t  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) <0xb4f77220 + 0x0062c> in <filename unknown>:0 \r\n\t  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, Int32 millisecondsTimeout) <0xb4f771c4 + 0x00027> in <filename unknown>:0 \r\n\t  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) <0xb4f7700c + 0x00017> in <filename unknown>:0 \r\n\t  at MediaBrowser.Api.Playback.Progressive.ProgressiveStreamWriter.WriteToInternal (System.IO.Stream responseStream) <0xaf68ecc8 + 0x000bb> in <filename unknown>:0 \r\n\tInnerException: System.IO.IOException\r\n\tUnable to write data to the transport connection: The socket has been shut down.\r\n\t  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) <0xafbbc958 + 0x0027c> in <filename unknown>:0 \r\n\t  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) <0xafbbc8a8 + 0x0008b> in <filename unknown>:0 \r\n\t  at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) <0xafbbb0c8 + 0x0027b> in <filename unknown>:0 \r\n\t  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier.CopyToInternal (System.IO.Stream source, System.IO.Stream destination, Int32 bufferSize) <0xaf68f888 + 0x00073> in <filename unknown>:0 \r\n\t  at MediaBrowser.Api.Playback.Progressive.ProgressiveFileCopier+<StreamFile>c__async0.MoveNext () <0xaf68f2f8 + 0x00143> in <filename unknown>:0 \r\n\tInnerException: System.Net.Sockets.SocketException\r\n\tThe socket has been shut down\r\n\t  at System.Net.Sockets.Socket.Send (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) <0xafbbceb8 + 0x000c4> in <filename unknown>:0 \r\n\t  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) <0xafbbc958 + 0x000b7> in <filename unknown>:0 \r\n\t\r\n2016-07-19 01:09:54.4516 Error HttpServer: Error in HttpListenerResponseWrapper: Unable to write data to the transport connection: The socket has been shut down.\r\n\t*** Error Report ***\r\n\tVersion: 3.0.5986.0\r\n\tCommand line: /home/neagix/src/emby/MediaBrowser.Server.Mono.exe\r\n\tOperating system: Unix 3.8.13.30\r\n\tProcessor count: 4\r\n\t64-Bit OS: False\r\n\t64-Bit Process: False\r\n\tProgram data path: /home/neagix/src/emby/ProgramData-Server\r\n\tMono: 4.4.1 (Nightly 4.4.1.0/4747417 Wed Jun 22 11:38:12 UTC 2016)\r\n\tApplication Path: /home/neagix/src/emby/MediaBrowser.Server.Mono.exe\r\n\tUnable to write data to the transport connection: The socket has been shut down.\r\n\tSystem.IO.IOException\r\n\t  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) <0xafbbc958 + 0x0027c> in <filename unknown>:0 \r\n\t  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) <0xafbbc8a8 + 0x0008b> in <filename unknown>:0 \r\n\t  at SocketHttpListener.Net.ResponseStream.Close () <0xafbbd3e0 + 0x0017f> in <filename unknown>:0 \r\n\t  at MediaBrowser.Server.Implementations.HttpServer.SocketSharp.Extensions.CloseOutputStream (SocketHttpListener.Net.HttpListenerResponse response, ILogger logger) <0xafbbd248 + 0x00053> in <filename unknown>:0 \r\n\tInnerException: System.Net.Sockets.SocketException\r\n\tThe socket has been shut down\r\n\t  at System.Net.Sockets.Socket.Send (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) <0xafbbceb8 + 0x000c4> in <filename unknown>:0 \r\n\t  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) <0xafbbc958 + 0x000b7> in <filename unknown>:0 \r\n```\r\n\r\nSo I guess the websockets don't stay open and this causes the 500 later on?"}}
{"actor":{"display_login":"neagix"}}