Opened 14 years ago

Closed 13 years ago

#1888 closed patch (fixed)

EIT failures with Finnish channels (DVB-T)

Reported by: otto at kolsi dot fi Owned by: danielk
Priority: minor Milestone: 0.20
Component: dvb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

After the EIT merge, EIT fails to retrieve data for one channel and partially for another. These channels are in different multiplexes. In backend logs, there are lots of PES packet related error messages:

2006-05-28 04:17:15.391 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.394 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.395 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.397 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.399 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.401 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.403 Error: We started a PES packet, without a payloadStart!
2006-05-28 04:17:15.405 Error: We started a PES packet, without a payloadStart!

After the EIT run, program table contains 1-2 rows with date in year 1902.

I'm running SVN 10047 and have deleted and re-scanned all the channels. I've attached couple of TS streams that are captured with 'cat /dev/dvb/adapter0/dvr0' command at the same time when the repeated PES packet error messages occur. I've verified with TSReaderLite program that these streams are valid.

Attachments (4)

test3.ts.gz (146.6 KB) - added by otto at kolsi dot fi 14 years ago.
TS stream
sigmon_dump.diff (1.5 KB) - added by Janne <janne-mythtv@…> 13 years ago.
debugging patch
1888_fix.diff (435 bytes) - added by Janne <janne-mythtv@…> 13 years ago.
logs.tar.bz2 (195.3 KB) - added by Mark.Buechler@… 13 years ago.
Requested valgrind logs..

Download all attachments as: .zip

Change History (15)

Changed 14 years ago by otto at kolsi dot fi

Attachment: test3.ts.gz added

TS stream

comment:1 Changed 14 years ago by danielk

Milestone: 0.20

comment:2 Changed 13 years ago by Stuart Auchterlonie

(In [10351]) Refs #1888.

Make sure that the data we read from the streamdata is long enough. It should be at least 10 bytes long. 10 bytes is 4 bytes of TS header plus a minimum of 6 bytes of PES header, which is sufficient to get us a valid length from the PES header.

comment:3 Changed 13 years ago by Stuart Auchterlonie

(In [10352]) Refs #1888. Update position in buffer on a short read.

comment:4 Changed 13 years ago by otto at kolsi dot fi

It seems that previous changes did not fix this problem. I'm not at home now but mythweb shows the corrupted EIT data: "There's guide data until 2018-12-22 00:16 (4558 days)". I can later check if I can spot any apparent changes in logs.

I took changeset 1035 from the mythtv-eit branch, did normal steps (configure, qmake, make, make install). I believe this is enough when trying branches..?

comment:5 Changed 13 years ago by Janne <janne-mythtv@…>

The attached stream gives just one "out of sync error" and is otherwise perfectly valid as EIT packet are involved.

I think the "Error: We started a PES packet, without a payloadStart!" errors and the bogus data are not related. Probably all DVB user see this bogus data but I don't see many pes related error messages, maybe one in 24 hours.

comment:6 Changed 13 years ago by danielk

It looks like it may be a hardware or driver problem, where signal monitoring causes the hickups in the TS stream.

Otto, can you try changing: const uint TVRec::kSignalMonitoringRate = 50; /* msec */ to const uint TVRec::kSignalMonitoringRate = 5000; /* msec */ in tv_rec.cpp, and report back with whether this lowers the number of PES packet assembly errors?

BTW This may cause problems with LiveTV tuning, due to timeouts being exceeded.

comment:7 Changed 13 years ago by otto at kolsi dot fi

I increased kSignalMonitoringRate to 5000 in tv_rec.cpp, but after backend restart first stream of PES packet errors occured in 15 minutes. So it looks like this did not help.

I have currently old PIII 500Mhz backend and one Technisat AirStar? 2 DVB-T card running 2.6.16-1.2096_FC4 (if the CPU speed has anything to do with this). When I did initial setup around 6 months ago, mythtv-setup scanner did not pick up channels with default timeouts and I had to increase timeouts to get it working.

Changed 13 years ago by Janne <janne-mythtv@…>

Attachment: sigmon_dump.diff added

debugging patch

comment:8 Changed 13 years ago by Janne <janne-mythtv@…>

Otto, please run the backend with sigmon_dump.diff applied until the errors start again. The Patch will dump the data from DVBSignalMonitor to a file in the working directory. After stopping the backend there is at least on file (dvbsignalmonitor0_data.dump).

Please attach the file(s) or if they are too large mail them directly to me.

Changed 13 years ago by Janne <janne-mythtv@…>

Attachment: 1888_fix.diff added

comment:9 Changed 13 years ago by Janne <janne-mythtv@…>

Type: defectpatch

1888_fix.diff changes wrong return value in PESPacket::AddTSPacket().

I can't see how we can start a partial pespacket without payload start in MPEGStreamData::AssemblePSIP(). But it happens with the dump from Otto Kolsi. Then we have such a packet we can't recover and dismiss all further ts packets on the same PID.

With the patch we treat such pes packets now as broken.

comment:10 Changed 13 years ago by otto at kolsi dot fi

Applying the patch fixes this stream of errors -problem. There are still some 'We started a PES packet...' messages but only one or two at the time.

I wonder if we still should investigate this further if there's something to be fixed in MPEGStreamData::AssemblePSIP()..

comment:11 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [10628]) Fixes #1888. Fixes problem with assembling PES packets experienced as "EIT failures with Finnish Channels" with patch from Janne.

AddTSPacket() was returning the wrong value on a packet assembly failure, causing the MythTV to try to assemble the broken packet forever on that PID after this failure case was triggered.

Changed 13 years ago by Mark.Buechler@…

Attachment: logs.tar.bz2 added

Requested valgrind logs..

Note: See TracTickets for help on using tickets.