[mythtv-users] Backend Deleting Files for no Reason - *again*...
Greg Oliver
oliver.greg at gmail.com
Tue Jan 14 18:04:23 UTC 2020
On Tue, Jan 14, 2020 at 11:38 AM Michael T. Dean <mtdean at thirdcontact.com>
wrote:
> On 01/14/2020 11:46 AM, Greg Oliver wrote:
> > On Tue, Jan 14, 2020 at 8:10 AM Michael T. Dean wrote:
> >
> >> On 01/14/2020 12:09 AM, Greg Oliver wrote:
> >>> And just to note, it deletes no metadata, just the file. The only
> >>> reason I notice is that it leaves a blue entry in the GUI. I then
> >>> know that file just disappeared. I guess the blue might be theme
> >>> dependent, but it is blue for me.
> >> The only time MythTV will ever delete a recording file without deleting
> >> the recording metadata is when it finishes a transcode and you don't
> >> have the setting:
> >>
> >> Save original files after transcoding (globally)
> >> If enabled and the transcoder is active, the original files will be
> >> renamed to .old once the transcoding is complete.
> >>
> >> enabled.
> > No transcoding set up anywhere either.
>
> I'd still recommend you enable the setting if it's not and check to see
> if you have any *.old files after it happens next time because
> transcoding is the only time it will delete a file without deleting
> metadata (other than, say, someone sending an
> unrelated-to-any-given-recording Myth protocol/services request to
> delete that specific file as if it were a MythVideo file or cover file
> or whatever, in which case we're back to wondering who, outside of
> MythTV, is sending these commands).
>
Sorry - I should have responded that I did check and there is not even a
trascode job defined on my system that I can see. There are also no old
files. I blocked 6544 with iptables when it started happening last and
just noticed last night that UDP port was open, so I blocked it too.
> The only other thing that I can imagine that could be causing it to
> delete a file and leave metadata is if it attempts to delete the file
> and gets an error from the OS (but for some reason the file is actually
> gone), so it thinks the file cannot be deleted, so it leaves the
> metadata to prevent orphaned files, but that should show up clearly in
> your logs at any verbosity level. That still would not explain why it's
> deleting the file (with the intention to delete the metadata after a
> successful deletion of the file) in the first place. The transcode
> scenario seems more likely to me and, if nothing else, ensuring you've
> enabled keeping the original file after transcoding will allow you to
> verify whether or not transcoding is involved.
>
MetadataLookup and CommDetection are the only 2 jobs enabled at all here
from mythtv-setup. There is this in the settings table:
mysql> select * from settings where data like '%transcode%';
+--------------------------+---------------+----------+
| value | data | hostname |
+--------------------------+---------------+----------+
| JobQueueTranscodeCommand | mythtranscode | NULL |
+--------------------------+---------------+----------+
1 row in set (0.00 sec)
No "pieces" old or original of the file(s) remain.
The DoDeleteINDB happens right after the file is deleted in the log, but
obviously that does not happen successfully since they stay blue in the GUI.
Jan 13 18:36:01 mythtv mythbackend: mythbackend[14001]: N DeleteThread
mainserver.cpp:2502 (DeleteRecordedFiles) DeleteRecordedFiles - recording
id 10569 filename /ramdisk/mythtv/recordings/11101_20200108030000.ts
Jan 13 18:36:01 mythtv mythbackend: mythbackend[14001]: N DeleteThread
mainserver.cpp:2579 (DoDeleteInDB) DoDeleteINDB - recording id 10569
(chanid 11101 at 2020-01-10T03:00:00Z)
Of all the times this has happened (16 that I can count from the logs), the
backend is continuously trying to delete the file and cannot any longer.
3120 (DoHandleDeleteRecording) MainServer ERROR when trying to delete file
GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/mythtv/10501_20200110053700.ts.
File doesn't exist. Database metadata will not be removed.
(one example)
root at mythtv:/var/log/mythtv# grep "ERROR when trying to delete file"
mythbackend.log|awk -F':' '{print $6" "$7" "$8" "$9}'|sort |uniq
16
At a loss here... This is what is left in the tables for the latest
episode it happened on - FBI: Most Wanted - "Dopesick"
INSERT INTO `oldrecorded` VALUES (11101,'2020-01-13 03:00:00','2020-01-13
04:00:00','FBI: Most Wanted','Dopesick','Jess LeCroix and his elite team of
FBI Fugitive Task Force agents track a doctor who\'s deeply involved in a
world of organized crime, drugs and lies and is on the run after a phone
call records him delivering his wife\'s fatal shot.',1,1,'Crime
drama','EP03230300','EP032303000001','',0,149,'KTVT-DT',4,0,2,0,0,0);
INSERT INTO `oldrecorded` VALUES (11101,'2020-01-08 03:00:00','2020-01-08
04:00:00','FBI: Most Wanted','Dopesick','Jess LeCroix and his elite team of
FBI Fugitive Task Force agents track a doctor who\'s deeply involved in a
world of organized crime, drugs and lies and is on the run after a phone
call records him delivering his wife\'s fatal shot.',1,1,'Crime
drama','EP03230300','EP032303000001','',0,149,'KTVT-DT',4,1,-3,0,0,0);
INSERT INTO `program` VALUES (11101,'2020-01-08 03:00:00','2020-01-08
04:00:00','FBI: Most Wanted','Dopesick','Jess LeCroix and his elite team of
FBI Fugitive Task Force agents track a doctor who\'s deeply involved in a
world of organized crime, drugs and lies and is on the run after a phone
call records him delivering his wife\'s fatal shot.','Crime
drama','series',0000,0,0,'',0,1,1,0,0,0,'EP03230300','2020-01-07','','','S1E1','EP032303000001',0,0,4,1,0,'DOLBY','NORMAL','HDTV','',1,1,0);
INSERT INTO `program` VALUES (11101,'2020-01-13 03:00:00','2020-01-13
04:00:00','FBI: Most Wanted','Dopesick','Jess LeCroix and his elite team of
FBI Fugitive Task Force agents track a doctor who\'s deeply involved in a
world of organized crime, drugs and lies and is on the run after a phone
call records him delivering his wife\'s fatal shot.','Crime
drama','series',0000,0,0,'',0,1,1,0,0,0,'EP03230300','2020-01-07','','','S1E1','EP032303000001',0,0,4,0,1,'DOLBY','NORMAL','HDTV','',1,1,0);
INSERT INTO `record` VALUES
(149,4,11101,'03:00:00','2020-01-08','04:00:00','2020-01-08','FBI: Most
Wanted','Dopesick','Jess LeCroix and his elite team of FBI Fugitive Task
Force agents track a doctor who\'s deeply involved in a world of organized
crime, drugs and lies and is on the run after a phone call records him
delivering his wife\'s fatal shot.',1,1,'Crime
drama','Default',0,0,0,0,0,0,'Default',6,15,'KTVT-DT','EP03230300','EP032303000001','',0,0,1,0,0,0,0,1,3,'21:00:00',737796,0,0,0,'Default',0,'2020-01-15
03:00:00','2020-01-08 03:00:00',NULL,'Default',100,1024,1);
INSERT INTO `recorded` VALUES (11101,'2020-01-08 03:00:00','2020-01-08
04:00:00','FBI: Most Wanted','Dopesick','Jess LeCroix and his elite team of
FBI Fugitive Task Force agents track a doctor who\'s deeply involved in a
world of organized crime, drugs and lies and is on the run after a phone
call records him delivering his wife\'s fatal shot.',1,1,'Crime
drama','mythtv',0,0,0,0,1,'Default',149,'EP03230300','EP032303000001','ttvdb.py_364088','2020-01-09
01:59:44',6515130976,0,0,'2020-01-07',0,0,0,0,1,0,'11101_20200108030000.ts','2020-01-08
03:00:00','2020-01-08
04:00:00','Default','Default',1,0,0,'Default','2020-01-09
01:59:44',1,10542,'HDHR-161-1');
INSERT INTO `recordedprogram` VALUES (11101,'2020-01-08
03:00:00','2020-01-08 04:00:00','FBI: Most Wanted','Dopesick','Jess LeCroix
and his elite team of FBI Fugitive Task Force agents track a doctor who\'s
deeply involved in a world of organized crime, drugs and lies and is on the
run after a phone call records him delivering his wife\'s fatal
shot.','Crime
drama','series',0000,0,0,'',0,1,1,0,0,0,'EP03230300','2020-01-07','','','S1E1','EP032303000001',0,0,4,1,1,'DOLBY','NORMAL','HDTV,WIDESCREEN,1080','',1,1,0);
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200114/2e2b86d6/attachment.htm>
More information about the mythtv-users
mailing list