Project

General

Profile

Several TvHeadend instances are run on computer startup

Added by Sébastien Aubry over 12 years ago

Hello,

I currently use XBMCBuntu Eden PVR + TvHeadend. My computer has a dual tuner TV card (Hauppauge WinTV Nova-T-500).
I experience what looks like a weird bug: on computer startup, several instances of TvHeadend are automatically launched:

user@pchc:~$ ps aux | grep tvh
user   1209  3.4  0.1 126740  7288 ?        Ssl  23:45   0:19 /usr/bin/tvheadend -f -u user -g video
user   1543  0.0  0.1  58536  6328 ?        Sl   23:46   0:00 tvheadend
user   1549  0.0  0.1  58536  6172 ?        Sl   23:46   0:00 tvheadend
user   1915  0.0  0.0   4200   772 pts/0    S+   23:55   0:00 grep --color=auto tvh

Is this normal? Several XMLTV grabbers are also started:

user@pchc:~$ ps aux | grep grab
user   1312  8.8  0.9  42064 39836 ?        S    23:45   0:54 /usr/bin/perl -w /usr/bin/tv_grab_fr
user   1583  9.0  0.9  44124 39888 ?        S    23:46   0:54 /usr/bin/perl -w /usr/bin/tv_grab_fr
user   1584  9.1  0.9  44136 39916 ?        S    23:46   0:54 /usr/bin/perl -w /usr/bin/tv_grab_fr
user   1920  0.0  0.0   4200   772 pts/0    S+   23:56   0:00 grep --color=auto grab

Attached is my syslog, which confirms that 3 concurrent instances of TvHeadend are unduly executed.
I usually kill everything and start again TvHeadend again. Anyway, I have just noticed that the behaviour of my system is not optimal with these 3 instances: Live TV works fine but the recordings are not performed due to some conflicts between these instances.
I could write a script to do that on startup. I would rather like to understand why these 3 instances are started and how I can fix that. How can I find out what happens on startup?


Replies (3)

RE: Several TvHeadend instances are run on computer startup - Added by Sébastien Aubry over 12 years ago

Hello,
This bug looks like the description of this pull request for OpenElec: https://github.com/OpenELEC/OpenELEC.tv/pull/13 : "fix for tvheadend startup for dvb cards with more than one tuner, because tvheadend is starting multiple times"
I am not using OpenElec but XBMCBuntu but is this possible that this fix has not been reported into the TvHeadend main trunk?
Currently I have a /etc/init.d/tvheadend script which looks fine and starts the first TvHeadend instance, but then two other instances are started and I cannot find out why.

Thanks

RE: Several TvHeadend instances are run on computer startup - Added by Sébastien Aubry over 12 years ago

The first TvHeadend instance is started by the rc*.d (-> /etc/init.d/tvheadend) script. I was able to disable it by typing sudo update-rc.d -f tvheadend remove. I managed to re-enable it by typing sudo update-rc.d tvheadend defaults.

RE: Several TvHeadend instances are run on computer startup - Added by Sébastien Aubry over 12 years ago

Hi,
I did not find out why I have these two more tvheadend executions at startup. I believe that they could be related to the fact that I have 2 tuners and that they are seen as USB tuners. When detected, they might trigger a startup script. Another possible explication is that I have a conflict between the XBMCbuntu tvheadend package old installation and the Pulse tvheadend package.

Anyway, I now added the attach "fix_tvheadend" script to my startup sequence.
Here is what it does:
- It kills tvheadend, tv_grab_*, xbmc and xbmc.bin
- It deletes the ~/.hts/tvheadend/epgdb file
- It starts tvheadend with /etc/init.d/tvheadend start
- It starts xbmc

So my system is not fine even if you restart it. But anyway I would like to find out why I used to have 3 instances of tvheadend (one "daemon" and two "user" instances) running at startup.

    (1-3/3)