Opened 13 years ago

Closed 13 years ago

#1981 closed defect (fixed)

DVB Recording fails when channel transitions from off-air to on-air

Reported by: karl@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: dvb Version: head
Severity: low Keywords:
Cc: Stuart Auchterlonie Ticket locked: no

Description

When recording a program that overruns (due to extra few mins on recording end) the DVB channel going offline the recording hangs.

The item is marked red in the recordings list and the card is in use, the output file does not grow and if you right click and say "stop recording" the problem goes away.

The subsequent recording is OK.

I assume the recording thread is blocked reading data from the DVB stream.

Attachments (3)

mythbackend.log.gz (135.7 KB) - added by anonymous 13 years ago.
saddle.log (84.1 KB) - added by anonymous 13 years ago.
backend-offair-onair.gdb.log (40.6 KB) - added by Stuart Auchterlonie 13 years ago.
backtrace after channel transition

Download all attachments as: .zip

Change History (19)

comment:1 Changed 13 years ago by danielk

Milestone: 0.19.10.20
Owner: changed from Isaac Richards to danielk
Severity: highlow
Version: 0.19head

comment:2 Changed 13 years ago by danielk

Can you explain this better?

In particular does it stay in this limbo mode longer than the recording would normally last?

Is the behaviour any different in SVN head?

Also can you please attach a '-v record,channel,siparser' log from when this happens with SVN head...

comment:3 Changed 13 years ago by (none)

The recording is shown to be still running way beyond the end of the programme. In fact it will continue to the following day when the channel comes back on line (UK CBBC goes offline at 6pm sharpish).

The recordings are set to run for an additional 5 mins from end - but hte channel goes offline 1 minute after end of program.

The recorded file stops growing and if you go to the recording menu and press "stop recording" the card is freed up.

Its hard for me to test on latest - as I have no spare hardware - this is a production system driving 2 TV's with diskless clients booting over NFS - works a treat - but good Myth test harness.

I'll think of a way of testing...... (I have a friend with a later version)....

Changed 13 years ago by anonymous

Attachment: mythbackend.log.gz added

comment:4 Changed 13 years ago by anonymous

As asked I've tested this for Karl on version 10244 (see mythbackend log attached).

