Project

General

Profile

Bug #1144

Several problems with latest version from github (slow webif, no config, no adapters)

Added by Rene Herbrich over 12 years ago. Updated about 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
General
Target version:
-
Start date:
2012-08-21
Due date:
% Done:

100%

Estimated time:
Found in version:
426ee1c03d
Affected Versions:

Description

Checked out the latest code (commit 426ee1c03d)

Compiles fine, but after having started tvheadend, it sais it's not able to find the
config. Additionally the webif is very slow and it seems, as if not all of the icons used within the webif
can be retrieved.

Although the log sais that the tv adapters were found, they won't show within webif (empty dropdown)

Log:

Aug 21 21:25:14 [WARNING]:config: no configuration, loading defaults
Aug 21 21:25:14 [INFO]:dvb: Found adapter /dev/dvb/adapter0 (HDHomeRun DVB-C) via PCI
Aug 21 21:25:14 [INFO]:dvb: Found adapter /dev/dvb/adapter1 (HDHomeRun DVB-C) via PCI
Aug 21 21:25:18 [INFO]:epggrab: module eit created
Aug 21 21:25:18 [INFO]:epggrab: module uk_freesat created
Aug 21 21:25:18 [INFO]:epggrab: module uk_freeview created
Aug 21 21:25:18 [INFO]:epggrab: module xmltv created
Aug 21 21:26:04 [ERROR]:HTTP: 192.168.5.48: /tablemgr -- 404

History

#1

Updated by Adam Sutton over 12 years ago

Ignore that config warning, it relates to a new global config file (I should probably remove that warning).

The web interface being slow could be down to use of zlib on the ARM, I suggest that you configure with --disable-zlib, that might help.

Not sure about the drop down issue, nothing I've changed should affect that.

#2

Updated by Adam Sutton over 12 years ago

  • Status changed from New to Need feedback
  • Assignee changed from Hein Rigolo to Adam Sutton
#3

Updated by Randy M over 12 years ago

Compiled it with --disable-zlib but it doesn't seem to make any difference about webif loading time/speed.

Also it seems that it completely lost my config which makes this build useless for me.

#4

Updated by Adam Sutton over 12 years ago

Guys,

I'm going to need a bit more input than this if I'm going to figure out what exactly has happened. And saying the "unstable" git master is useless for you doesn't really add much useful input. If you want stability please stick to release tags.

The sluggishness could simply be down to poor IO performance on the ARM chips and/or some poorly written code for the new config/bundle handler. Though I wouldn't have expected it to be that bad.

The missing configuration worries me more, that suggests a more fundamental issue. But since its working fine on Ubuntu, I'm guessing it must relate to a difference in the way you guys are running TVH.

So what would be good is to know exactly how you compile/install and run so I can compare.

Even better if anyone has the ability to provide access to a test system that would really help!

Adam

#5

Updated by Randy M over 12 years ago

I did a few more tests.

Configuration isn't my biggest concern anymore more same for sluggishness but more the lack of unable to select TV Adapter. (Sundtek MediaTV Pro)
What id did was remove all traces from my system that has a relation with TVH, i started completely clean.
In the past i needed to remove and re-insert TV adapter a few times to see it popup, didn't worked this time.

The way i compile is like this.
https://github.com/SynoCommunity/spksrc

make ARCH=88f6281 tvheadend

This are the 2 important files for TVH from spksrc
https://github.com/SynoCommunity/spksrc/blob/develop/cross/tvheadend/Makefile
https://github.com/SynoCommunity/spksrc/blob/develop/spk/tvheadend/Makefile

I changed only these 2 lines to correct repo and prefix
https://github.com/SynoCommunity/spksrc/blob/develop/cross/tvheadend/Makefile#L5
To: PKG_DIST_SITE = https://github.com/tvheadend/tvheadend/tarball/master

https://github.com/SynoCommunity/spksrc/blob/develop/cross/tvheadend/Makefile#L6
To: PKG_DIR = tvheadend-$(PKG_NAME)-*

I can provide access to my box but it's used 24/7 with the rest from the household so not sure what will happen?

Hardware used is:
Synology DS211
Sundtek MediaTV Pro
Smargo Cardreader+

Other packages used are OSCam.

