mythtv-setup craches after a scan while updating

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

Moderator: Forum Moderators

Post Reply
dswood
Newcomer
Posts: 8
Joined: Sat Nov 04, 2017 12:07 pm
Great Britain

mythtv-setup craches after a scan while updating

Post by dswood »

Hi
When I scan either of my frontends using mythtv-setup, it crashes at the point of updating the database. It does add a lot of the channels but some are missing from more than one mux. It does it every time. This is a build of myth 29 fixes on a orange pi running slackware. I ran it with logging set to debug and put the log in pastebin. The last few lines are:
2017-11-16 20:29:58.956090 D PortChecker::checkPort(): host localhost port 3306 timeLimit 30000 linkLocalOnly 1
Handling Illegal instruction
This is not helping me. I guess it is parsing the data to the database. It maybe that the channel names have special characters like ("'@$) that are not handled well. Can anyone help please.

Regards

Duncan.
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: mythtv-setup craches after a scan while updating

Post by pgbennett »

mythtv-setup should only be run on backend machines, so I don't understand what you mean by scanning your frontend.
Port checker is trying to resolve an IPV6 link local address. You may be able to avoid the problem by using a unique-local or global address or an IPV4 address for the database. If it still occurs you will need to get a back trace with debug enabled, and figure out where the Illegal instruction comes from.
dswood
Newcomer
Posts: 8
Joined: Sat Nov 04, 2017 12:07 pm
Great Britain

Re: mythtv-setup craches after a scan while updating

Post by dswood »

Hi
The frontend bit is ambiguous. I did mean /dev/dvb/adapter0/frontend0.
I took your advise. I did an strace of mythtv-setup and it said and illegal op-code. Not that helpful so I used gdb and it said illegal op-code. A backtrace shows:-
(gdb) bt
#0 0xb29048a0 in QListData::shared_null () at /usr/lib/libQt5Core.so.5
#1 0xb5369bf0 in ChannelImporter::ShowManualChannelPopup(MythMainWindow*, QString, QString, QString&) () at /usr/lib/libmythtv-29.so.29
#2 0xb5369fe4 in ChannelImporter::QueryUserResolve(ChannelImporterBasicStats const&, ScanDTVTransport const&, ChannelInsertInfo&) ()
at /usr/lib/libmythtv-29.so.29
#3 0xb536b29c in ChannelImporter::InsertChannels(std::vector<ScanDTVTransport, std::allocator<ScanDTVTransport> > const&, ChannelImporterBasicStats const&, ChannelImporter::InsertAction, ChannelImporter::ChannelType, std::vector<ScanDTVTransport, std::allocator<ScanDTVTransport> >&) () at /usr/lib/libmythtv-29.so.29
#4 0xb536b994 in ChannelImporter::InsertChannels(std::vector<ScanDTVTransport, std::allocator<ScanDTVTransport> > const&, ChannelImporterBasicStats const&) () at /usr/lib/libmythtv-29.so.29
#5 0xb536c410 in ChannelImporter::Process(std::vector<ScanDTVTransport, std::allocator<ScanDTVTransport> > const&) ()
at /usr/lib/libmythtv-29.so.29
#6 0xb560f194 in () at /usr/lib/libmythtv-29.so.29
#7 0xb560e3b8 in () at /usr/lib/libmythtv-29.so.29
#8 0xb284360c in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#9 0xb324cf14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#10 0xb3254f80 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#11 0xb3254a88 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00000000 in ()
(gdb)
I think the bad op-code is in libQt5Core. So I rebuilt qt-5.9.2. No Good. So I built qt-5.9.3. No good. So I built qt-5.6.3. qt-webkit did not link now so I built qt-webkit-5.6.3. And ..... mythtv does not link. So I built mythtv29-fixes. And .... no good.

I am at a loss. It has taken days and I am no further forward.

Can I populate the channel database from a scan from say dvbv5-scan ?

Kind regards

Duncan.
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: mythtv-setup craches after a scan while updating

Post by pgbennett »

You can edit transports manually using mythtv-setup->channel editor. I don't know how much success you will have with adding them manually. You can also scan existing transports instead of doing a full scan.

We support raspberry pi 2 and 3 but do not officially support orange pi, banana pi, etc. I believe there are people using raspberry pi successfully for a backend, although we only officially support it as a frontend.
dswood
Newcomer
Posts: 8
Joined: Sat Nov 04, 2017 12:07 pm
Great Britain

Re: mythtv-setup craches after a scan while updating

Post by dswood »

Hi
I have seen the editor. It is not so easy to use when you have 250 channels and 2 frontends. For me the orange pi has the edge in terms of speed and i/o bandwidth. So I will stick with it for a while. I am looking at gcc update to 7.2 from 7.1. The is nothing in the changelogs I would say is a must have. Also the compiler optimisations. I used -O2 -march=armv7-a -mfpu=neon-vfpv4 -fno-strict-volatile-bitfields. However it plainly spits out something that gets trapped by the cpu or is it the kernel? Maybe mtune=cortex-a7 would prevent it from following the same path. More research needed.

Thanks for your help.

Kind regards

Duncan
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: mythtv-setup craches after a scan while updating

Post by dizygotheca »

More likely that you've stumbled on a subtle bug in Myth rather than Qt/gcc etc.

The dialog handling looks iffy. Does it crash as soon as you select something on the 2nd dialog it displays ?
If so, then the quick workaround is to ensure you get no conflicts by deleting all channels before you scan.
IIRC the scan will then complete with just 1 dialog, which might get you further.

If you want to try a fix then my hunch is that at
https://github.com/MythTV/mythtv/blob/f ... .cpp#L1538
the code

Code: Select all

QObject::connect(popup, &MythDialogBox::Closed, [&](const QString &, int result)
should be changed to

Code: Select all

QObject::connect(popup, &MythDialogBox::Closed, this, [&](const QString &, int result)
That's the one in your trace. There are 5 other instances in that file you may hit. You can change them all to be safe. The general form is

Code: Select all

QObject::connect(<A>, <B>, [&](<C>)
should be changed to

Code: Select all

QObject::connect(<A>, <B>, this, [&](<C>)
dswood
Newcomer
Posts: 8
Joined: Sat Nov 04, 2017 12:07 pm
Great Britain

Re: mythtv-setup craches after a scan while updating

Post by dswood »

Hello
I have tried the changes you suggest. It does not build.
channelscan/channelimporter.cpp: In member function âChannelImporter::DeleteAction ChannelImporter::QueryUserDelete(const QString&):
channelscan/channelimporter.cpp:1328:35: error: no matching function for call to QObject::connect(MythDialogBox*&, void (MythDialogBox::*)(QString, int), ChannelImporter*, ChannelImporter::QueryUserDelete(const QString&)::<lambda(const QString&, int)>)
});
I shall search around for answers.

Duncan
User avatar
dizygotheca
Developer
Posts: 267
Joined: Wed Sep 03, 2014 9:02 am
Great Britain

Re: mythtv-setup craches after a scan while updating

Post by dizygotheca »

Apologies for the duff advice. I was testing a proper patch today when I too saw an illegal instruction.

My initial hunch was wrong but there is a bug: it crashes after entering a new number for a new channel that has a number conflict.
New conflicting -> Manual Update -> Edit -> Enter -> illegal instruction.

The fix is to comment out the "delete popup" at https://github.com/MythTV/mythtv/blob/f ... .cpp#L1578

Please confirm that fixes all your issues and I'll commit it.
dswood
Newcomer
Posts: 8
Joined: Sat Nov 04, 2017 12:07 pm
Great Britain

Re: mythtv-setup craches after a scan while updating

Post by dswood »

Yes that was it. It no longer crashes. Thank you for the fix. I did update my compiler to 7.2 just in case. That means I could not compile against the old libraries without building them too. I built qt5 and qt5-webkit. That is why my response was slow.

Thanks again.

Kind regards

Duncan
Post Reply