User jobs not being queued after recording finishes

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
phackmann
Newcomer
Posts: 6
Joined: Sun Aug 05, 2018 9:08 pm
United States of America

User jobs not being queued after recording finishes

Post by phackmann » Sat Sep 08, 2018 1:33 pm

Hi All. I have been using Mythtv for a long time and love it. But, my system took a weird turn lately. I'm using version 0.28.2-5-gae037d0 on a combined frontend/backend. My user jobs that are set to autorun after the recording ends aren't triggering. They are not getting listed in the queue. If I manually go into the recording after it has finished, and tell it to run the user job, the job queues and runs fine. So, I looked in the backend log and found this info:

Code: Select all

Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I TVRecEvent tv_rec.cpp:1074 (HandleStateChange) TVRec[10]: Changing from RecordingOnly to None
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: N RecThread recorders/recorderbase.cpp:496 (FinishRecording) Finished Recording: Container: MPEG2-PS Video Codec: none (720x480 A/R: 3 29.97fps) A$
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I TVRecEvent recordinginfo.cpp:1178 (FinishedRecording) Finished recording How I Met Your Mother "Baby Talk": channel 3248
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I TVRecEvent tv_rec.cpp:990 (FinishedRecording) AutoRunJobs 0x0
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: E CoreContext mainserver.cpp:1171 (customEvent) MainServer: PREVIEW_SUCCESS but no receivers.
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I CoreContext scheduler.cpp:725 (UpdateRecStatus) Updating status for "How I Met Your Mother":"Baby Talk" on cardid 10 (Recording => Recorded)
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I Scheduler scheduler.cpp:2269 (HandleReschedule) Reschedule requested for CHECK -3 6658 0 UpdateRecStatus2 | How I Met Your Mother | Baby Talk | $
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I Scheduler scheduler.cpp:2382 (HandleReschedule) Scheduled 951 items in 0.1 = 0.01 match + 0.00 check + 0.11 place
Sep  8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I PreviewGenerator mythsystemunix.cpp:948 (Fork) Managed child (PID: 3257) has started!  command=/usr/bin/mythpreviewgen --size 0x0 --chanid 3248 $
Sep  8 07:30:31 phmythtv mythbackend: mythbackend[1869]: I ProcessRequest mainserver.cpp:1730 (HandleAnnounce) MainServer: MainServer::ANN Monitor
Sep  8 07:30:31 phmythtv mythbackend: mythbackend[1869]: I ProcessRequest mainserver.cpp:1735 (HandleAnnounce) MainServer: adding: phmythtv(1332ed0) as a client (events: 0)
Sep  8 07:30:31 phmythtv mythbackend: mythbackend[1869]: I ProcessRequest mainserver.cpp:1730 (HandleAnnounce) MainServer: MainServer::ANN Monitor
Sep  8 07:30:31 phmythtv mythbackend: mythbackend[1869]: I ProcessRequest mainserver.cpp:1735 (HandleAnnounce) MainServer: adding: phmythtv(114fe80) as a client (events: 1)
Sep  8 07:30:42 phmythtv mythbackend: mythbackend[1869]: I MythSocketThread(72) mainserver.cpp:7656 (connectionClosed) Monitor sock(1332ed0) 'phmythtv' disconnected
Sep  8 07:30:42 phmythtv mythbackend: mythbackend[1869]: I MythSocketThread(74) mainserver.cpp:7656 (connectionClosed) Monitor sock(114fe80) 'phmythtv' disconnected
Sep  8 07:30:42 phmythtv mythbackend: mythbackend[1869]: I SystemManager mythsystemunix.cpp:354 (run) Managed child (PID: 3257) has exited! command=/usr/bin/mythpreviewgen --size 0x0 --chanid 3248 --star
What looked intriguing to me was this line:

Sep 8 07:30:30 phmythtv mythbackend: mythbackend[1869]: I TVRecEvent tv_rec.cpp:990 (FinishedRecording) AutoRunJobs 0x0

It looks to me like AutoRunJobs should be some non-zero value if there is a user job check marked to be run? Anybody know about that? I did check in the database itself, and the recording was definitely marked to run that job in the Record database with autouserjob1 set with a 1.

Also, the lookup metadata jobs are queuing after the recording ends.

So, I am a bit lost on what else to look for. Help? Anybody?

Thanks a bunch,
PH
Last edited by bill6502 on Sat Sep 08, 2018 3:42 pm, edited 1 time in total.
Reason: Add code block

User avatar
bill6502
Developer
Posts: 1083
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: User jobs not being queued after recording finishes

Post by bill6502 » Sat Sep 08, 2018 3:36 pm

Hi,

Sounds reasonable. Mine looks like this: AutoRunJobs 0xc02

Before going further, are the jobs allowed in mythtv-setup?
General->Job Queue (Backend Specific). Or JobAllowUserJob<x>
in the DB.

phackmann
Newcomer
Posts: 6
Joined: Sun Aug 05, 2018 9:08 pm
United States of America

Re: User jobs not being queued after recording finishes

Post by phackmann » Sat Sep 08, 2018 10:44 pm

Hi,

Yes, the jobs are allowed in mythtv-setup and are marked as such in the database.

PH

User avatar
bill6502
Developer
Posts: 1083
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: User jobs not being queued after recording finishes

Post by bill6502 » Wed Sep 12, 2018 2:06 am

Great. Looks like you've been running with -v jobqueue. If not,
mythbackend --setverbose jobque would do it. Then I'd expect
to see multiple lines every minute as the queue is processed (I do.)

You might just restart the backend or 1st truncate the queue then
restart (from mysql: TRUNCATE TABLE jobqueue;.) If this keeps
coming back, then it sounds like something else is going on.

phackmann
Newcomer
Posts: 6
Joined: Sun Aug 05, 2018 9:08 pm
United States of America

Re: User jobs not being queued after recording finishes

Post by phackmann » Fri Sep 14, 2018 11:59 am

So..it appears to be working again. I have recently put in a Ryzen 1600 cpu and motherboard to improve performance. It was a few days after this that I started having the jobs not running. A couple of days after the jobs issue, the pc locked up. I have the latest kernel installed, but apparently that wasn't enough. It's a known problem with Ryzen cpus and linux that I had hoped was fixed in the latest kernels. I turned off Cool n' Quiet and C-states in the BIOS, and it has been stable so far since then. Oddly enough, the jobs started running again. I can't explain why that is. I don't see exactly how the two would be related, but I guess an unstable system will do weird things. I'll keep an eye on it, but for now I am going to assume it is fixed. Thanks for the input Bill6502, it was appreciated!

PH

Post Reply