What can i do to provide you more information?

#6

Updated by Randy M over 12 years ago

Extra info on the config part. I said it's not my biggest concern but it should.
Access control is empty but there is a file config file for it but it seems not to be loaded

#7

Updated by Adam Sutton over 12 years ago

I think the problems are all linked. The config/filebundling code was all updated to simplify it and make it work properly for those that need it.

There was a problem with loading some default config files which I fixed recently, but that's in master. And isn't related to this. But there could be other issues?

When you started from scratch did it start to populate the configuraton directory or was it still empty? It would still be good to know how you run TVH (i.e. command line opts and where the config is stored).

#8

Updated by Randy M over 12 years ago

It did create files in the config dir but i think they were created by the Synology installer rather then TVH itself

So i think there need to be made a few changes maybe in de spksrc Makefile for TVH but not sure how and what has changed on the config part.

How TVH is stopped and started can be found here https://github.com/SynoCommunity/spksrc/blob/develop/spk/tvheadend/src/dsm-control.sh it's all done from the Synology DSM GUI, no command line actions needed

GUI example: http://i.imgbox.com/ablMcuCK.png

#9

Updated by Adam Sutton over 12 years ago

OK,

So its installing everything in a special directory, fair enough and seems to be pointing at that directory.

What files does it create in /usr/local/tvheadend/var?

And if you could give me access to the box for a few minutes that would be useful, I don't need to change anything (and presumably its not working at the moment anyway ;) ), it would just be useful to have a quick poke around and see what's where etc..

Adam

#10

Updated by Randy M over 12 years ago

I reverted back to a package created from opdenkamp source and there my TV Adapter worked out-of-the box. I also compared the loading speed and it was significant faster, way faster then latest master branch from tvheadend github. I was also be able to create users and other things which didn't worked in tvheadend master code , it gave an error unable to create record. Nothing useful in debug log for it.

#11

Updated by Randy M over 12 years ago

I'll send you an email when nobody is home that needs to use the box and i'll setup a connection for you.
Currently i reverted back to older version so it can be used by others now ;)
I can also share desktop so you can see how i install,configure and compile things if you like.

#12

Updated by Adam Sutton over 12 years ago

That would be very much appreciated. I might not be available this evening though, so will just have to see how things go.

I definitely do want this sorted as I'm doing other stuff to try and make TVH work better on NAS boxes, so I don't want it tripped up by something like this.

Adam

#13

Updated by Rene Herbrich over 12 years ago

Sorry for the late reply.

I've looked into it. All dropdowns/input fields are empty, if they have no default value (= they get filled programmatically).
It seems, as it's not able to write the data, which is stored within config files and so on, to the webif.

Tried to compile tvheadend without zlib, but it behaves like before: very high cpu load (100%) and no values within webif.

Running tvheadend with gdb in debug mode reveals nothing helpful. In addition to the common console output, I can see tvheadend
reading the known muxes from the "old" config and that's it.

What's interesting: tvheadend seems to be stuck at some point. I'm not able to kill it with CTRL + C, only kill -9 ID helps.

Tried also to start tvheadend with a blank config folder, but same as before.

My setup:

Synology DS112j
No package installer, downloaded the source code via console and installed it with configure/make/make install
startet the compiled binary with root privileges (/opt/tvheadend/testbuild/tvheadend)

#14

Updated by Adam Sutton over 12 years ago

I'm not sure how to proceed on this :( I simply cannot repeat it on my setup.

I can think about some stuff that might help in debugging it, but in the meantime if anyone can offer access to a box that would probably be quickest way forward. I'm sure its something very simple/stupid.

Adam

#15

Updated by Rene Herbrich over 12 years ago

Found out, what causes the issue :)

Synology defines a lot of directories within the PATH variable, but two of them do not exist:

PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin

--> "/usr/local/sbin" and "/usr/local/bin"

The infinite loop occurs here: https://github.com/adamsutton/tvheadend/blob/master/src/spawn.c - Line 64 (opendir()).

Here is how I found out:

DS112j> gdb /opt/tvheadend/testbuild/bin/tvheadend 

