Crash right after service start (xmltv associated)
|Assignee:||Adam Sutton||% Done:|
|Category:||EPG - Grabbers|
|Found in version:||3.1.555.g0c966||Affected Versions:|
Hi, been using tvheadend for 1,5 years now with almost no crashes.
After pulling the latest commits (last 5-10 days or so) from the master branch of the new github repo, tvheadend crashes right after it starts.
See log here:
I am using xmltv (file) to grab epg for Nova Greece and Sky Italy (combined) and have been using this setup successfully or several months now with no issues.
Should be something in the recent changes in the epg grabbing code.
PS. Where is the epgdb file (or its new equivalent) located now? I can't seem to find it anywhere (and try to delete it for a test)
#1 Updated by Adam Sutton 9 months ago
- Category changed from General to EPG - Grabbers
- Status changed from New to Need feedback
- Assignee changed from Hein Rigolo to Adam Sutton
There have been some issues with the migration of the EPG database from old format to new. As you noted best thing is to simply remove the DB files and restart.
Old file is ~/.hts/tvheadend/epgdb and new file is currently ~/.hts/tvheadend/epgdb.v2
If you're after stability I would stick with 3.0, git master will definitely be a bit unstable as we undergo new dev and find best way to handle development (but the general rule will continue that master is NOT intended to be stable).
We'll try and backport stuff to 3.0 release for bug fixes and minor updates etc..
You say Sky Italy? Could you maybe take the time to test the OpenTV IT module? I'm not aware anyway has actually tried it yet.
#2 Updated by Dimitris Kazakos 9 months ago
Actually, it would also crash after the initial changes to the epg db code, but after I deleted the epgdb file it was ok.
The weird thing is that there is no epgdb file now anywhere, but neither an epgdb.v2 file. Seems the crash happens before it manages to create it(?).
Weird, because yesterday it worked and I don't think you changed anything related to that since then.
Do you have any idea what could be causing the crash or should I just revert to an older version and hope for it to get fixed? I use master as I am always eager to test the latest and greatest (also since development had pretty much frozen for the past year or so) :-)
PS. As for the OpenTV IT module, there is no way to test it now (since it crashes before I can do anything), but I remember checking it and seeing that all there were many entries in manual per-channel epg grab configuration, but with no channel names ("unknown" I think)
#3 Updated by Adam Sutton 9 months ago
I've no idea at the moment what's causing the crash. Not enough info to go on, but there have been some other XMLTV related crashes.
And like you say I've definitely been changing stuff
Could you possibly run it under gdb and get a full backtrace (bt full) output.
#6 Updated by Adam Sutton 9 months ago
OK, I was able to import the XMLTV file without any problems
Can you just try testing tvheadend with a completely fresh config directory, something like:
cp -a ~/.hts/tvheadend/channels test-config/
./build.linux/tvheadend -c test-config -C
Note: adjust instructions accordingly
Then configure the XMLTV grabber and see what happens?
This is essentially what I did and it worked (I was using master as of a few mins ago, just spotted unrelated bug), but like you say nothing relevant should have changed (if anything I'd have been less than surprised if it crashed on my build).
#7 Updated by Adam Sutton 9 months ago
I think the one thing that will be a big diff on this is that it won't have all your channel->XMLTV channel mappings. So it will only process "some" channels that it can auto map based on name.
But will be interesting to see if that at least works. As it did on my machine.
#8 Updated by Dimitris Kazakos 9 months ago
Now that you mentioned it, I spotted a bug (might call it that way) in xmltv->channel auto mapping:
I have a channel called MTV (which is MTV greece) and 2 xmltv entries: MTV.gr and MTV.it
The auto mapping mapped both xmltv sources to this single channel and it was impossible to change it through the web interface; even if I just selected MTV.gr from the drop down, it would chose both sources.
Will try the above and report back soon.
#11 Updated by Adam Sutton 9 months ago
Actually this has just got me thinking! I think john T was complaining about similar problems. And I remember the answer I gave him was a long the lines of "its meant to be that way". I.e. there might be a genuine reason why someone might want to link 2 (XMLTV) EPG sources to the same channel. One might be slow to update but more detailed and the other might be quicker update but less detailed.
However I wasn't thinking about this in the context of from the same provider (as you have here, since you're essentially mixing stuff). But its the same concept.
However.... that doesn't mean there isn't a bug in the way this is all handled. So let me take a look, its repeatable. However the exact detail of the crash appears to vary a bit.
#13 Updated by Adam Sutton 9 months ago
Yeah, but did you try re-starting it I bet it crashes then!
I'm on the case I've got it crashing and I have some hidden debug that I can enable to do deeper analysis. This might actually be the answer I've been looking for!
Leave it with me for a bit and I'll sort this out (I hope).
#19 Updated by Adam Sutton 9 months ago
I can't repeat that one. It works for me now. Restart a few times.
Can you provide a full gdb trace, as that trace output is wrong (it often has the wrong line numbers for some reason, possibly difference in stack position etc.. on 64bit).
Does it crash straightaway? did you reset the DB?
#21 Updated by Dimitris Kazakos 9 months ago
Did some further testing and the crash is definitely xmltv related.
I deleted the epggreb dir (and xmltv dir under /.hts/tvheadend, which I suppose is now obsolete, as there is a xmltv folder under epggrab too) and the service started without a problem (with all my other settings intact); It even created the epgdb.v2 file.
As soon as I enabled the xmltv grabber, it crashed and then would not start again without crashing.
#24 Updated by Adam Sutton 9 months ago
I just can't repeat it. I copied your config pointed tvh at it and it started fine. Enabled File grabber and it imported fine. And I stopped/started several times no problem.
I can't think what the difference can possibly be.
But I have just notice, your last crash dump is reporting the pre-fix git revision. You've definitely updated and rebuilt?
#25 Updated by Dimitris Kazakos 9 months ago
Right, I have no idea how this happened.
I did a make clean, configure, make, make install many times during our conversation here.
I just tried a make distclean, too, and that seemed to do the trick.
It now works fine.
Sorry for the trouble and thanx for the time you spent on this.
Keep up the good work!
#26 Updated by Adam Sutton 9 months ago
- Status changed from New to Fixed
If that's the case I might not be entirely blameless. I broke make install with my new configure script. Which I only fixed last night. You might find some tvheadend files randomly scattered around your system. Personally I would never use make install except in a packaging script. No traceability, much better to build some sort of package if you can and install that.
Glad to hear its fixed though.