<div dir="ltr">On Thu, Oct 3, 2019 at 8:14 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 3 Oct 2019 16:55:51 +0200, you wrote:<br>
<br>
>On Sun, 18 Aug 2019 8:01 AM, Stephen Worthington wrote:<br>
><br>
>> I presume that the "vuplusip" name is in your /etc/hosts file.<br>
><br>
>vuplusip is just a dummy, but name resolution works.<br>
><br>
>> The error messages all seem to be about losing connection to the<br>
>> database server, and everything else seems consequential from that. So<br>
>> I think we need to know a bit more about the MythTV setup. Is this a<br>
>> new MythTV install? What Linux distro is it? What database are you<br>
>> using, MySQL or MariaDB? Is MythTV configured to use localhost, or is<br>
>> it set up to allow external connections and use the Ethernet port's<br>
>> address? Are there any tuners other than the IPTV ones?<br>
><br>
>My Installation:<br>
><br>
>Mythtv 0.29+fixes on Ubuntu 18.04 (mythbutbu-packages):<br>
>1 master-backend configured with a HDHR3-4DC DVB-C tunerbox and the vu+-IPTV<br>
>1 combined (slave-)BE/FE configured with two DVB-C pci-tuner-cards (KNC<br>
>ONE TV Station) + 1 CI-Module (Alphacrypt).<br>
>1 FE on an Intel NUC<br>
><br>
>MariaDB 10.4.8 in a separate docker container (Ubuntu 18.04).<br>
><br>
>Everything works fine, but when I switch livetv to the vu+-tuner I get<br>
>this error:<br>
><br>
>Oct  3 15:14:35 homer mythfrontend.real: mythfrontend[19587]: E<br>
>CoreContext livetvchain.cpp:289 (GetEntryAt) It appears that your<br>
>backend may be misconfigured.  Check your backend logs to determine<br>
>whether your inputs, lineups, channels, or storage configuration are<br>
>reporting errors.  This issue is commonly caused by failing to complete<br>
>all setup steps properly.  You may wish to review the documentation for<br>
>mythtv-setup.<br>
><br>
>Then the mariadb crashes:<br>
>191003 15:14:34 [ERROR] mysqld got signal 11 ;<br>
<br>
I have never had MariaDB crash - that is a pretty drastic problem. It<br>
is a likely the cause of your problems, as MythTV can not work without<br>
access to its data from the database, and does many database accesses<br>
when starting Live TV.  Signal 11 is SIGSEGV - a segmentation error.<br>
Something in MariaDB is attempting to access memory outside the<br>
allocated areas.  So this pretty much has to be a MariaDB bug, but<br>
triggered by whatever MythTV was doing at the time.  Since you are<br>
running your MariaDB in a container, which is unusual for MythTV<br>
users, that raises suspicions that there could be a misconfiguration<br>
of the container that is causing the problem.  Some sort of resource<br>
starvation comes to mind.  If you want to find out exactly what MythTV<br>
is doing that triggers the problem, you can turn on debug output of<br>
all the database SQL requests in mythbackend.  While mythbackend is<br>
running, this command will tell it to start verbose logging of the<br>
SQL:<br>
<br>
mythbackend --setverbose database<br>
<br>
and this will turn off that verbose SQL output:<br>
<br>
mythbackend --setverbose nodatabase<br>
<br>
You should run this second copy of mythbackend as the same user that<br>
the main mythbackend is run from.  In my case (Ubuntu) that is root.<br>
The second copy of mythbackend just sends the appropriate logging<br>
command to the main copy and shuts down again.  But if you mistype the<br>
options on its command line, it will try to run as a daemon like the<br>
main copy, and you will need to manually kill it.<br>
<br>
There should also be a MariaDB log file that has more information<br>
about the crash.  You may need to change your MariaDB and/or Docker<br>
setup to get that.  In Ubuntu 18.04, the MariaDB log files are<br>
normally found in /var/log/mysql.<br>
<br>
It would also be helpful to increase the logging for mythbackend's<br>
recording process, so it logs more about how it starts up its tuners:<br>
<br>
mythbackend --setverbose record<br>
<br>
You can set multiple logging options in the same command:<br>
<br>
mythbackend --setverbose database,record<br>
<br>
When testing tuners, it is often better to do that by starting a<br>
recording, rather than using Live TV.  Live TV is rather more<br>
complicated than normal recordings.  I usually just set up a manual<br>
recording (Manage Recordings > Schedule Recordings > Manual Schedule)<br>
to test a tuner.  Although you can only make a manual recording start<br>
at 5 minute intervals, you can get the time down to one minute from<br>
the current time by using the pre-roll setting when you create the<br>
manual recording.  So if the current time is 15:20 and you want to<br>
start your test recording at 15:21, you set the start time to be 15:25<br>
and the duration to 5 minutes.  Then on the next screen you go into<br>
Schedule Options and set the pre-roll to be 4 minutes ("Start<br>
recording 4 minutes early").  You can then set the post-roll to "End<br>
recording 8 minutes early" and get a one minute recording.  Or you can<br>
just manually stop the recording from Manage Recordings > Upcoming<br>
Recordings once it has started.<br></blockquote><div><br></div><div><div style="font-family:monospace,monospace" class="gmail_default">I also find it easier to rely on packet dumps versus MySQL logging.  To find the query that is causing it, you can run tcpdump on lo (for a combined backend/database server), or on your ethernet interface is the database is on another server.</div><div style="font-family:monospace,monospace" class="gmail_default"><br></div><div style="font-family:monospace,monospace" class="gmail_default">tcpdump -i lo -s0 -nn -w dump.cap port 3306</div><div style="font-family:monospace,monospace" class="gmail_default"><br></div><div style="font-family:monospace,monospace" class="gmail_default">Once it crashes, the last query will be show (open dump.cap in wireshark) and you can search for issues with said query afterward.<br></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
>So it seems tuner configuration is broken somehow...<br>
><br>
><CaptureCard xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
>version="1.1" serializerVersion="1.1"><br>
><CardId>140</CardId><br>
><VideoDevice>file:///data/mythtv/wz-vuplus/services.m3u</VideoDevice><br>
><AudioDevice/><br>
><VBIDevice/><br>
><CardType>FREEBOX</CardType><br>
><AudioRateLimit>0</AudioRateLimit><br>
><HostName>homer</HostName><br>
><DVBSWFilter>0</DVBSWFilter><br>
><DVBSatType>0</DVBSatType><br>
><DVBWaitForSeqStart>true</DVBWaitForSeqStart><br>
><SkipBTAudio>false</SkipBTAudio><br>
><DVBOnDemand>false</DVBOnDemand><br>
><DVBDiSEqCType>0</DVBDiSEqCType><br>
><FirewireSpeed>0</FirewireSpeed><br>
><FirewireModel/><br>
><FirewireConnection>0</FirewireConnection><br>
><SignalTimeout>1000</SignalTimeout><br>
><ChannelTimeout>30000</ChannelTimeout><br>
><DVBTuningDelay>0</DVBTuningDelay><br>
><Contrast>0</Contrast><br>
><Brightness>0</Brightness><br>
><Colour>0</Colour><br>
><Hue>0</Hue><br>
><DiSEqCId>0</DiSEqCId><br>
><DVBEITScan>true</DVBEITScan><br>
></CaptureCard><br>
><br>
><VideoSource xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
>version="1.0" serializerVersion="1.1"><br>
><Id>110</Id><br>
><SourceName>wz-vuplus</SourceName><br>
><Grabber>/bin/true</Grabber><br>
><UserId/><br>
><FreqTable>default</FreqTable><br>
><LineupId/><br>
><Password/><br>
><UseEIT>false</UseEIT><br>
><ConfigPath/><br>
><NITId>0</NITId><br>
></VideoSource><br>
><br>
>/data/mythtv/wz-vuplus# cat services.m3u<br>
>#EXTM3U<br>
><br>
>#EXTINF:0,40 - 13th Street<br>
>#EXTVLCOPT:program=1042<br>
><a href="http://wz-vuplus.home.giaco.de:8001/1:0:1:412:4:85:FFFF0000:0:0:0" rel="noreferrer" target="_blank">http://wz-vuplus.home.giaco.de:8001/1:0:1:412:4:85:FFFF0000:0:0:0</a>:<br>
>#EXTINF:0,3 - 3sat HD<br>
>#EXTVLCOPT:program=41101<br>
><a href="http://wz-vuplus.home.giaco.de:8001/1:0:19:A08D:19B:270F:FFFF0000:0:0:0" rel="noreferrer" target="_blank">http://wz-vuplus.home.giaco.de:8001/1:0:19:A08D:19B:270F:FFFF0000:0:0:0</a>:<br>
>#EXTINF:0,70 - Al Jazeera International<br>
>#EXTVLCOPT:program=20112<br>
><a href="http://wz-vuplus.home.giaco.de:8001/1:0:1:4E90:10F:270F:FFFF0000:0:0:0" rel="noreferrer" target="_blank">http://wz-vuplus.home.giaco.de:8001/1:0:1:4E90:10F:270F:FFFF0000:0:0:0</a>:<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</blockquote></div></div>