dlopen failed on 'libthread_db.so.1' - libthread_db.so.1: cannot open shared object file: No such file or directory
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "arm-none-linux-gnueabi"...
(gdb) attach 21414
Attaching to program: /opt/tvheadend/testbuild/bin/tvheadend, process 21414
Reading symbols from /lib/libssl.so.0.9.8...done.
Loaded symbols for /lib/libssl.so.0.9.8
Reading symbols from /lib/libcrypto.so.0.9.8...done.
Loaded symbols for /lib/libcrypto.so.0.9.8
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.3...done.
Loaded symbols for /lib/ld-linux.so.3
0x40269328 in opendir () from /lib/libc.so.6
(gdb) bt
#0  0x40269328 in opendir () from /lib/libc.so.6
#1  0x000150fc in _find_exec (name=0x60c2c "tv_find_grabbers", out=0xbea0e420 "?+0@", len=3198214840)
    at /opt/src/tvheadend_beta/src/spawn.c:64
#2  0x000154c4 in spawn_and_store_stdout (prog=0x60c2c "tv_find_grabbers", argv=0x0, outp=0xbea0eacc)
    at /opt/src/tvheadend_beta/src/spawn.c:163
#3  0x0002f06c in xmltv_init () at /opt/src/tvheadend_beta/src/epggrab/module/xmltv.c:584
#4  0x00014c4c in epggrab_init () at /opt/src/tvheadend_beta/src/epggrab.c:354
#5  0x0000b458 in main (argc=1, argv=0xbea0ed94) at /opt/src/tvheadend_beta/src/main.c:422
(gdb) bt full
#0  0x40269328 in opendir () from /lib/libc.so.6
No symbol table info available.
#1  0x000150fc in _find_exec (name=0x60c2c "tv_find_grabbers", out=0xbea0e420 "?+0@", len=3198214840)
    at /opt/src/tvheadend_beta/src/spawn.c:64
        ret = 0
        bin = "\000\000\000\000\00000@\001\200???⠾?⠾?⠾?⠾?⠾?䠾?⠾?䠾", '\0' <repeats 16 times>, "n\n\006\000?ᠾ?ᠾ0㠾\00000@\000\000\000\000\000\002\000\000\024㠾\\\n\006\000??????#@\000\000\000\000\020?\a\000\001\200??0㠾0㠾0㠾0㠾W㠾/堾0㠾/堾", '\0' <repeats 20 times>, "?蠾\000\000Aug 22 20:47:41\0000@?砾??\005\000\020?\a\000\030@0@\000\000\000\000\030@0@"...
        path = 0x7e1a0 "/opt/bin" 
        tmp = 0x7e1ee "/usr/local/sbin" 
        dir = (DIR *) 0x0
        de = <value optimized out>
        st = {st_dev = 3198216396, __pad1 = 0, __st_ino = 3198215636, st_mode = 3198216972, st_nlink = 0, st_uid = 3198216980, 
  st_gid = 0, st_rdev = 0, __pad2 = 12288, st_size = 228710170648, st_blksize = -1096750580, st_blocks = 4625267289133407568, 
  st_atim = {tv_sec = 0, tv_nsec = 1076903960}, st_mtim = {tv_sec = -1096750580, tv_nsec = 0}, st_ctim = {tv_sec = -1, 
    tv_nsec = 1076125756}, st_ino = 2213660504612194}
#2  0x000154c4 in spawn_and_store_stdout (prog=0x60c2c "tv_find_grabbers", argv=0x0, outp=0xbea0eacc)
    at /opt/src/tvheadend_beta/src/spawn.c:163
        p = <value optimized out>
        fd = {520432, 1076899840}
        f = <value optimized out>
        bin = "?+0@\00000@\000\000\000\000\00000@\000\000\000\000\000\000\000\000?+0@\000\000\000\000\000\000\000\000)Z\006\000x䠾)Z\006\000\200䠾\200䠾?堾\00000@\000\000\000\000\000\002\000\000\234堾$Z\006\000??????#@\000\000\000\000?堾\001\200???堾?堾?堾?堾?堾?砾?堾?砾", '\0' <repeats 20 times>, "?䠾\000\000\000\000?䠾\000\000??\000\000\000\000\00000@\000\000\000\000\000\002\000\000\f栾$Z\006\000\000\000\000\000P?\a\000\b\000\000\000P?\a\000\0000"...
        local_argv = {0x0, 0x0}
