Weird problem where TV Server "half-crashes" (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    So far so good; everything that was supposed to be recorded has been since switching to the new TsWriter.ax, and the TV Server has remained responsive.
    Cool. :)

    I have however had the "N/A" tuner error, but looking at the logs this does seem to be a separate issue related to the TV Service being unable to access the database when it starts up. My thinking in this case is maybe the TV Service starts up prior to MySQL being ready. Are there any changes to either (perhaps change the boot order somehow) I can set so as to make sure the server is ready to be accessed before the TV server tries to start up?
    Services (such as the TV service and MySQL) have the concept of dependencies, where one service may be dependent on other services and may in turn be depended on by other services. TV service is dependent on MySQL, which means TV service shouldn't start until MySQL has started. In other words, you shouldn't need to do anything.
     

    Alphathon

    Portal Pro
    July 15, 2010
    64
    8
    Home Country
    Scotland Scotland
    Services (such as the TV service and MySQL) have the concept of dependencies, where one service may be dependent on other services and may in turn be depended on by other services. TV service is dependent on MySQL, which means TV service shouldn't start until MySQL has started. In other words, you shouldn't need to do anything.
    I am aware of dependencies, although hadn't thought about using them. As far as I can tell the TVService is currently only dependent on the Remote Procedure Call (RCP) Locator, so that may well be (part of) the problem. I've now manually set it to be dependent on wampmysqld (the server was installed independently of MP as part of WAMP, so doesn't have a standard name).
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    ...the server was installed independently of MP as part of WAMP, so doesn't have a standard name).
    That would explain things. The dependency is configured automatically when the service is installed by MP.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,584
    2,978
    Nuenen
    Home Country
    Netherlands Netherlands
    Hello Alphathon

    Looks like a problem that I'm familiar with - TsWriter deadlock, related to the EPG grabber.

    @DJBlu thinks he may have found the problem. There is a patch for MP 1.3a -->here<--. I *think* that may still work for MP 1.2.3. Worth giving it a crack.
    ...
    mm

    I'm testing this one too (MP 1.2.3) I can watch tv so I guess that confirms compatibility with 1.2.3.

    Will let you know how things evolve here
     

    Raptor75

    Portal Member
    October 5, 2012
    16
    3
    Home Country
    Malta Malta
    I was having the same issue with TvServer freezing on me for no apparent reason. However it happens almost hourly. I am trying this patch and will report back how it goes. For sure it's compatible as a quick try with timeshift and record and it works.
     

    Raptor75

    Portal Member
    October 5, 2012
    16
    3
    Home Country
    Malta Malta
    No joy unfortunately. Unresponsive again after 6.5 hours. I'll try to identify how long it is taking this time.

    By the way, I also have "Enable CRC Check" disabled, so that did not help.

    After the next freeze I will turn off DBD grabbing and see how it goes like that. Though that is definitely not ideal![DOUBLEPOST=1349499745][/DOUBLEPOST]Is it worth upgrading to 1.3.0 alpha? Does the patch give a definite fix on that version?
     

    sincze

    Portal Pro
    September 18, 2011
    76
    1
    99
    So far so good; everything that was supposed to be recorded has been since switching to the new TsWriter.ax, and the TV Server has remained responsive.

    I have however had the "N/A" tuner error, but looking at the logs this does seem to be a separate issue related to the TV Service being unable to access the database when it starts up. My thinking in this case is maybe the TV Service starts up prior to MySQL being ready. Are there any changes to either (perhaps change the boot order somehow) I can set so as to make sure the server is ready to be accessed before the TV server tries to start up?

    Well.... my solution to this strange issue was to delay the startups of the DVB cards a few seconds.
    TV Server -> General -> Delay in Seconds before TV Server Detects cards = 10

    Did help me with this issue.

    Also ->TV Servers -> slect TV Card -> Edit -> check: allow this card to be preloaded
    and stop card (more compatible)
     
    Last edited:

    Alphathon

    Portal Pro
    July 15, 2010
    64
    8
    Home Country
    Scotland Scotland
    Well.... my solution to this strange issue was to delay the startups of the DVB cards a few seconds.
    TV Server -> General -> Delay in Seconds before TV Server Detects cards = 10

    Did help me with this issue.

    Also ->TV Servers -> slect TV Card -> Edit -> check: allow this card to be preloaded
    and stop card (more compatible)

    Fixing the service dependencies fixed the problem for me. Thanks anyway though
     

    Alphathon

    Portal Pro
    July 15, 2010
    64
    8
    Home Country
    Scotland Scotland
    I don't know if this is related to the previous one or not, but I'm now having another, similar, problem.

    Like before the TV server will register that it is supposed to record something, but won't. Also like before, the service will need to be restarted before it will record anything, and the TVserver.exe process needs to be manually killed rather than simply stopping it. However, unlike before, logs continue to be written and show the following (or similar depending on what kind of channel is being recorded; in this case it is on BBC THREE, which is a combined DVB-T/DVB-S channel, but the same is true of uncombined channels) when a schedule tries to record:

    Code:
    2012-10-26 19:48:07.962881 [scheduler thread(7)]: Scheduler: Check recordings for schedule Doctor Who...
    2012-10-26 19:48:08.039885 [scheduler thread(7)]: Scheduler: Time to record BBC THREE 19:48-21:00 Doctor Who
    2012-10-26 19:48:08.117890 [scheduler thread(7)]: Controller: find free card for channel BBC THREE
    2012-10-26 19:48:08.196894 [scheduler thread(7)]: Controller: find card for channel BBC THREE
    2012-10-26 19:48:08.279899 [scheduler thread(7)]: Controller:  got 2 tuning details for BBC THREE
    2012-10-26 19:48:08.354903 [scheduler thread(7)]: Controller:  channel #1 DVBT:tv:BBC BBC THREE Freq:514000 ONID:9018 TSID:4220 SID:4288 PMT:0x12C FTA:True LCN:7 BandWidth:8
    2012-10-26 19:48:08.430907 [scheduler thread(7)]: Controller:    card:18 type:DvbS cannot tune to channel
    2012-10-26 19:48:08.505912 [scheduler thread(7)]: Controller:    card:19 type:DvbS cannot tune to channel
    2012-10-26 19:48:08.590917 [scheduler thread(7)]: Controller:    card:14 type:DvbT can tune to channel
    2012-10-26 19:48:08.665921 [scheduler thread(7)]: Controller:    card:14 type:DvbT users: 0
    2012-10-26 19:48:08.746926 [scheduler thread(7)]: Controller:    card:15 type:DvbT can tune to channel
    2012-10-26 19:48:08.819930 [scheduler thread(7)]: Controller:    card:15 type:DvbT users: 0
    2012-10-26 19:48:08.895934 [scheduler thread(7)]: Controller:    card:5 type:DvbT can tune to channel
    2012-10-26 19:48:08.968938 [scheduler thread(7)]: Controller:    card:5 type:DvbT users: 0
    2012-10-26 19:48:09.045943 [scheduler thread(7)]: Controller:    card:4 type:DvbT can tune to channel
    2012-10-26 19:48:09.118947 [scheduler thread(7)]: Controller:    card:4 type:DvbT users: 0
    2012-10-26 19:48:09.193951 [scheduler thread(7)]: Controller:    card:2 type:DvbC is disabled
    2012-10-26 19:48:09.266955 [scheduler thread(7)]: Controller:    card:3 type:DvbC is disabled
    2012-10-26 19:48:09.340959 [scheduler thread(7)]: Controller:    card:6 type:DvbT is disabled
    2012-10-26 19:48:09.414964 [scheduler thread(7)]: Controller:    card:7 type:DvbT is disabled
    2012-10-26 19:48:09.486968 [scheduler thread(7)]: Controller:    card:11 type:RadioWebStream is disabled
    2012-10-26 19:48:09.560972 [scheduler thread(7)]: Controller:    card:10 type:Analog cannot tune to channel
    2012-10-26 19:48:09.636976 [scheduler thread(7)]: Controller:  channel #2 DVBS:tv:BBC BBC THREE Freq:10818000 ONID:2 TSID:2048 SID:10351 PMT:0x101 FTA:True LCN:129 SymbolRate:22000 Modulation:ModQpsk Polarisation:LinearV InnerFecRate:Rate5_6 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:48:09.712981 [scheduler thread(7)]: Controller:    card:18 type:DvbS can tune to channel
    2012-10-26 19:48:09.785985 [scheduler thread(7)]: Controller:    card:18 type:DvbS users: 0
    2012-10-26 19:48:09.861989 [scheduler thread(7)]: Controller:    card:19 type:DvbS can tune to channel
    2012-10-26 19:48:09.935994 [scheduler thread(7)]: Controller:    card:19 type:DvbS users: 0
    2012-10-26 19:48:10.008998 [scheduler thread(7)]: Controller:    card:14 type:DvbT cannot tune to channel
    2012-10-26 19:48:10.083002 [scheduler thread(7)]: Controller:    card:15 type:DvbT cannot tune to channel
    2012-10-26 19:48:10.157006 [scheduler thread(7)]: Controller:    card:5 type:DvbT cannot tune to channel
    2012-10-26 19:48:10.229010 [scheduler thread(7)]: Controller:    card:4 type:DvbT cannot tune to channel
    2012-10-26 19:48:10.302014 [scheduler thread(7)]: Controller:    card:2 type:DvbC is disabled
    2012-10-26 19:48:10.377019 [scheduler thread(7)]: Controller:    card:3 type:DvbC is disabled
    2012-10-26 19:48:10.450023 [scheduler thread(7)]: Controller:    card:6 type:DvbT is disabled
    2012-10-26 19:48:10.524027 [scheduler thread(7)]: Controller:    card:7 type:DvbT is disabled
    2012-10-26 19:48:10.599031 [scheduler thread(7)]: Controller:    card:11 type:RadioWebStream is disabled
    2012-10-26 19:48:10.673036 [scheduler thread(7)]: Controller:    card:10 type:Analog cannot tune to channel
    2012-10-26 19:48:10.746040 [scheduler thread(7)]: Controller: found 6 card(s) for channel
    2012-10-26 19:48:10.820044 [scheduler thread(7)]: AdvancedCardAllocation.GetAvailableCardsForChannel took 2623 msec
    2012-10-26 19:48:10.896048 [scheduler thread(7)]: Controller:    card:18 type:DvbS is available
    2012-10-26 19:48:10.969053 [scheduler thread(7)]: Controller:    card:19 type:DvbS is available
    2012-10-26 19:48:11.043057 [scheduler thread(7)]: Controller:    card:14 type:DvbT is available
    2012-10-26 19:48:11.117061 [scheduler thread(7)]: Controller:    card:15 type:DvbT is available
    2012-10-26 19:48:11.191065 [scheduler thread(7)]: Controller:    card:5 type:DvbT is available
    2012-10-26 19:48:11.264069 [scheduler thread(7)]: Controller:    card:4 type:DvbT is available
    2012-10-26 19:48:11.337074 [scheduler thread(7)]: Controller: found 6 free card(s)
    2012-10-26 19:48:11.415078 [scheduler thread(7)]: AdvancedCardAllocation.GetFreeCardsForChannel took 3296 msec
    2012-10-26 19:48:11.495083 [scheduler thread(7)]: scheduler: try max 6 of 6 FREE cards for recording
    2012-10-26 19:48:11.583088 [scheduler thread(7)]: Controller: epg stop
    2012-10-26 19:48:11.688094 [scheduler thread(7)]: user:epg remove
    2012-10-26 19:48:11.768098 [scheduler thread(7)]: Scheduler : record, first tune to channel
    2012-10-26 19:48:11.844103 [scheduler thread(7)]: card: Tune 18 to BBC THREE
    2012-10-26 19:48:11.917107 [scheduler thread(7)]: card: user: scheduler4943:18:-1 tune DVBS:tv:BBC BBC THREE Freq:10818000 ONID:2 TSID:2048 SID:10351 PMT:0x101 FTA:True LCN:129 SymbolRate:22000 Modulation:ModQpsk Polarisation:LinearV InnerFecRate:Rate5_6 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:48:12.012112 [scheduler thread(7)]: dvbs: Tune:DVBS:tv:BBC BBC THREE Freq:10818000 ONID:2 TSID:2048 SID:10351 PMT:0x101 FTA:True LCN:129 SymbolRate:22000 Modulation:ModQpsk Polarisation:LinearV InnerFecRate:Rate5_6 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:48:12.085116 [scheduler thread(7)]: dvbs:  Tune:DVBS:tv:BBC BBC THREE Freq:10818000 ONID:2 TSID:2048 SID:10351 PMT:0x101 FTA:True LCN:129 SymbolRate:22000 Modulation:ModQpsk Polarisation:LinearV InnerFecRate:Rate5_6 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:48:12.158121 [scheduler thread(7)]: dvb:GetNewSubChannel:0 #1

    Nothing else shows up in the logs until the server tries to do something else (in this case I went to set another recording at 2012-10-26 20:31:25.938476, which seems to have happened normally). In this case, prior to the schedule starting the DVB EPG grabber was running and same issue seem to have affected it when grabbing data for Radio Caroline, with the following being recorded in the log:

    Code:
    2012-10-26 19:25:19.592614 [(3)]: card: Tune 18 to Sky Games
    2012-10-26 19:25:19.666619 [(3)]: card: user: epg:18:-1 tune DVBS:radio:BSkyB Sky Games Freq:12070000 ONID:2 TSID:2019 SID:8107 PMT:0x11D FTA:True LCN:4590 SymbolRate:27500 Modulation:ModNotSet Polarisation:LinearH InnerFecRate:Rate2_3 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:25:19.760624 [(3)]: dvbs: Tune:DVBS:radio:BSkyB Sky Games Freq:12070000 ONID:2 TSID:2019 SID:8107 PMT:0x11D FTA:True LCN:4590 SymbolRate:27500 Modulation:ModNotSet Polarisation:LinearH InnerFecRate:Rate2_3 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:25:19.835628 [(3)]: dvbs:  Tune:DVBS:radio:BSkyB Sky Games Freq:12070000 ONID:2 TSID:2019 SID:8107 PMT:0x11D FTA:True LCN:4590 SymbolRate:27500 Modulation:ModNotSet Polarisation:LinearH InnerFecRate:Rate2_3 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:25:19.908632 [(3)]: dvb:GetNewSubChannel:0 #0
    2012-10-26 19:25:20.006638 [(3)]: TvDvbChannel ctor new subchIndex:0
    2012-10-26 19:25:20.078642 [(3)]: LNB low:9750 hi:10600 switch:11700
    2012-10-26 19:25:20.152646 [(3)]: ProfRed DVB-S2 modulation set to:ModNotDefined
    2012-10-26 19:25:20.226651 [(3)]: ProfRed DVB-S2 Pilot set to:NotSet
    2012-10-26 19:25:20.299655 [(3)]: ProfRed DVB-S2 RollOff set to:NotSet
    2012-10-26 19:25:20.372659 [(3)]: ProfRed DVB-S2 fec set to:Rate2_3
    2012-10-26 19:25:20.446663 [(3)]: dvbs:channel modulation is set to ModNotDefined
    2012-10-26 19:25:20.520667 [(3)]: dvbs:channel FECRate is set to Rate2_3
    2012-10-26 19:25:20.595672 [(3)]: ProfRed: SendDiseq: 0xE0 0x10 0x38 0xF3 0x4 0x2 0x2 0x3 0x0 0x1 0x0
    2012-10-26 19:25:20.936691 [(3)]: ProfRed: setdiseqc returned:0
    2012-10-26 19:25:21.110701 [(3)]: dvb:Submiting tunerequest Channel:Sky Games subChannel:0
    2012-10-26 19:25:21.183705 [(3)]: dvb:using existing subchannel:0
    2012-10-26 19:25:21.258710 [(3)]: dvb:Submit tunerequest size:1 new:0
    2012-10-26 19:25:21.332714 [(3)]: subch:0 OnBeforeTune
    2012-10-26 19:25:21.419719 [(3)]: dvb:Submit tunerequest calling put_TuneRequest
    2012-10-26 19:25:21.493723 [(3)]: dvb:Submit tunerequest done calling put_TuneRequest
    2012-10-26 19:25:21.567727 [(3)]: subch:0 OnAfterTune
    2012-10-26 19:25:21.640732 [(3)]: RunGraph
    2012-10-26 19:25:21.715736 [(3)]: subch:0 OnGraphStart
    2012-10-26 19:25:21.791740 [(3)]: dvb:  RunGraph
    2012-10-26 19:25:22.019753 [(3)]: dvb:  LockedInOnSignal ok
    2012-10-26 19:25:22.093757 [(3)]: subch:0 OnGraphStarted
    2012-10-26 19:25:22.166762 [(3)]: subch:0 SetupPmtGrabber:pid 11D sid:1FAB
    2012-10-26 19:25:22.239766 [(3)]: subch:0 set pmt grabber pmt:11D sid:1FAB
    2012-10-26 19:25:22.323771 [(3)]: WaitForPMT: Waiting for PMT 11D
    2012-10-26 19:25:22.469779 [(13)]: subch:0 OnPMTReceived() pmt:11D ran:True dynamic:False
    2012-10-26 19:25:22.544783 [(3)]: WaitForPMT: Found PMT after 0.2200125 seconds.
    2012-10-26 19:25:22.619787 [(3)]: subch:0 SendPmt:1FAB 1FAB FFFFFFFF 4
    2012-10-26 19:25:22.694792 [(3)]: Decode pmt
    2012-10-26 19:25:22.770796 [(3)]: Set descriptor data with length 3
    2012-10-26 19:25:22.844800 [(3)]: Set descriptor data with length 3
    2012-10-26 19:25:22.919805 [(3)]: Set descriptor data with length 3
    2012-10-26 19:25:22.992809 [(3)]: Set descriptor data with length 3
    2012-10-26 19:25:23.067813 [(3)]: subch:0 SendPMT: Channel is FTA, nothing to do.
    2012-10-26 19:25:23.140817 [(3)]: subch:0 SetMpegPidMapping
    2012-10-26 19:25:23.215822 [(3)]: subch:0  pid:A46 pcr
    2012-10-26 19:25:23.287826 [(3)]: subch:0  pid:11D pmt
    2012-10-26 19:25:23.360830 [(3)]: subch:0  pid:A46 audio lang: type:MPEG-2
    2012-10-26 19:25:23.436834 [(3)]: subch:0    map pid:A46 audio lang: type:MPEG-2
    2012-10-26 19:25:23.518839 [(3)]: subch:0  pid:A3A type:5
    2012-10-26 19:25:23.593843 [(3)]: subch:0  pid:A3B type:5
    2012-10-26 19:25:23.668848 [(3)]: subch:0  pid:A3C type:5
    2012-10-26 19:25:23.743852 [(3)]: subch:0 stop tif
    2012-10-26 19:25:23.820856 [(3)]: WaitForPmt: PMT handling took 1.2000686 seconds.
    2012-10-26 19:25:23.899861 [(3)]: card: Tuner locked: True
    2012-10-26 19:25:23.976865 [(3)]: **************************************************
    2012-10-26 19:25:24.052869 [(3)]: ***** SIGNAL LEVEL: 71, SIGNAL QUALITY: 61 *****
    2012-10-26 19:25:24.128874 [(3)]: **************************************************
    2012-10-26 19:25:24.204878 [(3)]: card: tuned user: epg subchannel: 0
    2012-10-26 19:25:24.281883 [(3)]: user:epg add
    2012-10-26 19:25:24.357887 [DVB EPG timer(10)]: Controller: GrabEpg on card ID == 18
    2012-10-26 19:25:24.446892 [DVB EPG timer(10)]: dvb:grab epg...
    2012-10-26 19:26:26.449438 [(13)]: EPG: database updated for #0 Sky Games
    2012-10-26 19:26:26.534443 [(13)]: user:epg remove
    2012-10-26 19:26:26.612448 [(13)]: tvcard:FreeSubChannel: subchannels count 1 subch#0 keep graph=False
    2012-10-26 19:26:26.695452 [(13)]: DVB subch:0 Decompose()
    2012-10-26 19:26:26.811459 [(13)]: FreeSubChannel CA: freeing sub channel : 0
    2012-10-26 19:26:26.890464 [(13)]: tvcard:FreeSubChannel : no subchannels present, pausing graph
    2012-10-26 19:26:26.968468 [(13)]: dvb:StopGraph called
    2012-10-26 19:26:27.045472 [(13)]: tvcard:FreeAllSubChannels
    2012-10-26 19:26:27.120477 [(13)]: dvb:StopGraph
    2012-10-26 19:26:49.653766 [(3)]: card: Tune 18 to Radio Caroline
    2012-10-26 19:26:49.729770 [(3)]: card: user: epg:18:-1 tune DVBS:radio:Arqiva Radio Caroline Freq:11428000 ONID:59 TSID:2315 SID:10551 PMT:0xFA1 FTA:True LCN:4480 SymbolRate:27500 Modulation:ModNotSet Polarisation:LinearH InnerFecRate:Rate2_3 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:26:49.823775 [(3)]: dvbs: Tune:DVBS:radio:Arqiva Radio Caroline Freq:11428000 ONID:59 TSID:2315 SID:10551 PMT:0xFA1 FTA:True LCN:4480 SymbolRate:27500 Modulation:ModNotSet Polarisation:LinearH InnerFecRate:Rate2_3 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:26:49.897780 [(3)]: dvbs:  Tune:DVBS:radio:Arqiva Radio Caroline Freq:11428000 ONID:59 TSID:2315 SID:10551 PMT:0xFA1 FTA:True LCN:4480 SymbolRate:27500 Modulation:ModNotSet Polarisation:LinearH InnerFecRate:Rate2_3 DisEqc:Level1AA band:Universal Pilot:NotSet RollOff:NotSet
    2012-10-26 19:26:49.973784 [(3)]: dvb:GetNewSubChannel:0 #0
    2012-10-26 19:27:53.563421 [TvClient-TvHome: HeartBeat transmitter thread(12)]: RemoteControl: RegisterChannel first called in Domain MediaPortal.exe for thread TvClient-TvHome: HeartBeat transmitter thread with id 12
    2012-10-26 19:27:53.767433 [TvClient-TvHome: HeartBeat transmitter thread(12)]: TCP connect took : 23
    2012-10-26 19:27:53.859438 [TvClient-TvHome: HeartBeat transmitter thread(12)]: RemoteControl - Connected
    2012-10-26 19:27:53.958444 [TvClient-TvHome: HeartBeat transmitter thread(12)]: RemoteControl - Connected
    2012-10-26 19:27:54.316464 [MPMain(1)]: RemoteControl - Connected
    2012-10-26 19:27:57.094623 [TvClient-TvHome: HeartBeat transmitter thread(12)]: RemoteControl - Connected
    2012-10-26 19:27:58.177685 [TvClient-TvHome: HeartBeat transmitter thread(12)]: RemoteControl - Connected

    Any ideas?
     
    Last edited:

    Users who are viewing this thread

    Top Bottom