|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Debug SageTV Server on Linux (focus on native libraries not java)
I wanted to share some experience and ask some questions on debugging the sagetv server with focus on the native libraries. I assume you have good knowledge on Linux, gcc and gdb, without it will be more effort :-)
My focus is not on Java debugging, but on the native C/C++ libraries used. 1) depending on what library you want to debug, make sure the corresponding Makefile has debug enabled and optimisation turned off - this means mainly setting -g in CFLAGS or similar. 2) make a build/clean.sh and build/buildall.sh in order to make a clean build 3) I used the tar.gz binaries, install them as usual 4) start sage server 5) Code:
ps -ef 6) Code:
gdb -p PID 8) use "bt" to back trace if the daemon crashes, this will show you the crash statement (file and line number and the crash type like a memory issue) - this will help to fix the issue or to post it to the forum. In order to identify issues without gdb, enable the logging: a) set the debug to true through the sage client (setup->detailed setup->advanced->debug logging) or editing the Sage.properties while the server is not running. b) in the install directory make Code:
touch NATIVE_LOG.ENABLE Now a question, probably someone can give me a hint before I invest too much time on searching When I attached the gdb and make continue I get quite frequent SIGSEGV which I think are related to the java part and not really a crash, I just hit continue and the server continues - is there a way to deal with this as it can get annoying to continue always (like in a channel scan ...) till the real crash happens? If we can complete this guide here, I would vote to add it to the build post or to the FAQ post.
__________________
Standard Intel PC with 4GB RAM Ubuntu 16.04 64bit JVM version=1.8.0_121-b13 / SageTV V9 latest HDHR DUAL EU with 2 DVB-C and HDHR EXPAND 4DC with 4 DVB-C XMLTV using WebGrabPlus in Switzerland Clients: HD200, Placeshift on OSX (limited) and Windows, Sage Android Client on ShieldTV and Tablets |
Tags |
debug linux gdb trace |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Linux server native libhdhomerun | mwnswiss | SageTV Github Development | 4 | 05-03-2016 09:44 AM |
Constant Debug Log errors:Error in MediaServerConnection of :java.io.EOFException | WellThen | SageTV Software | 0 | 11-17-2013 01:41 PM |