#3  0x0002f06c in xmltv_init () at /opt/src/tvheadend_beta/src/epggrab/module/xmltv.c:584
No locals.
#4  0x00014c4c in epggrab_init () at /opt/src/tvheadend_beta/src/epggrab.c:354
        tid = 3198217076
        tattr = {__size = "\024렾\000\000\000\000t렾\001\000\000\000??\000\000??\005\000??\a\000??\a\0000?\a", 
  __align = -1096750316}
#5  0x0000b458 in main (argc=1, argv=0xbea0ed94) at /opt/src/tvheadend_beta/src/main.c:422
        c = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        forkaway = -1096750132
        pidfile = (FILE *) 0x0
        pidpath = 0x7fffffff <Address 0x7fffffff out of bounds>
        grp = <value optimized out>
        pw = <value optimized out>
        usernam = <value optimized out>
        groupnam = <value optimized out>
        createdefault = -2
        set = {__val = {2147483647, 4294967294, 4294967295 <repeats 30 times>}}
        rawts_input = 0xffffffff <Address 0xffffffff out of bounds>
        join_transport = 0xffffffff <Address 0xffffffff out of bounds>
        confpath = 0xffffffff <Address 0xffffffff out of bounds>
        p = 0x0
        endp = 0x0
        adapter_mask = 4294967295
        crash = -1
(gdb) 

Workaround: create "/usr/local/sbin" and "/usr/local/bin" as empty folders

#16

Updated by Adam Sutton over 12 years ago

Rene,

Excellent, I'll push a fix ASAP, now I know what I'm looking for!

Adam

#17

Updated by Rene Herbrich over 12 years ago

Thanks :) But I can confirm the problem described by Randy:

if there is an old config, everything gets deleted. Luckily I did a backup of my config before.
I then wrote all files back to the config dir and it read the epg db, the other config files, ...
But I left the "accesscontrol" file in place.

Is there anything, which checks for an existing "accesscontrol" file and if there is none, it
clears the dir and creates a new one?

#18

Updated by Adam Sutton over 12 years ago

ok, patch applied and in git master. Hopefully that will solve that problem, and you probably won't need --disable-zlib afterall.

As for the configuration, TVH (vanilla) never deletes configuration. Maybe the package installation is doing it? Have you tried to see if the configuration is present immediately after install but before you run TVH.

If you guys could test the patch I'd appreciate that.

#19

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:708b21897f87d6582cc18fa9e8801393118baf7f.

#20

Updated by Randy M about 12 years ago

Great work Rene and Adam.
Latest patch seems to have solved all the problems.
It's fast again, it loads existing config, can see my TV adapter and i can watch TV with XBMC (which it didn't before)

#21

Updated by Adam Sutton about 12 years ago

That's good to hear.

It's a good job Rene spotted that, I'd have never thought to test that area of the code ;)

#22

Updated by Rene Herbrich about 12 years ago

Do not thank me, thank gdb :D

your patch is working fine for me, too.

What's really nice: the idle patch lets my HDHomeRun device go to sleep, thanks for this!
Only one small thing: it goes to sleep, even if "Turn off adapter when idle:" is disabled?

The problem with the deletion of the config did not occur a second time.
Changed the config files to the backuped ones, compiled and started tvheadend,
but config stayed in place. Actually these were the same steps as before.
Don't know what happened the last time...

#23

Updated by Rene Herbrich about 12 years ago

Well, there's something strange going on. Tvheadend started, as it should.
Initial idle scan was completed and after that I looked into the epg data (epg tab) - the epg db was empty.

If I enable idle scan, it installs the epg tables and after that it sais "eit: processing cancelled"

#24

Updated by Rene Herbrich about 12 years ago

Forget my last sentence, my HDHomeRun device crashed. Happens sometimes if I test a lot.

But I think that has nothing to do with the empty epg db.

#25

Updated by Adam Sutton about 12 years ago

Probably best to open another issue for that, rather than keep dealing with stuff on here. But leave it till tomorrow and I'll have a quick look in the morning.

Adam

#26

Updated by Randy M about 12 years ago

This issue is back after today's update. Slow web interface, lost config and no adapters available.

Also available in: Atom PDF