Opened 14 years ago

Closed 13 years ago

#348 closed defect (invalid)

mythfilldatabase run causing AV sync issues

Reported by: jonese@… Owned by: Isaac Richards
Priority: critical Milestone: unknown
Component: mythtv Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Yes, this sounds impossible, but there is some conflict when you're running mythfilldatabase and recording a program at the same time.

Using SVN 7245 (Sept 13) (I can't use latest until Live-TV is fixed). PVR-250 & PVR-150 encoder, ivtv-0.3.7k, kernel-2.6.12

For the past week or so I've been having an audio video sync issue of several seconds thought the program, but ONLY in one program at a specific point in the recording. It would happen at about 24 minutes into a recording every time (I record the BBC news between 03:59 and 04:31 every day). It just so happens that I schedule my mythfilldatabase at that time as well.

When I look at the backend log at the exact time that I start seeing AV sync issues (you can see the video jump and the audio studder).


Your subscription expires on 10/07/05 04:14:57 Grab complete. Actual data from Sun Sep 18 06:00:00 2005 to Mon Sep 19 06:00:00 2005 (UTC) Clearing data for source... Clearing from Sun Sep 18 00:00:00 2005 to Mon Sep 19 00:00:00 2005 (localtime) 2005-09-17 04:23:00.250 New DB connection, total: 3 2005-09-17 04:23:00.275 New DB connection, total: 4 2005-09-17 04:23:10.837 IOBOUND - blocking in ThreadedFileWriter::Write() 2005-09-17 04:23:15.885 IOBOUND - blocking in ThreadedFileWriter::Write() 2005-09-17 04:23:20.785 IOBOUND - blocking in ThreadedFileWriter::Write() 2005-09-17 04:23:26.338 IOBOUND - blocking in ThreadedFileWriter::Write() Data for source cleared... Main temp tables populated. Updating myth channels... Updating icons for sourceid: 1


After that event, the recoding is about 5 seconds out of sync bewteen the audio and video for the remainder of the recording.

All other recordings are fine.

Change History (8)

comment:1 Changed 14 years ago by jonese@…

Sorry for the bad formatting, this should be cleaner.

Retrieving datadirect data...
Grabbing data for Sat Sep 17 2005 offset 1
From : Sun Sep 18 06:00:00 2005 To : Mon Sep 19 06:00:00 2005 (UTC)
Your subscription expires on 10/07/05 04:14:57
Grab complete.  Actual data from Sun Sep 18 06:00:00 2005 to Mon Sep 19 06:00:00 2005 (UTC)
Clearing data for source...
Clearing from Sun Sep 18 00:00:00 2005 to Mon Sep 19 00:00:00 2005 (localtime)
2005-09-17 04:23:00.250 New DB connection, total: 3
2005-09-17 04:23:00.275 New DB connection, total: 4
2005-09-17 04:23:10.837 IOBOUND - blocking in ThreadedFileWriter::Write()
2005-09-17 04:23:15.885 IOBOUND - blocking in ThreadedFileWriter::Write()
2005-09-17 04:23:20.785 IOBOUND - blocking in ThreadedFileWriter::Write()
2005-09-17 04:23:26.338 IOBOUND - blocking in ThreadedFileWriter::Write()
Data for source cleared...
Main temp tables populated.  Updating myth channels...
Updating icons for sourceid: 1
2005-09-17 04:23:30.823 IOBOUND - blocking in ThreadedFileWriter::Write()
Channels updated..  Updating programs...
Fetching data for Sat Sep 17 2005

comment:2 Changed 14 years ago by anonymous

I've noticed something similar, but less severe, just causing stuttering playback that always returns to sync. I believe it's not just mythfilldatabase, but anything that uses wget. While the xfer is in progress, things stutter. Maybe wget isn't very friendly w/ the disk?

comment:3 Changed 14 years ago by Isaac Richards

Resolution: invalid
Status: newclosed

If your system can't handle mythfilldatabase running during capture, schedule it for when you don't have anything recording.

comment:4 Changed 14 years ago by anonymous

I can see it's not necessarily a MythTV issue, but I don't think it's because the system can't handle it. I see the problem, too, but only with mythfilldatabase or wget. I can unzip huge files, recompile large projects, and copy large directory structures around on the same partition mythfilldatabase uses while capturing without issue.

comment:5 Changed 14 years ago by jonese@…

Resolution: invalid
Status: closedreopened

My system is 2.8GHz, hardly a low end system to accomplish the task of wget/sql processing.

mythfilldatabase should not bring the system down to it's knees while a PVR250 recording is taking place (that only takes an additional 1 or 2% system load).

Scheduling mythfilldatabase outside of recordings is not a fix, but a workaround.

I fail to see how this "invalid" ticket especially since it causes corrupt recordings.

comment:6 Changed 14 years ago by Isaac Richards

Resolution: invalid
Status: reopenedclosed

comment:7 Changed 13 years ago by lars+mythtv@…

Resolution: invalid
Status: closedreopened

This is an old ticket, but I'm running into the same problem a year later. Running mythfilldatabase when an encoder is active invariably causes 'IOBOUND' errors and results in less than stellar recordings. This is with MythTV 0.19 running on a 2.66Ghz system with a single 7200RPM ST3160021A drive.

I agree with the original poster -- it's odd that populating the program database should swamp the system. It's possible that something as simple as sleeping a few milliseconds between SQL statements could reduce the impact of this on the system (I haven't looked at the code -- perhaps the SQL needs optimizing?).

Another solution would be adding a 'run mythfilldatabase only when encoders are idle' feature to the scheduler.

comment:8 Changed 13 years ago by anonymous

Resolution: invalid
Status: reopenedclosed

See #1660 for a ticket more descriptive of the problem.

Note: See TracTickets for help on using tickets.