Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start time for mythfilldatabase increments by 4 minutes every day. #1048

Open
mathog opened this issue Feb 22, 2025 · 0 comments
Open

Start time for mythfilldatabase increments by 4 minutes every day. #1048

mathog opened this issue Feb 22, 2025 · 0 comments

Comments

@mathog
Copy link

mathog commented Feb 22, 2025

Ubuntu 18.04.06 LTS

  • MythTV version:
    2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1

  • Package version:
    2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1
    deb http://ppa.launchpad.net/mythbuntu/30/ubuntu bionic main

  • Component:
    mythbackend (presumably). It affects the time mythfilldatabase runs, but that is the victim in this case.

What steps will reproduce the bug?

Run normally with backend only running mythfilldatabase by itself. Look at the times when mythfilldatabase runs and they increment up by 4 minutes every day.

How often does it reproduce? Is there a required condition?

100%. One discontinuous time change was observed in many months, perhaps mythtv_setup was run for a channel scan and mythfilldatabase from there.

What is the expected behaviour?

mythfilldatabase runs at the same time each day, or at the first available time after that.

What do you see instead?

These are the relevant records from mythbackend.log:

Feb 14 20:39:45 mediahog mythbackend: mythbackend[1372]: I HouseKeeping housekeeper.cpp:142 (Run) Running HouseKeeperTask 'MythFillDB'.
Feb 14 20:42:45 mediahog mythbackend: mythbackend[1372]: I Scheduler scheduler.cpp:2356 (HandleReschedule) Reschedule requested for MATCH 0 0 0 - MythFillDatabase
Feb 14 20:42:45 mediahog mythbackend: mythbackend[1372]: I HouseKeeping housekeeper.cpp:160 (Run) HouseKeeperTask 'MythFillDB' Finished Successfully.
Feb 15 20:43:34 mediahog mythbackend: mythbackend[1352]: I HouseKeeping housekeeper.cpp:142 (Run) Running HouseKeeperTask 'MythFillDB'.
Feb 15 20:47:27 mediahog mythbackend: mythbackend[1352]: I Scheduler scheduler.cpp:2356 (HandleReschedule) Reschedule requested for MATCH 0 0 0 - MythFillDatabase
Feb 15 20:47:28 mediahog mythbackend: mythbackend[1352]: I HouseKeeping housekeeper.cpp:160 (Run) HouseKeeperTask 'MythFillDB' Finished Successfully.
Feb 16 20:47:40 mediahog mythbackend: mythbackend[1353]: I HouseKeeping housekeeper.cpp:142 (Run) Running HouseKeeperTask 'MythFillDB'.
Feb 16 20:51:45 mediahog mythbackend: mythbackend[1353]: I Scheduler scheduler.cpp:2356 (HandleReschedule) Reschedule requested for MATCH 0 0 0 - MythFillDatabase
Feb 16 20:51:45 mediahog mythbackend: mythbackend[1353]: I HouseKeeping housekeeper.cpp:160 (Run) HouseKeeperTask 'MythFillDB' Finished Successfully.
Feb 17 20:52:14 mediahog mythbackend: mythbackend[1353]: I HouseKeeping housekeeper.cpp:142 (Run) Running HouseKeeperTask 'MythFillDB'.
Feb 17 20:56:00 mediahog mythbackend: mythbackend[1353]: I Scheduler scheduler.cpp:2356 (HandleReschedule) Reschedule requested for MATCH 0 0 0 - MythFillDatabase
Feb 17 20:56:01 mediahog mythbackend: mythbackend[1353]: I HouseKeeping housekeeper.cpp:160 (Run) HouseKeeperTask 'MythFillDB' Finished Successfully.
Feb 18 20:56:07 mediahog mythbackend: mythbackend[1369]: I HouseKeeping housekeeper.cpp:142 (Run) Running HouseKeeperTask 'MythFillDB'.
Feb 18 21:00:08 mediahog mythbackend: mythbackend[1369]: I Scheduler scheduler.cpp:2356 (HandleReschedule) Reschedule requested for MATCH 0 0 0 - MythFillDatabase
Feb 18 21:00:09 mediahog mythbackend: mythbackend[1369]: I HouseKeeping housekeeper.cpp:160 (Run) HouseKeeperTask 'MythFillDB' Finished Successfully.

What happens is that each day the time set on the previous day's Reschedule is when the process starts. When the process ends the Reschedule is set for that end time, it does not try to reuse the current start time. Since it takes about 4 minutes for mythfilldatabase to run the start times inch up 4 minutes at a time. I don't particularly see the utility in this, as "run mythfilldatabase once per day 10 minutes after mythbackend starts" would work fine for me. There must be some reason for this though.

Perhaps coincidentally, my system glitched on Feb 19 2025 after the next start time was set to 21:00:08 on Feb 18. Mythfilldatabase would not run, and the system could not exit because this happened:

mysql --user=mythtv --password --execute "SELECT * FROM settings WHERE value LIKE 'DailyWakeup%'" mythconverg
Enter password:
+-------------------------+-------+----------+
| value | data | hostname |
+-------------------------+-------+----------+
| DailyWakeupEndPeriod1 | 23:56 | NULL |
| DailyWakeupEndPeriod2 | 00:00 | NULL |
| DailyWakeupStartPeriod1 | 23:58 | NULL |
| DailyWakeupStartPeriod2 | 00:00 | NULL |
+-------------------------+-------+----------+

which in mythwelcome caused a message:

mythtv is in a daily wakeup/shutdown period ...

I did not manually set those values, and my wife, who is the primary user, would have no way of doing so using the IR remote (no keyboard). Anyway, using a keyboard in mythwelcome, press "i", set those values back to 00:00, and exit from mythwelcome was once again possible. Mythfilldatabase then ran normally.

That whole saga is here: https://forum.mythtv.org/viewtopic.php?f=36&t=5847

Additional information

I expect the 4 minutes seen on my system will be different elsewhere, depending on how the EPG data is obtained and how much of it there is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant