[Solved, really] Mythbackend 0.29 Won't Start on Ubuntu 18.04

For discussion of topics specific to MythTV on linux
kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

[Solved, really] Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 12:15 am

I'm moving mythbackend from and old CentOS 6 host (where all the dependencies are screwed up and I can't even run mythtv-setup). I've installed the systemd scripts.

For now I'm leave the database and the storage on the CentOS 6 host. I've updated all the different copies of config.xml (/root/, /home/mythtv and /etc/mythtv). The database is running, I can log into it with a web tool I use.

In /var/log/mythtv/mythbackend.log I see

Code: Select all

Jul 21 15:12:32 myth mythbackend: mythbackend[10498]: I CoreContext mythcontext.cpp:852 (TestDB
connection) Start up testing connections. DB localhost, BE , attempt 1, status dbAwake
Is it attempting to connect to localhost instead of my defined server?
-----
Update:
In the log I see:

Code: Select all

Using configuration directory = /home/mythtv/.mythtv
But then a few lines later I see:

Code: Select all

 myth mythbackend: mythbackend[9699]: I CoreContext mythcontext.cpp:607 (LoadDatabaseSettings) Using localhost value of myth
What does that mean
Last edited by kbocek on Thu Jul 23, 2020 5:17 pm, edited 2 times in total.

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

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by bill6502 » Wed Jul 22, 2020 12:31 am

Yes, dbAwake means that the check for WOL is done and now
it's trying to see if the DB server is alive.

Look for this line in the backend log and that will tell you the directory
it's looking for config.xml in.

Code: Select all

Using configuration directory =
Ref: https://www.mythtv.org/wiki/Config.xml#Troubleshooting

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 12:32 am

Yes:

Code: Select all

Jul 21 15:04:27 myth mythbackend: mythbackend[9203]: N thread_unknown mythdirs.cpp:197 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv
And that config.xml is correct

And now all I get is

Code: Select all

Jul 21 17:34:06 myth systemd[1]: mythbackend.service: Main process exited, code=killed, status=11/SEGV
Jul 21 17:34:06 myth systemd[1]: mythbackend.service: Failed with result 'signal'.

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

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by bill6502 » Wed Jul 22, 2020 12:46 am

sudo systemctl stop mythtv-backend # To be sure it isn't restarting itself
sudo mythbackend --user mythtv --logpath /tmp

Paste/attach the mythbackend............ file in /tmp here please.

If may not help, but I've burned by looking at log snippets too
many times.

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 12:57 am

Here it is:

Code: Select all

2020-07-21 17:53:14.390320 C [15654/15654] thread_unknown mythcommandlineparser.cpp:2619 (ConfigureLogging) - mythbackend version:  [v29.1] www.mythtv.org
2020-07-21 17:53:14.390421 C [15654/15654] thread_unknown mythcommandlineparser.cpp:2621 (ConfigureLogging) - Qt version: compile: 5.9.5, runtime: 5.9.5
2020-07-21 17:53:14.390450 N [15654/15654] thread_unknown mythcommandlineparser.cpp:2623 (ConfigureLogging) - Enabled verbose msgs:  general
2020-07-21 17:53:14.390748 N [15654/15654] thread_unknown logging.cpp:927 (logStart) - Setting Log Level to LOG_INFO
2020-07-21 17:53:14.402956 I [15654/15658] Logger logging.cpp:313 (run) - Added logging to the console
2020-07-21 17:53:14.405460 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2020-07-21 17:53:14.405505 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2020-07-21 17:53:14.405554 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2020-07-21 17:53:14.405591 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2020-07-21 17:53:14.405637 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2020-07-21 17:53:14.405675 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
2020-07-21 17:53:14.405722 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Illegal instruction handler
2020-07-21 17:53:14.405768 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2020-07-21 17:53:14.405817 I [15654/15654] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Hangup handler
2020-07-21 17:53:14.406215 N [15654/15654] thread_unknown mythdirs.cpp:195 (InitializeMythDirs) - Using runtime prefix = /usr
2020-07-21 17:53:14.406235 N [15654/15654] thread_unknown mythdirs.cpp:197 (InitializeMythDirs) - Using configuration directory = /home/mythtv/.mythtv
2020-07-21 17:53:14.406542 I [15654/15654] CoreContext mythcorecontext.cpp:271 (Init) - Assumed character encoding: en_US.UTF-8
2020-07-21 17:53:14.407642 N [15654/15654] CoreContext mythcontext.cpp:599 (LoadDatabaseSettings) - Empty LocalHostName.
2020-07-21 17:53:14.407690 I [15654/15654] CoreContext mythcontext.cpp:607 (LoadDatabaseSettings) - Using localhost value of myth
2020-07-21 17:53:14.407836 I [15654/15654] CoreContext mythcontext.cpp:852 (TestDBconnection) - Start up testing connections. DB amber.pvt, BE , attempt 0, status dbAwake
2020-07-21 17:53:14.504783 I [15654/15657] LogForward loggingserver.cpp:146 (FileLogger) - Added logging to /tmp/mythbackend.20200722005314.15654.log
2020-07-21 17:53:15.449024 N [15654/15654] CoreContext mythcorecontext.cpp:1768 (InitLocale) - Setting QT default locale to en_US
2020-07-21 17:53:15.449075 I [15654/15654] CoreContext mythcorecontext.cpp:1801 (SaveLocaleDefaults) - Current locale en_US
2020-07-21 17:53:15.449252 N [15654/15654] CoreContext mythlocale.cpp:123 (LoadDefaultsFromXML) - Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2020-07-21 17:53:15.469952 I [15654/15654] CoreContext mythtranslation.cpp:73 (load) - Loading en_us translation for module mythfrontend
2020-07-21 17:53:15.479052 I [15654/15654] CoreContext schemawizard.cpp:120 (Compare) - Current MythTV Schema Version (DBSchemaVer): 1348
2020-07-21 17:53:15.480322 I [15654/15654] CoreContext mythtranslation.cpp:73 (load) - Loading en_us translation for module mythfrontend
2020-07-21 17:53:15.482364 N [15654/15654] CoreContext main_helpers.cpp:597 (run_backend) - MythBackend: Starting up as the master server.
2020-07-21 17:53:16.425618 I [15654/15654] CoreContext programinfo.cpp:2382 (CheckProgramIDAuthorities) - Found 1 distinct programid authorities
2020-07-21 17:53:16.426641 I [15654/15674] Scheduler mythdbcon.cpp:458 (getStaticCon) - New static DB connectionSchedCon
2020-07-21 17:53:16.428453 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'LogClean'.
2020-07-21 17:53:16.428842 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'DBCleanup'.
2020-07-21 17:53:16.429185 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'ThemeUpdateNotifications'.
2020-07-21 17:53:16.429549 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'RecordedArtworkUpdate'.
2020-07-21 17:53:16.434064 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'MythFillDB'.
2020-07-21 17:53:16.436432 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'JobQueueRecover'.
2020-07-21 17:53:16.436651 I [15654/15654] CoreContext housekeeper.cpp:633 (RegisterTask) - Registering HouseKeeperTask 'HardwareProfiler'.
2020-07-21 17:53:16.440478 I [15654/15654] CoreContext housekeeper.cpp:699 (Start) - Queueing HouseKeeperTask 'HardwareProfiler'.
2020-07-21 17:53:16.443993 I [15654/15654] CoreContext housekeeper.cpp:706 (Start) - Starting HouseKeeper.
2020-07-21 17:53:16.458288 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP 0.0.0.0:6544
2020-07-21 17:53:16.460241 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP [::]:6544
2020-07-21 17:53:16.460413 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP 0.0.0.0:6554
2020-07-21 17:53:16.460543 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP [::]:6554
2020-07-21 17:53:16.460785 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP 0.0.0.0:6549
2020-07-21 17:53:16.460913 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP [::]:6549
2020-07-21 17:53:19.460316 I [15654/15674] Scheduler scheduler.cpp:2356 (HandleReschedule) - Reschedule requested for MATCH 0 0 0 - SchedulerInit
2020-07-21 17:53:20.889349 I [15654/15654] CoreContext main_helpers.cpp:687 (run_backend) - Main::Registering HttpStatus Extension
2020-07-21 17:53:20.892508 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP 0.0.0.0:6543
2020-07-21 17:53:20.892659 I [15654/15654] CoreContext serverpool.cpp:422 (listen) - Listening on TCP [::]:6543
2020-07-21 17:53:20.898191 N [15654/15654] CoreContext autoexpire.cpp:251 (CalcParams) - AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min
2020-07-21 17:53:21.792421 I [15654/15654] CoreContext bonjourregister.cpp:118 (BonjourCallback) - Bonjour: Service registration complete: name 'Mythbackend on myth' type '_mythbackend._tcp.' domain: 'local.'
2020-07-21 17:53:25.613702 W [15654/15674] Scheduler scheduler.cpp:1071 (BuildListMaps) - Scheduler, Warning: Ignored 0 entries for invalid input 19
2020-07-21 17:53:25.613740 W [15654/15674] Scheduler scheduler.cpp:1071 (BuildListMaps) - Scheduler, Warning: Ignored 0 entries for invalid input 20
2020-07-21 17:53:25.613765 W [15654/15674] Scheduler scheduler.cpp:1071 (BuildListMaps) - Scheduler, Warning: Ignored 0 entries for invalid input 21
2020-07-21 17:53:25.613792 W [15654/15674] Scheduler scheduler.cpp:1071 (BuildListMaps) - Scheduler, Warning: Ignored 0 entries for invalid input 22
2020-07-21 17:53:25.613818 W [15654/15674] Scheduler scheduler.cpp:1071 (BuildListMaps) - Scheduler, Warning: Ignored 0 entries for invalid input 204
2020-07-21 17:53:25.616897 C [15654/15654] CoreContext signalhandling.cpp:305 (handleSignal) - Received Segmentation fault: Code 1, PID 16, UID 0, Value 0x7fbd08017b0


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

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by bill6502 » Wed Jul 22, 2020 1:11 am

OK: Start up testing connections. DB amber.pvt, BE , attempt 0, status dbAwake says
the DB server is at amber.pvt.

Now, it's dropping core. If enabled, core dumps may be in /tmp, although that's configurable.

See: https://www.mythtv.org/wiki/Debugging#Using_core_files explains how to use core files.
But there's a lot of other information that Wiki.

The Received Segmentation fault: Code 1, PID 16, UID 0, Value 0x7fbd08017b0 fault line is only a clue,
by itself, the reason for the fault can't be determined.

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 1:12 am

Maybe I need to make the jump to 31? I wanted to do this in steps but it's not working.

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

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by bill6502 » Wed Jul 22, 2020 1:26 am

v29 is the most used (currently) version. It's possible that you've got an old
version. Try:

Code: Select all

sudo add-apt-repository ppa:mythbuntu/0.29
sudo apt update
sudo apt dist-upgrade
[I think the Ubuntu folks called 0.29 but it's really 29 (0.28 was the last 0.version).]

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 3:21 pm

That's exactly how I installed. I definitely have 0.29.1 installed.

I have seen both 0.29 and 29 used to describe this version.

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

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by bill6502 » Wed Jul 22, 2020 4:24 pm

To answer your initial question about:

Code: Select all

CoreContext mythcontext.cpp:607 (LoadDatabaseSettings) Using localhost value of myth
'myth' is your hostname and the name of the profile MythTV uses to access settings
and many other per host things. The message is better in later releases.

Since you're up to date, you can use mythtv-setup to check your
capture cards, as that's the last thing being checked before the
SEGV.

If that doesn't point out any problems, then the stack trace is the
next choice. That has the ability to locate the method that's
failing. Type these two commands:

Code: Select all

cat << "EOF" | tee ${HOME}/gdbcommands 
handle SIGPIPE nostop noprint
handle SIG33 nostop noprint
set logging on
set pagination off
set breakpoint pending on
break qFatal
set args --logpath /tmp -v general,schedule
run
thread apply all bt full
set logging off
EOF

gdb mythbackend -x ${HOME}/gdbcommands
Exit gdb by typing quit (and answer 'y' if prompted), then attach the gdb.txt file if you can, or put it at pastebin.com

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 5:06 pm

Bill,
You are referencing mythfrontend. My issue is on a backend-only host. I don't have the frontend installed. However here is the gdb.txt file off of mythbackend:
https://pastebin.com/BpkiBwnn
Last edited by kbocek on Wed Jul 22, 2020 5:12 pm, edited 1 time in total.

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 5:25 pm


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

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by bill6502 » Wed Jul 22, 2020 5:27 pm

Hmm, no symbol table.

dpkg -l mythtv-dbg, install it if it isn't already.

type mythbackend, if it's a shell script, use mythbackend.real

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 5:29 pm

It's there:

Code: Select all

# dpkg -l mythtv-dbg
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                               Version                Architecture           Description
+++-==================================-======================-======================-=========================================================================
ii  mythtv-dbg                         2:29.1+fixes.201909121 amd64                  Debug symbols for mythtv packages
Oh wait that says reinstall

kbocek
Senior
Posts: 176
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythbackend 0.29 Won't Start on Ubuntu 18.04

Post by kbocek » Wed Jul 22, 2020 5:30 pm

Now I'm not sure:

Code: Select all

# apt install mythtv-dbg
Reading package lists... Done
Building dependency tree
Reading state information... Done
mythtv-dbg is already the newest version (2:29.1+fixes.201909121531.4c432df~ubuntu18.04.1).
mythtv-dbg set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Post Reply