Opened 9 months ago

Last modified 9 months ago

#13413 new Bug Report - General

ThemeUpdateChecker does not appear to properly parse new version numbering (possible high resource usage)

Reported by: Gary Buhrmaster Owned by: Stuart Auchterlonie
Priority: minor Milestone: needs_triage
Component: Services - Theme Downloads Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

ThemeUpdateChecker? does not appear to properly parse new version numbering (high resource usage can occur)

In programs/mythfrontend/themechooser.cpp, ThemeUpdateChecker::ThemeUpdateChecker? the code parses the various version strings expecting the version is something of the (now legacy) form 0.28.n, and it attempts to go backwards looking for the most current available theme. Unfortunately, when the move to major number versioning occurred (29.n),it appeared this code was not updated which (depending on the specific version) can result in a large number of requests for themes to the backend that will never be found, but a high resource utilization can occur while checking.

Example extracted backend log for MythTV Version v30.0-26034244e8b (note that only the eight characters of the git hash are numbers, but eight seems to be sufficiently large number for this example):

ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934454/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934453/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934452/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934451/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934450/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934449/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934448/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934447/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934446/Terra/themeinfo.xml'!
ProcessRequest storagegroup.cpp:624 (FindFile) - SG(Temp): FindFile: Unable to find 'remotethemes/30.25934445/Terra/themeinfo.xml'!

One current mitigation is set ThemeUpdateNofication? [sic] to have a value of false (0) in settings to prevent the frontend from trying a large number of requests. Another mitigation is to run master (which I usually do) which will only try "trunk".

It would also be nice if the data name was changed to what I presume was the intended data name of ThemeUpdateNotification? (yes, it will be a dbver update to preserve existing values, which is not optimal).

Relevant info (from mythbackend --version):

MythTV Version : v30.0-26034244e8b
MythTV Branch : fixes/30
Network Protocol : 91
Library API : 30.20181231-1
QT Version : 5.11.3
Options compiled in:
 linux profile use_hidesyms using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_vbox using_ceton using_hdpvr using_ivtv using_joystick_menu using_libcec using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_opengl using_opengl_video using_opengl_themepainter using_openmax using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_xnvctrl using_xnvctrl_external using_libbluray_external using_xrandr using_xv using_profiletype using_systemd_notify using_systemd_journal using_bindings_perl using_bindings_python using_bindings_php using_freetype2 using_mythtranscode using_opengl using_vaapi using_vaapi2 using_vdpau using_openmax using_ffmpeg_threads using_mheg using_libass using_libxml2 using_libmp3lame

Note that in commit b092e46a56874cb395e118bd46a2b2f8d5c3cfda that fixed a case of the changed version numbering Karl Dietz made the comment "there are likely other places that need to be adjusted for the missing 0. prefix", which looks to be prescient.

The fix should probably be backported to at least fixes/30.

Change History (2)

comment:1 Changed 9 months ago by Peter Bennett

Could this be due to an incorrect version string? The version string is supposed to reflect the "git describe --dirty". When I run "git describe --dirty" on v30 I get "v30.0-11-gf11c5aba6e". This pattern does not match the string that you have provided (v30.0-26034244e8b). Your string is missing the "-11" and the g in front of the haash. My mythbackend on my version does not give any of those error messages mentioned above.

If this is the problem, the build/package process needs to be fixed to use the correct version. The build gets the version number from git, or that fails, from a version text file in the source tree. Some package processes fill in the version text file and may be doing it incorrectly.

comment:2 Changed 9 months ago by jpilk

As a quick response, I'll add that the package names that I get from Gary's excellent build script are like

mythtv-31.Pre.61.ga99d3e6d78-100.el7.x86_64.rpm

while 'mythfrontend --version' and 'About' give

Revision: v31-Pre-a99d3e6d789

Branch: Head -> master

Note: See TracTickets for help on using tickets.