Opened 19 years ago

Closed 19 years ago

#358 closed enhancement (invalid)

Still problems with TVRec: Timed out waiting for lock -- aborting recording

Reported by: asmythtv@… Owned by: Isaac Richards
Priority: major Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

This is SVN from 2005/09/19 (which is after all the recent checkins to try to fix this).

Do you notice how it times out waiting for the lock BEFORE it started recording the show? And then did it again. That doesn't make sense to me, but it only did that the one time (I restarted the backend over and over to try to get it to work.)

But I was not able to get it to work, and I was able to tune it using azap, so it was not a problem with the card.

Is it possible to just use the code from azap here? Both programs are GPL, and azap seems to always work. (i.e. azap -r, then just read from /dev/dvb/adapter0/dvr0) if not the actual azap program, at least it's source. azap also seems to have no problem reporting SNR while recording, which acording to the comments seems to be a problem.

2005-09-20 22:15:49.592 mythbackend: MythBackend? started as master server 2005-09-20 22:15:49.611 New DB connection, total: 3 2005-09-20 22:15:49.634 DVB#0 Using DVB card 0, with frontend pcHDTV HD3000 HDTV. 2005-09-20 22:15:50.959 DVB#1 Using DVB card 1, with frontend pcHDTV HD3000 HDTV. 2005-09-20 22:15:54.395 TVRec: Timed out waiting for lock -- aborting recording 2005-09-20 22:15:54.737 New DB scheduler connection 2005-09-20 22:15:54.745 mythbackend version: 0.19.20050712-1 www.mythtv.org 2005-09-20 22:15:54.766 Enabled verbose msgs : important general 2005-09-20 22:15:54.770 AutoExpire?: Found 2 recorders w/max rate of 277 MiB/min 2005-09-20 22:15:54.772 AutoExpire?: space: 3.2 GB w/freq: 5 min 2005-09-20 22:15:56.746 Reschedule requested for id -1. 2005-09-20 22:15:56.941 Scheduled 60 items in 0.2 = 0.11 match + 0.09 place 2005-09-20 22:15:57.013 scheduler: Scheduled items 2005-09-20 22:15:57.052 Recording starts soon, AUTO-Startup assumed 2005-09-20 22:15:57.056 Started recording Wife Swap "Wiggins/Felix?": channel 1004 on cardid 1, sourceid 1 2005-09-20 22:15:57.058 DVB#0 Using DVB card 0, with frontend pcHDTV HD3000 HDTV. 2005-09-20 22:15:57.068 New DB connection, total: 4 2005-09-20 22:15:57.073 New DB connection, total: 5 2005-09-20 22:15:57.075 scheduler: Started recording 2005-09-20 22:15:57.171 Changing from None to RecordingOnly? 2005-09-20 22:15:57.253 Prog title: Wife Swap 2005-09-20 22:15:57.254 DVB#0 Using DVB card 0, with frontend pcHDTV HD3000 HDTV. 2005-09-20 22:16:04.748 mythbackend: Running housekeeping thread 2005-09-20 22:16:11.528 TVRec: Timed out waiting for lock -- aborting recording 2005-09-20 22:16:11.913 TVRec: StartRecorderPost?(): aborting recording

Change History (5)

comment:1 Changed 19 years ago by asmythtv@…

Well I have some extremely interesting logs here:

