Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#10495 closed Patch - Bug Fix (fixed)

fix "PESPacket: Failed CRC check 0xVARIABLE != 0xVARIABLE for StreamID = 0x8x"

Reported by: dekarl@… Owned by: danielk
Priority: minor Milestone: 0.27
Component: MythTV - ATSC Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

commiting #10207 (or something along the lines) uncovered a bug in PSIPTable::HasCRC where for all table ids from 0x80 to 0xfe it returns true to support Dishnet's EPG. The table_ids for CA_message_sections, which don't seem to have CRC, are 0x80 to 0x8f.

Attachments (3)

0005-fix-Failed-CRC-check-0xVARIABLE-0xVARIABLE-for-Strea.patch (2.9 KB) - added by dekarl@… 12 years ago.
0005-fix-Failed-CRC-check-0xVARIABLE-0xVARIABLE-for-Strea.2.patch (3.1 KB) - added by dekarl@… 12 years ago.
Updated patch, no CRC for Dishnet
0006-crc32-of-nothing-is-0-not-1-just-a-guess-based-on-ob.patch (1.1 KB) - added by dekarl@… 12 years ago.
Fix 0 != 0xffffffff, I'm not sure which way around its actually right, but this way I don't get errors

Download all attachments as: .zip

Change History (16)

Changed 12 years ago by dekarl@…

comment:1 Changed 12 years ago by dekarl@…

I've been running with #10494 *and* #10495 over night and the CRC errors on ECM/EMM are gone.

Whats left in the log is:

Mar 24 01:19:58 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x7274206d != 0xad9a1cfa for StreamID = 0x65
Mar 24 01:19:58 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x65)
Mar 24 01:19:58 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x736368f6 != 0x5bce2651 for StreamID = 0x69
Mar 24 01:19:59 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6f62696c != 0x80dfe5aa for StreamID = 0x6e
Mar 24 01:19:59 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6c652076 != 0x2d7500dd for StreamID = 0x69
Mar 24 01:19:59 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6872204c != 0x4d810e98 for StreamID = 0x6f
Mar 24 01:19:59 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x65722077 != 0x1f818ae1 for StreamID = 0x65
Mar 24 01:20:00 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6e672065 != 0xcef5230a for StreamID = 0xfc
Mar 24 01:20:00 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x73696f6e != 0x716d0fdd for StreamID = 0x61
Mar 24 01:20:00 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x616e6769 != 0xac6eb644 for StreamID = 0x65
Mar 24 01:20:00 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x65)
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x65722054 != 0x99e11114 for StreamID = 0x65
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x2062756e != 0x286a7a6d for StreamID = 0x61
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x67206e6f != 0xad1e76c9 for StreamID = 0x65
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x64617373 != 0x69f47f68 for StreamID = 0x63
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x616d7066 != 0x2e24c976 for StreamID = 0x4e
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x69636827 != 0x72119824 for StreamID = 0x61
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x25000300 != 0xdc31694e for StreamID = 0x53
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x54020000 != 0x9ce4ad3e for StreamID = 0x0
Mar 24 01:20:01 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x656e746c != 0x1b4bf306 for StreamID = 0x96
Mar 24 01:20:01 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x61756620 != 0x194edb8c for StreamID = 0x69
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x63687470 != 0xd0c280e2 for StreamID = 0x64
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6d74206e != 0x2e413861 for StreamID = 0x68
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x65720084 != 0x75b43894 for StreamID = 0x69
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x616d6173 != 0xf7584873 for StreamID = 0x6e
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x72656920 != 0xc1659a97 for StreamID = 0x73
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x30000 != 0xf9daf5b5 for StreamID = 0x53
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0x42a5dc43 for StreamID = 0x0

notice that the same block (this and the next on) is reapeated over and over, so it seems to be a systematic error, like still calling the wrong HasCRC() in some places. (notice the missing message from mpegstreamdata.cpp)

Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:02 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:02 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:02 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:02 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:02 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:02 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:03 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:03 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:03 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:03 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:03 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:03 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:03 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0xffffffff for StreamID = 0x0
Mar 24 01:20:03 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)

need to investigate this some more. I have a vague recollection of reading something about 0 / -1 having a special meaning in some CRC cases in the DVB domain but don't remember where I read that at the moment.

