K Shea wrote:
Mark Clarkstone wrote:
I'm pretty sure the stable builds do have debugging enabled by default, if you have a Debugging tab under Configuration then yes you should be able to provide logs, if you don't install the tvheadend-dbg package (it's in the stable repository). Once you've installed the debugging package install 'corekeeper' and 'gdb' then edit /etc/default/tvheadend and change the lines TVH_DEBUG=0 to TVH_DEBUG=1 and then TVH_ARGS="" to TVH_ARGS="-D". Reboot your system. Tvheadend should now be running with the -D argument, check ps -ef. If not edit /etc/init.d/tvheadend and change TVH_ARGS there.
Well the first thing I will say is if I were going to try to deliberately crash it, I would only do that on a weekend, so that if things went terribly wrong I'd have time to try to recover. So, I checked and there is a "Debugging" tab but it has five Debugging Options, none of which are filled in, as follows:
If it crashes you can just restart it without worry most of the time but make a config backup anyway. Still install tvheadend-dbg though so if it does crash most of the crashlines are filled in.
Debug log path: (Text field)
Debug to syslog: (Check box)
Debug trace (low-level stuff): (Check box)
Debug subsystems: (Text field)
Trace subsystems: (Text field)
I have no idea what should go in any of those, but if you told me and I filled them in correctly, would I still need to do any of that other stuff?
Nothing really needs to go into those options in this case I think.
I don't know what "corekeeper" or "gdb" are, I'm guessing they are debugging software of some kind but I don't know whether they would consume additional system resources, or write unnecessary files to my hard drive, so I'd rather not install them if it's not absolutely necessary to diagnose this issue.
Without a crash log/trace nothing can be done. GDB doesn't do anything unless you run it and corekeeper only keeps an eye out for core dumps.
I'm not saying I'm not willing to do it, just that I only want to do it if it's really necessary, and if filling out one or more of those fields correctly would eliminate the need to install additional software then I'd much rather do that.
Also, this is a "headless" system with no desktop, so any GUI-based program won't work (I mention that in case the "g" in gdb stands for "Gnome" or something).
gdb is cmd line only see https://www.gnu.org/software/gdb/
Once its back up try to crash Tvheadend,
I guarantee you that won't be hard, especially on a weekend because there are a couple of channels that do not transmit on weekends. All I will have to do is try to view one and wait about ten seconds (by the way, in the stream profile the value "Timeout (sec) (0=infinite):" is set to 0, so that's not the problem).
if you're able to it should drop its core and corekeeper should catch it and place it in /var/crash/<uid>/ (cd to /var/crash and you should be able to find it.)
In order to get a crash log run gdb like this.
[...]
Edit <text> to match the folder location in /var/crash.
Once in gdb run
[...]
Keep pressing enter until doesn't blurt anything else out then type quit (or exit I forget which).
Paste the log here but remember to edit any lines that begin with authbuf or password/username BEFORE you upload it here.
This has always been my #1 objection to uploading log files to a public forum. I am always afraid I will miss something and post information that should not be placed online. I always wonder why that type of information is even written to such files in the first place. At least you alerted me what to watch out for, so thanks for that!
The only time authbuf gets filled in is if you auth to the webui or another client, no other system passwords etc are exposed. If you've not set any passwords at all then you have nothing to worry about :).
I posted a log publicly and left my password in it by mistake but thankfully it was a local only password so no worries.
PS: Being of advanced age isn't an excuse, I type one handed (medical condition) but I still write long replies to people even when I'm in pain.
Well I use two fingers (mostly one) but I'm not trying to compare physical abilities.
Heh, another member of the two finger club ;)
My bigger issue is my memory is so bad that if I figure out how to do something today, two weeks from now I'll most likely have no clue how I did it unless I have notes to refer to. So any time I have to mess with a mostly working system, it scares me to death that I am REALLY going to mess it up. I particularly feel that way about TVHeadEnd because although it has been running with few problems for the past year or so, getting it set up and working initially was extremely difficult for me, since I'd had no prior experience with it. Anyway, if you can explain what needs to be filled in on that Debugging tab, I should hopefully be able to show you what you need to see in a few days.
Filling in the debugging tab really won't show whats causing the crash here, a gdb trace is really needed, if Tvheadend even drops its core. If it doesn't just run Tvheadend like this Make a backup of your config first and make sure it isn't running.
sudo gdb /usr/bin/tvheadend
then once gdb has loaded enter (into gdb):
set logging on /home/hts/tvh.log
run -c /home/hts/.hts/tvheadend
Once it's running in gdb make it crash, once it has enter (into gdb).
thread apply all bt full # keep pressing enter until nothing more comes out.
quit
Then post the log here (without any authbuf lines and any lines that contain username or password).