TSWriter deadlock potential fix. (2 Viewers)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Where did you add the change ?
    https://github.com/MediaPortal/MediaPortal-1/tree/BUG-3947-TSWriter-Deadlock-v2

    And should this fix shouldn't be separate from your branch ? :)
    It is.

    Is there a new branch for it or patch ?
    Yes.

    I note, the new branch has debug in there which should be removed before merging. It also rolls back the SDT table change discussed here:
    https://forum.team-mediaportal.com/...can-all-dish-channel-get-unknown-name.120036/

    ...which is not intended to be merged as-is - I just had it in my local build for testing.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    I get that error :
    [2013-09-17 13:19:58,407] [Log ] [4 ] [ERROR] - Exception :confused:ystem.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
    at System.Net.Sockets.Socket.Bind(EndPoint localEP)
    at System.Net.Sockets.TcpListener.Start(Int32 backlog)
    at System.Net.Sockets.TcpListener.Start()
    at System.Runtime.Remoting.Channels.ExclusiveTcpListener.Start(Boolean exclusiveAddressUse)
    at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.StartListening(Object data)
    at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupChannel()
    at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
    at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
    at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
    at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
    at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
    at System.Runtime.Remoting.RemotingConfigHandler.CreateChannelFromConfigEntry(ChannelEntry entry)
    at System.Runtime.Remoting.RemotingConfigHandler.ConfigureChannels(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
    at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)'.
    at System.Runtime.Remoting.RemotingConfigHandler.ConfigureRemoting(RemotingXmlConfigFileData configData, Boolean ensureSecurity)
    at System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String filename, Boolean ensureSecurity)
    at System.Runtime.Remoting.RemotingConfiguration.Configure(String filename, Boolean ensureSecurity)
    at TvService.TvServiceThread..ctor()

    [2013-09-17 13:20:10,787] [Log ] [DVB EPG timer] [ERROR] - Exception :confused:ystem.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.116.1:31456

    Server stack trace:
    at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
    at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(AddressFamily family)
    at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
    at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
    at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
    at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
    at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
    at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at TvControl.IController.IsRecording(IUser& user)
    at TvService.EpgCard.IsCardIdle(Int32 cardId)
    at TvService.EpgCard.GrabEpgForChannel(Channel channel, IChannel tuning, Card card)
    at TvService.EpgCard.GrabEpg()
    at TvService.EpgGrabber.GrabEpgOnCard(EpgCard epgCard)
    at TvService.EpgGrabber._epgTimer_Elapsed(Object sender, ElapsedEventArgs e)

    [2013-09-17 13:20:40,735] [Log ] [DVB EPG timer] [ERROR] - Exception :confused:ystem.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.116.1:31456

    Server stack trace:
    at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
    at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(AddressFamily family)
    at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
    at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
    at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
    at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
    at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
    at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

    Exception rethrown at [0]:
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
    at TvControl.IController.IsRecording(IUser& user)
    at TvService.EpgCard.IsCardIdle(Int32 cardId)
    at TvService.EpgCard.GrabEpgForChannel(Channel channel, IChannel tuning, Card card)
    at TvService.EpgCard.GrabEpg()
    at TvService.EpgGrabber.GrabEpgOnCard(EpgCard epgCard)
    at TvService.EpgGrabber._epgTimer_Elapsed(Object sender, ElapsedEventArgs e)

    I think i get it twice and seems to happen when i stop/start service from setuptv, i need to test it again and will report more :)
    Need to back to work :)
     

    DJBlu

    Portal Pro
    August 14, 2007
    1,670
    813
    Llanelli
    Home Country
    United Kingdom United Kingdom
    I think you've cracked it @mm1352000

    Once full testing has been completed then I can clean the code up unless you want to remove the logging.

    If you wish to test with 1.5.0 Alpha then use these setup files.

    I have removed the original branch to avoid confusion.

    Apologies to all for any caused.
     
    Last edited:

    Knightro

    MP Donator
  • Premium Supporter
  • December 7, 2010
    26
    1
    Kincardine
    Home Country
    Canada Canada
    I am in need of some help as I am unable to scan any Analog channels with my Win8pro setup & Hauppage 2250 card.

    https://forum.team-mediaportal.com/...el-scan-crash-pc-at-analog-channel-67.115174/

    I see that another user is having the same exact issue so it's not just a 1 off scenario.

    I will start a fresh install with just the 2 above 1.5.0.110 versions and see if anything shows up in the tv server logs. I don't believe there will be as the whole system crashes.

    Any help would great.
    Thanks,
    -KT
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello Knightro

    Although I'm happy to help, the issue that you're discussing has nothing to do with this topic and the patches posted here are not going to help you. Please keep the discussion in the thread that you linked. I'll respond over there.

    mm
     

    Users who are viewing this thread

    Top Bottom