Mar 24 01:20:06 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x7274206d != 0xad9a1cfa for StreamID = 0x65
Mar 24 01:20:06 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x65)
Mar 24 01:20:06 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x736368f6 != 0x5bce2651 for StreamID = 0x69
Mar 24 01:20:06 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6f62696c != 0x80dfe5aa for StreamID = 0x6e
Mar 24 01:20:06 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6c652076 != 0x2d7500dd for StreamID = 0x69
Mar 24 01:20:06 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6872204c != 0x4d810e98 for StreamID = 0x6f
Mar 24 01:20:07 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x65722077 != 0x1f818ae1 for StreamID = 0x65
Mar 24 01:20:07 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6e672065 != 0xcef5230a for StreamID = 0xfc
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x73696f6e != 0x716d0fdd for StreamID = 0x61
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x616e6769 != 0xac6eb644 for StreamID = 0x65
Mar 24 01:20:08 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x65)
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x65722054 != 0x99e11114 for StreamID = 0x65
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x2062756e != 0x286a7a6d for StreamID = 0x61
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x67206e6f != 0xad1e76c9 for StreamID = 0x65
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x64617373 != 0x69f47f68 for StreamID = 0x63
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x616d7066 != 0x2e24c976 for StreamID = 0x4e
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x69636827 != 0x72119824 for StreamID = 0x61
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x25000300 != 0xdc31694e for StreamID = 0x53
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x54020000 != 0x9ce4ad3e for StreamID = 0x0
Mar 24 01:20:08 mythmaster mythbackend[19243]: E DVBRead mpeg/mpegstreamdata.cpp:950 (HandleTSTables) PSIP packet failed CRC check. pid(0x12) type(0x0)
Mar 24 01:20:08 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x656e746c != 0x1b4bf306 for StreamID = 0x96
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x61756620 != 0x194edb8c for StreamID = 0x69
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x63687470 != 0xd0c280e2 for StreamID = 0x64
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x6d74206e != 0x2e413861 for StreamID = 0x68
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x65720084 != 0x75b43894 for StreamID = 0x69
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x616d6173 != 0xf7584873 for StreamID = 0x6e
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x72656920 != 0xc1659a97 for StreamID = 0x73
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x30000 != 0xf9daf5b5 for StreamID = 0x53
Mar 24 01:20:09 mythmaster mythbackend[19243]: I DVBRead mpeg/pespacket.cpp:161 (VerifyCRC) PESPacket: Failed CRC check 0x0 != 0x42a5dc43 for StreamID = 0x0

thats the first repeat, it goes on like this for some time while the backend is actively scanning the EIT on cable but it stopped ~7 hours ago and the rest of the night there are almost exlusively 0x0 != 0xffffffff messages.

comment:2 Changed 12 years ago by dekarl@…

typo: #10494 should have been #10496.

I have been running with #10495 + #10496 (and #10054) all night.

Changed 12 years ago by dekarl@…

Updated patch, no CRC for Dishnet

Changed 12 years ago by dekarl@…

Fix 0 != 0xffffffff, I'm not sure which way around its actually right, but this way I don't get errors

comment:3 Changed 12 years ago by dekarl@…

I had the EIT scanner and some recordings run over night with the updated patch and got no more CRC errors on empty PAT/PMT sections.

comment:4 Changed 12 years ago by danielk

Owner: set to danielk
Status: newaccepted

comment:5 Changed 12 years ago by danielk

Note: See also #10496.

comment:6 Changed 12 years ago by danielk

Status: acceptedinfoneeded

I'm wondering if you'd be interested coming up with a more global fix...

As I see it the problem is that some of the CRC checks really need to know the pid the table arrived on. And possibly they need to know if we're dealing with DVB, MPEG, ATSC, etc data. But PESPacket construction doesn't ensure that we'll always have a pid to lookup.

We should really create a SectionCommon? class from which PSIPTable and PESPacket inherit and which provides a factory method for creating Sections which always contain a TS header with a valid pid. This means we'll never get to take advantage of zero-copy for single TS tables, but that is of pretty much nil importance and compicates the code. i.e. get rid of all the current constructors for PESPacket/PSIPTable & get rid of the View() methods and just provide a factory which assembles and returns sections from TS packet[s].

comment:7 Changed 11 years ago by xyz@…

I got this too, but have not dishnet. What shall i post to you to support the analysis?

comment:8 Changed 11 years ago by stuartm

Component: MythTV - GeneralMythTV - ATSC

comment:9 Changed 11 years ago by Karl Dietz <dekarl@…>

Resolution: fixed
Status: infoneededclosed

In 20291e6ea1c76f861f1da63fc48afb2364dbc96c/mythtv:

don't force SI sections into a PESPacket, use the new constructor instead

A variant of this has been lightly tested and I'd like to get it into 0.27
as it should fix all kinds of issues down the line.

E.g. stuff related to the SI for DVB-CAM being rejected due to expecting
a CRC which they don't have

It also removes the false positive CRC errors from the logs.

Fixes #10495
Fixes #10496

comment:10 Changed 11 years ago by Raymond Wagner

Milestone: unknown0.27

comment:11 Changed 11 years ago by Karl Dietz <dekarl@…>

In b2d8449c0fd01cbed24d2e19d2166e0e0f54677a/mythtv:

switch firewire recorder over to new constructor, too

Refs #10495

comment:12 Changed 11 years ago by Karl Dietz <dekarl@…>

In 5bde24f0fe77f63073d10cea05dfb29ff590b661/mythtv:

switch commented out code over to new constructor

Refs #10495

comment:13 Changed 11 years ago by Karl Dietz <dekarl@…>

In 4751533355780c46ef09c2f952bf544c234f4d42/mythtv:

refactor PESPacket and PSIPTable some more to silence CRC errors

Refs #10495
Refs #10496

Note: See TracTickets for help on using tickets.