Some unhandled exceptions?

In the unlikely ;) event you encounter a bug, tell us here
Post Reply
Caesium
Posts: 328
Joined: Fri Dec 16, 2011 11:40 pm

Some unhandled exceptions?

Post by Caesium » Thu Nov 27, 2014 9:17 pm

dot-i, do these exceptions mean anything to you? I noticed that a few recordings got missed last night and the log is full of these:

Code: Select all

2014-11-26 23:41:42.2373 [Error][307]: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: There were not enough free threads in the ThreadPool to complete the operation.
   at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
   at System.Net.Http.HttpClientHandler.StartGettingRequestStream(RequestState state)
   at System.Net.Http.HttpClientHandler.PrepareAndStartContentUpload(RequestState state)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.ExecuteRequest(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.Execute(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.CardHostApi.Initialize(Card card, List`1 settings, List`1 allDevices)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.EnsureCardHostRunning(List`1 allDetectedDevices)
---> (Inner Exception #0) System.InvalidOperationException: There were not enough free threads in the ThreadPool to complete the operation.
   at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
   at System.Net.Http.HttpClientHandler.StartGettingRequestStream(RequestState state)
   at System.Net.Http.HttpClientHandler.PrepareAndStartContentUpload(RequestState state)<---

2014-11-26 23:41:42.9773 [Error][334]: Failed to start card host for card #1 'TBS 6285 DVBT/T2 Tuner A' (@device:pnp:\\?\pci#ven_1131&dev_7160&subsys_00016285&rev_02#4&3834d97&0&0008#{71985f48-1ca1-11d3-9cc8-00c04f7971e0}\{3ff44ee5-8547-402a-94f3-d44700020000})
2014-11-26 23:41:42.9773 [Error][334]: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: There were not enough free threads in the ThreadPool to complete the operation.
   at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
   at System.Net.Http.HttpClientHandler.StartGettingRequestStream(RequestState state)
   at System.Net.Http.HttpClientHandler.PrepareAndStartContentUpload(RequestState state)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.ExecuteRequest(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.Execute(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.CardHostApi.Initialize(Card card, List`1 settings, List`1 allDevices)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.EnsureCardHostRunning(List`1 allDetectedDevices)
---> (Inner Exception #0) System.InvalidOperationException: There were not enough free threads in the ThreadPool to complete the operation.
   at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
   at System.Net.Http.HttpClientHandler.StartGettingRequestStream(RequestState state)
   at System.Net.Http.HttpClientHandler.PrepareAndStartContentUpload(RequestState state)<---
I couldn't restart the recorder service, I ended up having to reboot. Maybe a card was wedged or something? :( Is it possible to detect these and email or something, so I know when I need to reboot? :/

Caesium
Posts: 328
Joined: Fri Dec 16, 2011 11:40 pm

Re: Some unhandled exceptions?

Post by Caesium » Thu Nov 27, 2014 9:21 pm

Also spotted in the Card-1.log, many repeats of these until I rebooted it..

Code: Select all

2014-11-26 23:27:56.9840 [Error][1]: System.IO.IOException: The process cannot access the file 'C:\ProgramData\ARGUS TV\Services\Card-0A85A7667D4E5F1C3EB712BC69F355E2.txt' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at ArgusTV.Recorder.CardHost.Program.Main(String[] args)

Caesium
Posts: 328
Joined: Fri Dec 16, 2011 11:40 pm

Re: Some unhandled exceptions?

Post by Caesium » Thu Nov 27, 2014 9:36 pm

And this seems to be where it started:

Code: Select all

2014-11-25 19:26:59.6655 [Info ][Record]: Starting recording on card #1, service BBC One HD to '\\NAS\recording\EastEnders\EastEnders_BBC One HD_2014-11-25_19-30.ts'
2014-11-25 19:28:59.7017 [Error][Record]: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.ExecuteRequest(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.Execute[T](HttpRequestMessage request, Boolean logError)
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---

2014-11-25 19:28:59.7087 [Error][Record]: Exception: ArgusTV.Recorder.DataContracts.ArgusRecorderUnexpectedErrorException: An unexpected error occured.
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.Execute[T](HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.CardHostApi.StartRecording(Service service, Satellite satellite, String filePath, Int32 maximumDurationSeconds, Boolean skipDecoding, CardRecordingStream& cardStream)
   at ArgusTV.Recorder.Business.Components.CardController.StartRecording(Guid cardId, Service service, Satellite satellite, String filePath, Int32 maximumDurationSeconds, Boolean skipDecoding, CardRecordingStream& cardStream)
2014-11-25 19:28:59.7087 [Warn ][Record]: Failed to start recording on card #1
2014-11-25 19:28:59.7087 [Info ][Record]: Restarting card service for card #1 'TBS 6285 DVBT/T2 Tuner A' due to fatal error
2014-11-25 19:31:42.7718 [Info ][Heartbeat]: Restarting card service for card #1 'TBS 6285 DVBT/T2 Tuner A' due to missing heartbeat
2014-11-25 19:53:05.3708 [Error][Record]: Failed to start card host for card #1 'TBS 6285 DVBT/T2 Tuner A' (@device:pnp:\\?\pci#ven_1131&dev_7160&subsys_00016285&rev_02#4&3834d97&0&0008#{71985f48-1ca1-11d3-9cc8-00c04f7971e0}\{3ff44ee5-8547-402a-94f3-d44700020000})
2014-11-25 19:53:05.3708 [Error][Record]: System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.ExecuteRequest(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.InternalContracts.RestProxyBase.Execute(HttpRequestMessage request, Boolean logError)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.CardHostApi.Initialize(Card card, List`1 settings, List`1 allDevices)
   at ArgusTV.Recorder.Business.Proxies.CardHostProxy.EnsureCardHostRunning(List`1 allDetectedDevices)
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---

2014-11-25 19:53:05.3758 [Info ][Record]: RecordingThread [EastEnders]: Calling StartRecordingFailed(Reason="Card TBS 6285 DVBT/T2 Tuner A returned Card error : Fatal")
2014-11-25 20:15:06.0156 [Error][36]: Failed to start card host for card #1 'TBS 6285 DVBT/T2 Tuner A' (@device:pnp:\\?\pci#ven_1131&dev_7160&subsys_00016285&rev_02#4&3834d97&0&0008#{71985f48-1ca1-11d3-9cc8-00c04f7971e0}\{3ff44ee5-8547-402a-94f3-d44700020000})
Previously to this card #1 was used for a recording a day or so earlier - and had been idle since.

And then at 23:00, a few hours later, it changes to the ThreadPool message above, so I think there's two things going on here; firstly a card hangs and it tries restarting the process (infinitely, perhaps it could email after a while instead?) and secondly perhaps threads aren't being cleaned up from these failed attempts which have a knock-on effect, stopping other recordings that could quite easily use card #2 or so?

Apologies for all the posts, think I'm done now :)

rudig
Posts: 254
Joined: Tue Sep 06, 2011 6:21 pm

Re: Some unhandled exceptions?

Post by rudig » Sun Oct 18, 2015 7:11 pm

I seem to have the same sort of issue.
Once I start a live TV, it starts the stream and then times out with this in the notifier log

System.Threading.Tasks.TaskCanceledException

What can I do to further ex image this and solve it?
Now very often I can't watch live tv.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests