[mythtv] Backend crashes almost daily

flo flo at flobittner.de
Sun Oct 7 08:31:57 UTC 2007


It did it again. Not the same channel (i set useonairguide=0 for the 
transponder yesterday) BUT this new channel has already set useonairguide=0 
for his whole transponder. So why did the EIT crawler check this? 
I try your fix, Dave!

********************************************** gdb.txt

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1258379584 (LWP 17421)]
MPEGStreamData::ProcessPAT (this=0x1065a18, pat=0x4b014700) at 
mpeg/mpegtables.h:430
430	            if (progNum==ProgramNumber(i))


********************************************** myth.log

2007-10-07 01:39:56.830 EITScanner: Now looking for EIT data on multiplex of 
channel 30128
2007-10-07 01:39:57.133 SM(3)::AddFlags: Seen(PAT,) Match() Wait()
2007-10-07 01:39:57.184 SM(3)::AddFlags: Seen() Match(PAT,) Wait()
2007-10-07 01:39:57.186 CreatePATSingleProgram()
2007-10-07 01:39:57.187 PAT in input stream
2007-10-07 01:39:57.188 Program Association Table
 PSIP tableID(0x0) length(253) extension(0x422)
      version(8) current(1) section(0) last_section(0)
         tsid: 1058
 programCount: 61
  program number 0 has PID 0x  10   data  0x0 0x0 0x224 0x16
  program number 30100 has PID 0x 432   data  0x117 0x148 0x228 0x50
  program number 30129 has PID 0x 407   data  0x117 0x177 0x228 0x7
  program number 30128 has PID 0x 44b   data  0x117 0x176 0x228 0x75
  program number 30124 has PID 0x 403   data  0x117 0x172 0x228 0x3
  program number 30126 has PID 0x 405   data  0x117 0x174 0x228 0x5
  program number 30127 has PID 0x 402   data  0x117 0x175 0x228 0x2
  program number 30130 has PID 0x 40e   data  0x117 0x178 0x228 0x14
  program number 30125 has PID 0x 437   data  0x117 0x173 0x228 0x55
  program number 30123 has PID 0x 44a   data  0x117 0x171 0x228 0x74
  program number 30122 has PID 0x 449   data  0x117 0x170 0x228 0x73
  program number 30121 has PID 0x 448   data  0x117 0x169 0x228 0x72
  program number 30120 has PID 0x 447   data  0x117 0x168 0x228 0x71
  program number 30119 has PID 0x 446   data  0x117 0x167 0x228 0x70
  program number 30118 has PID 0x 445   data  0x117 0x166 0x228 0x69
  program number 30117 has PID 0x 444   data  0x117 0x165 0x228 0x68
  program number 30116 has PID 0x 443   data  0x117 0x164 0x228 0x67
  program number 30115 has PID 0x 442   data  0x117 0x163 0x228 0x66
  program number 30114 has PID 0x 441   data  0x117 0x162 0x228 0x65
  program number 30113 has PID 0x 440   data  0x117 0x161 0x228 0x64
  program number 30112 has PID 0x 43f   data  0x117 0x160 0x228 0x63
  program number 30111 has PID 0x 43e   data  0x117 0x159 0x228 0x62
  program number 30110 has PID 0x 43d   data  0x117 0x158 0x228 0x61
  program number 30109 has PID 0x 43c   data  0x117 0x157 0x228 0x60
  program number 30108 has PID 0x 43b   data  0x117 0x156 0x228 0x59
  program number 30107 has PID 0x 43a   data  0x117 0x155 0x228 0x58
  program number 30106 has PID 0x 439   data  0x117 0x154 0x228 0x57
  program number 30105 has PID 0x 438   data  0x117 0x153 0x228 0x56
  program number 30196 has PID 0x 42e   data  0x117 0x244 0x228 0x46
  program number 30195 has PID 0x 42d   data  0x117 0x243 0x228 0x45
  program number 30194 has PID 0x 42c   data  0x117 0x242 0x228 0x44
  program number 30193 has PID 0x 42b   data  0x117 0x241 0x228 0x43
  program number 30191 has PID 0x 429   data  0x117 0x239 0x228 0x41
  program number 30190 has PID 0x 428   data  0x117 0x238 0x228 0x40
  program number 30189 has PID 0x 427   data  0x117 0x237 0x228 0x39
  program number 30183 has PID 0x 421   data  0x117 0x231 0x228 0x33
  program number 30182 has PID 0x 420   data  0x117 0x230 0x228 0x32
  program number 30181 has PID 0x 41f   data  0x117 0x229 0x228 0x31
  program number 30180 has PID 0x 41e   data  0x117 0x228 0x228 0x30
  program number 30179 has PID 0x 41d   data  0x117 0x227 0x228 0x29
  program number 30178 has PID 0x 41c   data  0x117 0x226 0x228 0x28
  program number 30177 has PID 0x 41b   data  0x117 0x225 0x228 0x27
  program number 30176 has PID 0x 41a   data  0x117 0x224 0x228 0x26
  program number 30175 has PID 0x 419   data  0x117 0x223 0x228 0x25
  program number 30174 has PID 0x 418   data  0x117 0x222 0x228 0x24
  program number 30197 has PID 0x 42f   data  0x117 0x245 0x228 0x47
  program number 30173 has PID 0x 417   data  0x117 0x221 0x228 0x23
  program number 30172 has PID 0x 416   data  0x117 0x220 0x228 0x22
  program number 30169 has PID 0x 413   data  0x117 0x217 0x228 0x19
  program number 30166 has PID 0x 410   data  0x117 0x214 0x228 0x16
  program number 30163 has PID 0x 40d   data  0x117 0x211 0x228 0x13
  program number 30162 has PID 0x 40c   data  0x117 0x210 0x228 0x12
  program number 30160 has PID 0x 40a   data  0x117 0x208 0x228 0x10
  program number 30159 has PID 0x 409   data  0x117 0x207 0x228 0x9
  program number 30158 has PID 0x 408   data  0x117 0x206 0x228 0x8
  program number 30156 has PID 0x 406   data  0x117 0x204 0x228 0x6
  program number 30154 has PID 0x 404   data  0x117 0x202 0x228 0x4
  program number 30151 has PID 0x 401   data  0x117 0x199 0x228 0x1
  program number 30150 has PID 0x 400   data  0x117 0x198 0x228 0x0
  program number 30104 has PID 0x 436   data  0x117 0x152 0x228 0x54
  program number 30102 has PID 0x 434   data  0x117 0x150 0x228 0x52

2007-10-07 01:39:57.192 desired_program(30128) pid(0x44b)
2007-10-07 01:39:57.193 pmt_pid(0x44b)
2007-10-07 01:39:57.206 PAT for output stream
2007-10-07 01:39:57.207 Program Association Table
 PSIP tableID(0x0) length(13) extension(0x422)
      version(8) current(1) section(0) last_section(0)
         tsid: 1058
 programCount: 1
  program number 1 has PID 0x 44b   data  0x0 0x1 0x228 0x75

2007-10-07 01:39:57.209 DVBSM(3)::AddPIDFilter(0x44b): 
2007-10-07 01:39:57.433 SM(3)::AddFlags: Seen(PMT,) Match() Wait()
2007-10-07 01:39:57.455 SM(3)::AddFlags: Seen() Match(PMT,) Wait()
2007-10-07 01:39:57.457 CreatePMTSingleProgram()
2007-10-07 01:39:57.471 PMT in input stream
2007-10-07 01:39:57.475 Program Map Table ver(2) pid(0x44b) pnum(30128) 
len(154)

 Stream #0 pid(0xa3) type(video-mpeg2  0x2)
  Stream Identifier Descriptor (0x52) length(1)
 Stream #1 pid(0x190) type(audio-mp2-layer[1,2,3]  0x4)
  Stream Identifier Descriptor (0x52) length(1)
  ISO-639 Language: code(esl) canonical(esl) eng(Unknown)
 Stream #2 pid(0xfe) type(audio-mp2-layer[1,2,3]  0x4)
  Stream Identifier Descriptor (0x52) length(1)
  ISO-639 Language: code(dos) canonical(dos) eng(Unknown)
 Stream #3 pid(0xd0) type(unknown  0x192)
  Unknown(198) Descriptor (0xc6) length(5)
  Unknown(194) Descriptor (0xc2) length(8)
 Stream #4 pid(0x17c) type(unknown  0x192)
  Unknown(194) Descriptor (0xc2) length(8)
 Stream #5 pid(0x17a) type(unknown  0x192)
  Unknown(194) Descriptor (0xc2) length(8)
 Stream #6 pid(0x309) type(unknown  0x193)
  Unknown(194) Descriptor (0xc2) length(16)
 Stream #7 pid(0x378) type(unknown  0x193)
  Unknown(194) Descriptor (0xc2) length(8)
 Stream #8 pid(0x154) type(unknown  0x193)
  Unknown(194) Descriptor (0xc2) length(8)

2007-10-07 01:39:57.484 PMT for output stream
2007-10-07 01:39:57.487 Program Map Table ver(2) pid(0x44b) pnum(1) len(28)

 Stream #0 pid(0xa3) type(video-mpeg2  0x2)
 Stream #1 pid(0x190) type(audio-mp2-layer[1,2,3]  0x4)
 Stream #2 pid(0xfe) type(audio-mp2-layer[1,2,3]  0x4)

