mythbackend v30 segmentation fault and/or deadlock

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

Moderator: Forum Moderators

Post Reply
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

mythbackend v30 segmentation fault and/or deadlock

Post by knappster »

It's only happened once (so far). I upgraded to v30 yesterday and rebooted the machine. I started and stopped playback from livetv and recordings to ensure everything was working. Then I started livetv and opened the guide and the backend segfaulted and restarted, dropping me back to the frontend. Everything worked normally after that and I have tried to recreate it and have been unable to do so. The log recorded:
2019-02-16T13:12:56.815649-06:00 mythbackend[1895]: C CoreContext signalhandling.cpp:305 (handleSignal) Received Segmentation fault: Code 1, PID 8, UID 0, Value 0x7f5893d3d55c
I use hdhomerun tuners if it makes a difference and can happily post a full log if it would be more helpful.
Last edited by knappster on Thu Mar 07, 2019 3:35 am, edited 1 time in total.
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: mythbackend v30 segmentation fault

Post by paulh »

There was a bug introduced by a recent commit that caused the guide grid to cause a segfault. It was fixed a few days later. You just need to update to current master to get the fix and all will be well again.
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault

Post by knappster »

Thanks paulh. I will request an update with my distro.
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault

Post by knappster »

Paulh, I have not had a chance to upgrade get, but I a different backend crash or deadlock or something which was not reflected in the backend log. I suspect it may have been related to a commflag or metadata job, but this was not happening in 29.

I was hoping to see if this had also been addressed in an update, but I have been unable to even find which commit addressed the guide grid segfault. Sorry if I am just being dense, but would you be able to point me in the right direction? Was it this commit?
https://github.com/MythTV/mythtv/commit ... 683b738f54
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: mythbackend v30 segmentation fault

Post by paulh »

No sorry I can't find it either I think I'm confusing your issue with another one affecting MythBrowser.
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault

Post by knappster »

No problem. As of last night I have a newer build of 30, so I will report back if I run into additional issues. I saved the logs from Feb 21 if that would be any use for that particular issue. I may be able to get the logs from Feb 16 as well if that would be useful.
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault

Post by knappster »

Tonight the backend become unresponsive again. There was a recording that started at 7pm and I noticed about 30 minutes later that I couldn't access things on mythweb. The backend logs stopped at 19:00 but I can't see anything that is pointing me in any direction as to why the backend become unresponsive. I'm posting a link to the log here in case someone else might be able to help.
https://pastebin.com/y1A2UJhB

I killed the process over an hour later and it recovered, but I can't remember this happening on v29. This is the 3rd backend issue that I've had in about a week and a half. Hopefully it's just a configuration issue that can be worked around.
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault

Post by knappster »

It happened again this morning within a couple minutes of the machine waking up. When it happens, the backend is still running, but it is unresponsive. Nothing was logged in the backend log for 20 minutes so I restarted it. I now have it starting up with log level set to debug. Is there anything more that I can do to collect useful data for the next time this happens?
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault and/or deadlock

Post by knappster »

I have not experienced any backend issues since my last post. I can only think of a couple things that have changed since the last deadlock.
1) mythbackend is now launching with debug logging.
2) Previously there was a remote kodi frontend on a raspberry pi running on raspbian jessie. It is kodi v17.3 and pvr.mythtv v4.12.12. My combined frontend/backend shuts down every night, so the remote frontend would disconnect and would have a prompt that it was disconnected and would not reconnect until I said to. When I had backend issues the remote frontend would have been "disconnected" but maybe something was going on in the background. It has been off since just after the last issue I had. That version of pvr.mythtv was much older than when it added v30 support. In a couple weeks I will be trying to upgrade the pi to stretch and the kodi and pvr.mythtv packages will hopefully be up-to-date as well.

In the meantime I have also added a script that is checking if mythbackend becomes unresponsive and then tries to restart it if it is.
User avatar
pgbennett
Developer
Posts: 504
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: mythbackend v30 segmentation fault and/or deadlock

Post by pgbennett »

I have pushed a fix for the deadlock. See the ticket https://code.mythtv.org/trac/ticket/13479
knappster
Junior
Posts: 34
Joined: Wed Aug 01, 2018 1:42 am
United States of America

Re: mythbackend v30 segmentation fault and/or deadlock

Post by knappster »

Thanks for the update. It's been a very long time since my distro updated any mythtv packages, so hopefully this will be recompiled or it will be updated to 31 when it is released.
Post Reply