2005-09-21 12:51:58.214 DVBSM(1)::UpdateValues: Signal Locked
2005-09-21 12:51:58.218 DVBSM(1)::UpdateValues: Waiting for table monitor to start
2005-09-21 12:51:58.222 DVBSM(1)::RunTableMonitor(): begin (# of pids 2)
2005-09-21 12:51:58.223 DVBSM(1)::UpdateValues: Table monitor started
2005-09-21 12:51:58.224 DVBSM(1)::AddPIDFilter(0x0):
2005-09-21 12:51:58.242 DVBSM(1)::AddPIDFilter(0x1ffb):
2005-09-21 12:52:00.906 SigMon Flags are: Seen() Match() Wait(PAT,MGT,VCT,Sig,SNR,BER,UB,)
2005-09-21 12:52:00.909 SML[0]: Name(slock) Val(1) thr(>=1) range(0,1) timeout(3000 ms) is set. Is good.
2005-09-21 12:52:00.914 SML[1]: Name(signal) Val(14745) thr(>=-32768) range(-32768,32767) timeout(3000 ms) is set. Is good.
2005-09-21 12:52:00.916 SML[2]: Name(seen_pat) Val(0) thr(>=1) range(0,1) timeout(0 ms) is set. Is NOT good.
2005-09-21 12:52:00.918 SML[3]: Name(matching_pat) Val(0) thr(>=1) range(0,1) timeout(0 ms) is set. Is NOT good.
2005-09-21 12:52:00.920 SML[4]: Name(seen_mgt) Val(0) thr(>=1) range(0,1) timeout(0 ms) is set. Is NOT good.
2005-09-21 12:52:00.922 SML[5]: Name(matching_mgt) Val(0) thr(>=1) range(0,1) timeout(0 ms) is set. Is NOT good.
2005-09-21 12:52:00.924 SML[6]: Name(seen_vct) Val(0) thr(>=1) range(0,1) timeout(0 ms) is set. Is NOT good.
2005-09-21 12:52:00.943 SML[7]: Name(matching_vct) Val(0) thr(>=1) range(0,1) timeout(0 ms) is set. Is NOT good.
2005-09-21 12:52:00.949 SML[8]: Name(snr) Val(32767) thr(>=-32768) range(-32768,32767) timeout(0 ms) is set. Is good.
2005-09-21 12:52:00.957 SML[9]: Name(ber) Val(0) thr(<=65535) range(0,65535) timeout(0 ms) is set. Is good.
2005-09-21 12:52:00.971 SML[10]: Name(ucb) Val(0) thr(<=65535) range(0,65535) timeout(0 ms) is set. Is good.
2005-09-21 12:52:00.979 TVRec: Timed out waiting for lock -- aborting recording

So, the problem seems to be pat, mgt, and vct. I have no idea what those are, why their timeout is set to 0, or why I even need them in order to get a signal lock. I have a signal lock, just not those.

And SNR seems suspiciously high.

comment:2 Changed 19 years ago by asmythtv@…

Severity: mediumlow
Type: defectenhancement

Hmm, seems I had antenna problems. Moving the antenna fixed everything.

I would like to change this bug report.

I would like mythtv to keep on trying, over and over to get a full signal lock when recording - not just try once, and give up if it doesn't work. I see no reason at all to not keep trying for the entire length of the program. This is especially true with live tv.

With recordings, if it only got a partial recording, it should have some way of indicating that it should try again for that show. (A "recorded with errors" flag, or a count of how many errors.)

Additionally, when signal lock fails a lot more output would be very helpful. First call it "signal lock" not just lock, second when the problem is actually not signal lock but rather PMT etc, then say that!

And finally when users report problems with lock failures, have them not just try azap, but also run dvbscan -c (while azap is running). If it doesn't report the channel, then just because there is a signal lock (as reported by azap) that doesn't mean there is a full signal.

comment:3 Changed 19 years ago by asmythtv@…

Here is a patch to partially do what's needed:

Index: libs/libmythtv/tv_rec.cpp
===================================================================
--- libs/libmythtv/tv_rec.cpp   (revision 7273)
+++ libs/libmythtv/tv_rec.cpp   (working copy)
@@ -1356,18 +1356,16 @@

         if ((t.elapsed() > timeout) || abortRecordingStart)
         {
-            // BEGIN DEBUG CODE
-            if (print_verbose_messages & VB_CHANNEL)
+            if (print_verbose_messages & (VB_CHANNEL | VB_IMPORTANT))
             {
                 QString flagStr = sm_flags_to_string(signalMonitor->GetFlags());
                 VERBOSE(VB_CHANNEL, "SigMon Flags are: "<<flagStr);
                 for (uint i = 0; i < list.size(); ++i)
                 {
-                    VERBOSE(VB_CHANNEL, "SML["<<i<<"]: "
-                            <<list.at(i).toString());
+                    VERBOSE( (list.at(i).IsGood() ? VB_CHANNEL : VB_IMPORTANT),
+                            "SML["<<i<<"]: "<<list.at(i).toString());
                 }
             }
-            // END DEBUG CODE
             return false;
         }

@@ -1410,7 +1408,7 @@
             VERBOSE(VB_IMPORTANT,
                     ((abortRecordingStart) ?
                      "TVRec: StartChannel() -- canceled" :
-                     "TVRec: Timed out waiting for lock -- aborting recording"));
+                     "TVRec: Timed out waiting for good signal -- aborting recording"));
             SetSignalMonitoringRate(0, 0);
             return false;
         }

comment:4 Changed 19 years ago by stephen.gw@…

I couldn't agree more that Myth should continue retrying a recording until it succeeds.

Hopefully this would fix the problem where Myth starts trying to record on a channel that is off-air but is about to start transmitting (e.g. because you've set all recordings to start a few minutes early). This currently results in the entire recording being lost.

comment:5 Changed 19 years ago by danielk

Resolution: invalid
Status: newclosed

There is a MythTV wishlist here:

http://www.mythtv.info/moin.cgi/UserWishList

I check it once in a while.

Meanwhile, the bug tracker is not for feature requests.

Note: See TracTickets for help on using tickets.