2007-10-07 01:39:57.614 DTVSM(3)::SetNIT(): net_id = 1
2007-10-07 01:39:57.634 SM(3)::AddFlags: Seen(NIT,) Match() Wait()
2007-10-07 01:39:57.644 SM(3)::AddFlags: Seen(SDT,) Match() Wait()
2007-10-07 01:39:57.645 DTVSM(3)::SetSDT(): tsid = 1058 orig_net_id = 1
2007-10-07 01:39:57.654 SM(3)::AddFlags: Seen() Match(SDT,) Wait()
2007-10-07 01:39:57.754 TVRec(2): Got good signal
2007-10-07 01:39:57.808 TVRec(2): ClearFlags(WaitingForSignal,) -> 
RunMainLoop,AskAllowRecording,SignalMonitorRunning,EITScannerRunning,
2007-10-07 01:39:57.834 DVBSM(3)::AddPIDFilter(0x12): 
2007-10-07 01:39:57.846 DVBSM(3)::AddPIDFilter(0xb11): 
2007-10-07 01:39:57.848 DVBSM(3)::AddPIDFilter(0xb12): 
2007-10-07 01:39:58.149 DTVSM(3)::SetNIT(): net_id = 1
2007-10-07 01:39:58.272 SM(3)::AddFlags: Seen(NIT,) Match() Wait()
2007-10-07 01:39:58.685 SM(3)::AddFlags: Seen(SDT,) Match() Wait()
2007-10-07 01:39:58.695 DTVSM(3)::SetSDT(): tsid = 1058 orig_net_id = 1
2007-10-07 01:39:58.695 SM(3)::AddFlags: Seen() Match(SDT,) Wait()
2007-10-07 01:40:06.201 AddTSPacket: Out of sync!!! Need to wait for next 
payloadStart PID: 0x12, continuity counter: 4 (expected 3).

**********************************************


Am Sonntag, 7. Oktober 2007 01:28:20 schrieb Dave:
> Hmmm, interesting.
>
> According to the spec:
>
> ---------------------
> 2) New text for Receiver processing:
>
> "The Receiver MUST check the MPEG-2 Continuity Counter carried in the TS
> Packet header [ISO-MPEG]. If two (or more) successive TS Packets within
> the same TS Logical Channel carry the same Continuity Counter value, the
> duplicate TS Packets MUST be silently discarded. If the received value
> is NOT identical to that in the previous TS Packet, and it does NOT
> increment by one for successive TS Packets (modulo 16), the Receiver has
> detected a continuity error. Any partially received SNDU Payload) MUST
> be discarded. A continuity counter error event SHOULD be recorded. The
> Receiver then enters the Idle State.
> ------------------------
>
>
> Seems like the backend crashes when we are processing a packet with the
> continuity counter not in sequence. According to my interpretation of
> the above, we need to discard this TS packet completely. Seems just
> before we crash we see this error :
>
>     2007-10-06 17:00:33.476 AddTSPacket: Out of sync!!! Need to wait for
>     next payloadStart PID: 0x12, continuity counter: 14 (expected 12).
>
> I think in 'pespacket.cpp' we need to return false here just after this
> error:
>
>          VERBOSE(VB_RECORD, "AddTSPacket: Out of sync!!! "
>                  "Need to wait for next payloadStart" +
>                  QString(" PID: 0x%1, continuity counter: %2 (expected
> %3).")
>                 .arg(packet->PID(),0,16).arg(cc).arg(ccExp));
>          return true;
>                 ^^^^^
>
>
> Comments ?
> Dave
>
>
> -------- Original Message --------
> Subject: [mythtv]  Backend crashes almost daily
> Date: Sat, 6 Oct 2007 23:17:33 +0200
> From: flo <flo at flobittner.de>
> Reply-To: Development of mythtv <mythtv-dev at mythtv.org>
> To: mythtv-dev at mythtv.org
>
> Hi Dave,
>
> thanks for your reply.
>
> In my version line 430 of mpeg/mpegtables.h is this:
>
>      // helper function
>      uint FindPID(uint progNum) const
>      {
>          for (uint i = 0; i < ProgramCount(); i++)
> 430:            if (progNum==ProgramNumber(i))
>                  return ProgramPID(i);
>          return 0;
>      }
>
> I updated svn to revision 14621, but this file didn't change. Perhaps you
> meant svn of 0.21?
>
> The faulty channel was "I>TELE" with serviceid 9697 and transportid 1112 on
> Astra. It was added shortly by a transponder scan. Normally i set
> useonairguide=0 for all transports i don't need, but this time i forgot
> it. I
> did it now because some recordings are scheduled. But i can do more tests
> next week if you need them!?
>
> Flo
>
> > Hi Flo,
> >
> > The fact that this crashes without any frontend means that it is most
> > likely crashing when the EIT crawler is running and updating your
> > program guides (EPG) from the transmitted EIT data. Your output below
> > also confirms this. What you need to do is figure out if this is always
> > crashing on one channel.. Look at the output of this before the crash
> > and check if it's always happening on the same sid/pid.
> >
> > Irrespective, i'd consider this a bug since we should trap this error
> > (possibly bad PAT data) and discard instead or crashing. Can you check
> > if you are on the latest SVN first as i can't even see this source line
> > in mpeg/mpegtables.h line 430 of my svn so i can't help further unless
> > you upgrade and provide another stacktrace.
> >
> > Dave
> >


More information about the mythtv-dev mailing list