SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-19-2015, 03:45 AM
mwnswiss mwnswiss is offline
Sage User
 
Join Date: Feb 2007
Location: Switzerland
Posts: 54
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
to get the PID of the java sagetv process

6)
Code:
gdb -p PID
7) use "continue" to continue the process

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
This is mainly needed to use the enhanced log file to analyse without gdb

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
Reply With Quote
Reply

Tags
debug linux gdb trace


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 01:24 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.