LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2016, 04:06 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 546

Rep: Reputation: 37
Segmentation fault (core dumped) tzap


I'm running a centos 6.7 server (command line only) and I'm trying to auto-start a live tv stream whenever the machine boots up. I have a bash script "/root/start-stream.sh" with this command in it:

Code:
#!/bin/bash

# start tzap on pick tv
echo "starting tzap"
/usr/bin/tzap -S -r Pick
sleep 3

<snip-rest of script>
if I run the same command "/usr/bin/tzap -S -r Pick" in a shell it works perfectly, and if I manually run the script "/root/start-stream.sh" that works fine too, but if I put the script into /etc/rc.d/rc.local so it auto-starts it crashes with this:

Quote:
/root/start-stream.sh: line 6: 2922 Segmentation fault (core dumped) /usr/bin/tzap -S -r Pick
why is it crashing? and can this be solved? thanks for any help.
 
Old 03-18-2016, 03:19 PM   #2
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 119

Rep: Reputation: 25
I would wonder if its starting too early - some service that it depends on has not finished initialising? I'd try putting a startup dealy in the script and see if that helps.

Paul.
 
Old 03-18-2016, 03:22 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
What does the core file show? And I wasn't aware you could get a core file from BASH, if so, how do you debug it? I thought that'd come from an executable instead.
 
Old 03-19-2016, 05:09 AM   #4
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
I don't know what the core file is called or where to find it.
 
Old 03-19-2016, 12:07 PM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by tonj View Post
I don't know what the core file is called or where to find it.
It's usually called "core" and will usually also reside in the directory where you were running the script from. Sorry I didn't look closely enough before, but based on this:
Quote:
Originally Posted by tonj View Post
/root/start-stream.sh: line 6: 2922 Segmentation fault (core dumped) /usr/bin/tzap -S -r Pick
It is therefore having a problem at line #6 of your start-stream.sh script. And apparently that is a call to /usr/bin/tzap and my guess is that the segmentation fault is occurring in tzap. You therefore either have source for tzap, or you can possibly determine what is wrong with it by running:
Code:
$ gdb /usr/bin/tzap core
in the directory where the core file is located and see what the problems are by using the backtrace command. This also may be tzap having a problem because the input to it was bad and that particular function was poorly written where if given bad arguments it can have this problem.
 
Old 03-19-2016, 02:36 PM   #6
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
edit

Last edited by tonj; 03-19-2016 at 02:38 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault (core dumped) mezyana Linux - Newbie 1 05-18-2014 03:52 PM
Segmentation Fault (core dumped) doing su - Blinker_Fluid Solaris / OpenSolaris 5 10-07-2008 06:04 PM
Segmentation fault (core dumped) nasim751 Programming 1 01-27-2008 09:18 PM
segmentation fault (core dumped) - what??? Micro420 Programming 6 12-07-2006 01:03 AM
Segmentation fault (core dumped) hasanaydin Linux - General 0 03-27-2002 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration