[mythtv-users] when modules load in different order MythTV hangs silently

Petr Stehlik pstehlik at sophics.cz
Fri Sep 29 03:02:38 UTC 2006


Hi,

4:50 a.m., I just need to share what I've found out tonight: MythTV
suddenly stopped working for me. The mythbackend was running but
frontend could not connect to it. It couldn't connect because
mythbackend was not listening on the usual ports!

As I've been applying some -fixes patches and playing with the database
(removing unneeded channels and videosources) lately it took me a lot of
time (recompiling older versions, restoring database backups) to find
out that the mythbackend hang is unrelated to my changes.

What happened was that after one reboot the bttv and ivtv drivers
happened to load in a different order than usually (Debian
testing/unstable with initrd) thus /dev/video0 was not bttv driver but
the ivtv one (vice-versa for /dev/video1). It never occured to me before
(using MythTV for a year now) so I didn't expect this to happen. The
logging (-v all) did not help much - there was no error message, no
warning sign, nothing. I just guessed that there would be a problem with
TV cards after looking into the source code and realizing that the TV
cards init was the last function executed. Then I compared the
capturecard table with what I found in dmesg and saw the problem. After
exchanging the video0/video1 entries in capturecard table everything
started working.

I can imagine that the mythbacked just gets stuck when talks to
different driver than it thinks it's there but I am wondering if it
wasn't possible to somehow detect this situation and fail instead of
just hanging quietly. Or at least to complain in the log file about the
failing cards and to run with the rest (if there is any, I have one
DVB-S input that was OK) but definitely not get stuck with no warning
sign in the log.

BTW, I entered bttv into my /etc/modules hoping that it would force the
bttv to load _before_ the ivtv but it didn't help - tried to reboot
several times and found out that the bttv and ivtv modules load in
random order, basically different one each time I reboot :-|

Petr




More information about the mythtv-users mailing list