I set it to record 2 programmes on seperate DVB tuners, both recording 2mins before and 5mins after. 1) Blue Peter which starts at 18:30 and ends at 19:00 on CBBC (this channel goes off air at 19:00). 2) World Cup Outtakes which starts at 19:00 and ends at 19:30 on BBC3 (this channel doesn't come on air till 19:00).

  • Blue Peter recorded correctly, so the specific problem that Karl is seeing is fixed in SVN.
  • World Cup Outtakes however failed to record properly. I ended up with a small file of about 35mb of just black for 1min 24sec.

So there is still a problem in SVN with recording programmes near to the time when channels are off air. After these recording where finished both tuners were released.

Hope that helps, Ash.

Changed 13 years ago by anonymous

Attachment: saddle.log added

comment:5 Changed 13 years ago by Karl

My daughter records Saddle club at 17:30 on CBBC - which goes offline at 6pm.

The addached file shows the previous one stopping at 6am when the channel comes back online - and the next recording starting at 17:30 and not stopping until I manually stopped it on the recording GUI later that night when I ran pout of cards!.

comment:6 Changed 13 years ago by (none)

Milestone: 0.20
Version: head0.19

Im running 0.19 with latest patches. One server - diskless client booting over NFS, and other ubuntu clients.

comment:7 Changed 13 years ago by anonymous

Milestone: 0.20
Version: 0.19head

Read the ticket howto. Do not mess with the milestone.

comment:8 Changed 13 years ago by Stuart Auchterlonie

Cc: Stuart Auchterlonie added
Summary: DVB Recording hangs when channel goes offlineDVB Recording fails when channel transitions from off-air to on-air

I've tested the 2nd case, recording from a channel which transitions from off-air to on air and can confirm the problem exists.

The resulting recording contains no audio streams only a single short video stream containing only black.

The off-air channel PMT would contain only data (DSMCC) streams when off-air, when it transitions to on-air then there should be a PMT rev which then includes video and audio streams. Need to check the PMT change handling.

I'm currently setup to only record dsmcc streams when in livetv.

comment:9 Changed 13 years ago by Karl

I must apologise - but I filed this bug in wrong section - should have been the 0.19 patches release. So I wanted it to be fixed in .19.1. Sorry.

comment:10 Changed 13 years ago by danielk

Karl, can you repeat a recording like the World Cup one, with SVN head, with the same verbosity flags, and with the patch from #2006 applied? This will hopefully tell us where things get stuck.

In case it doesn't, can you also run this under gdb and about two minutes after the channel actually goes on-air, can you hit Ctrl-C and create a full backtrace (you will need to compile for debugging). That might indicate where the problem is if my debugging additions do not.

=======

Stuart A, it looks like the PMT is handled correctly for the World Cup recording.

2006-06-22 18:58:52.337 Program Map Table ver(29) pid(0x10ff) pnum(1) len(28)

 Stream #0 pid(0x26c) type(video-mpeg2  0x2)
 Stream #1 pid(0x26d) type(audio-mp1-layer[1,2,3]  0x3)
 Stream #2 pid(0x26e) type(audio-mp1-layer[1,2,3]  0x3)

2006-06-22 18:58:52.338 Writing PAT & PMT @17548108 + 424128
2006-06-22 18:58:52.338 DVBRec(1): Resetting Demux Filters
2006-06-22 18:58:52.339 DVBRec(1): Adding pid 0x26c size(3600384)
2006-06-22 18:58:52.383 DVBRec(1): Adding pid 0x26d size(94208)
2006-06-22 18:58:52.383 DVBRec(1): Adding pid 0x26f size(94208)
2006-06-22 18:58:52.383 DVBRec(1): Adding pid 0x26e size(94208)

(I'm assuming that 0x26f is the PCR stream.)

But then when you look at the writing messages that follow:

2006-06-22 18:58:52.398 Writing PAT & PMT @1084264808 + 2049952
2006-06-22 18:58:53.571 Writing PAT & PMT @1084457320 + 1873232
2006-06-22 18:58:54.731 Writing PAT & PMT @1084648892 + 1731856
2006-06-22 18:58:55.907 Writing PAT & PMT @1084848924 + 424128
2006-06-22 18:58:57.071 Writing PAT & PMT @1085039180 + 424128
2006-06-22 18:58:58.243 Writing PAT & PMT @1085234136 + 1625824

These are all for the other recording. So it looks like something, maybe a mutex, prevents any further processing of the stream.

Changed 13 years ago by Stuart Auchterlonie

backtrace after channel transition

comment:11 Changed 13 years ago by Stuart Auchterlonie

Added backtrace from the backend after the channel has transitioned from off-air to on-air.

comment:12 Changed 13 years ago by danielk

Since the signal monitor is still running in Stuart's backtrace, it looks like maybe this is with TV only or audio only recording. If so, I think there may be two different problems: one with standard recording which includes interactive TV streams, and a different problem with "TV only" recording.

If there is a "TV only" recording problem, then it is probably because of version tracking. Either the broadcaster isn't changing the PMT version when it is updated, or we are traching it incorrectly somehow.

I also need the log from the patched version.

comment:13 Changed 13 years ago by danielk

(In [10395]) Refs #1981. Fixes copy-n-paste error that made video a required component of an "audio only" recording instead of audio.

comment:14 Changed 13 years ago by anonymous

(from #2006) I know very little about the workings of the DVB code but I've put some more debug lines into my version. It appears that DVBRecorder::RunDummyVideo?() isn't exiting the loop (while (! _stop_dummy)). I'll try to dig further into there.

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

Component: mythtvdvb

comment:16 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [10457]) Fixes #1981. Refs #2006. Applies David Matthews' patch for deadlock in DVBRadio & UK Interactive TV when the PIDs change.

Note: See TracTickets for help on using tickets.