Project

General

Profile

Bug #1126

Crash right after service start (xmltv associated)

Added by Dimitris Kazakos over 12 years ago. Updated over 12 years ago.

Status:
Fixed
Priority:
High
Assignee:
Category:
EPG - Grabbers
Target version:
-
Start date:
2012-08-17
Due date:
% Done:

100%

Estimated time:
Found in version:
3.1.555.g0c966
Affected Versions:

Description

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:
http://pastebin.com/ib1cS9bp

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)


Files

channels-xmltv.tar.gz (2.2 MB) channels-xmltv.tar.gz Dimitris Kazakos, 2012-08-17 14:32
epg.tar.gz (11.5 KB) epg.tar.gz Dimitris Kazakos, 2012-08-17 18:01
tvheadend_conf.tar.gz (629 KB) tvheadend_conf.tar.gz Dimitris Kazakos, 2012-08-17 21:13

History

#1

Updated by Adam Sutton over 12 years 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..

Adam

P.S.
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 over 12 years 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 over 12 years 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.

Adam

#4

Updated by Adam Sutton over 12 years ago

Another thing that might be useful, can you send me the XMLTV file and possibly your channels directory (.hts/tvheadend/channels). If can recreate it then even better.

Adam

#6

Updated by Adam Sutton over 12 years ago

Hmm,

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:

mkdir test-config
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).

Adam

#7

Updated by Adam Sutton over 12 years 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.

Adam

#8

Updated by Dimitris Kazakos over 12 years 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.

#9

Updated by Adam Sutton over 12 years ago

Hmmm,

that's interesting. Yeah that could definitely cause problems and don't like the sound of not being able to manually override it!

But not sure that's causing the crash as it presumably did the same on my setup (though I've not checked).

Adam

#10

Updated by Adam Sutton over 12 years ago

Ah it just crashed ;) maybe it was what you said and maybe it only take effect on second run.

Give me a minute to take a look.

#11

Updated by Adam Sutton over 12 years 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.

Adam

#12

Updated by Dimitris Kazakos over 12 years ago

Just tried it and works fine (does not crash at least).
Does that mean that I should try removing the xmltv->channel mappings manually (by deleting the files in the respective dir) and create them again through the web interface?

#13

Updated by Adam Sutton over 12 years 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).

Adam

#14

Updated by Dimitris Kazakos over 12 years ago

Cool, will do, thanx

#15

Updated by Adam Sutton over 12 years ago

  • Status changed from Need feedback to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:3f1b5474f1e8c08d85c719061ba05872c0d7f19b.

#16

Updated by Dimitris Kazakos over 12 years ago

Sorry to spoil your excitement, but it still crashes here...
I don't think the thing I mentioned above has anything to domwith the crash, since it was working yesterday, even with this setting...

#17

Updated by Adam Sutton over 12 years ago

  • Status changed from Fixed to New

Hmm, damn it! :(

Can you send me .hts/tvheadend/epg* as well. And pastebin the latest crash dump.

Adam

#19

Updated by Adam Sutton over 12 years 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?

Adam

#20

Updated by Dimitris Kazakos over 12 years ago

Actually, the behavior is exactly the same as before the last commit.
As for the db, there is no such file (epgdb or epgdb.v2) under /.hts/tvheadend)

I can provide the trace if you send me a quick howto :-)

#21

Updated by Dimitris Kazakos over 12 years 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.

#22

Updated by Adam Sutton over 12 years ago

Hmmm, really don't get that it wasn't happening on my machine.

Can you send me the whole config directory and I'll have another look.

Adam

#24

Updated by Adam Sutton over 12 years 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?

Adam

#25

Updated by Dimitris Kazakos over 12 years 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 over 12 years 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.
Adam

Also available in: Atom PDF