LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2013, 11:21 AM   #1
jefsa
Member
 
Registered: Mar 2012
Posts: 56

Rep: Reputation: Disabled
Segmentation fault


Hello All,

Where to go??

I have a script that runs using slackware/tcl8.5/tk8.5. It creates a GUI where selections can be entered to perform certain actions. After making a selection and upon executing it I receive back on the command line the following message.
"access control disabled, clients can connect from any host
/<directory name>/<executable file>: line 4: 3111 Segmentation fault
access control enabled, only authorized clients can connect"

In repeating the process the only thing that changes is the segmentation fault number but appears to only change the last three numbers:3xxx.

This script does work; it works on other host machines. The script was copied from another host to this one but still will not execute properly.

Where do I go from here?

Thanks.

Regards,
Jeff
 
Old 06-25-2013, 11:34 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Is the version of tcl/tk the same on the machines on which the script executes properly, and the problem machine?
 
Old 06-25-2013, 12:45 PM   #3
jefsa
Member
 
Registered: Mar 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi,

Yes it is. It's this locale machine that is not operating properly.

Thanks.

Regards,
Jeff
 
Old 06-25-2013, 01:27 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
The number (3xxx) is the process number of the process that is causing the segmentation fault. It changes each time you run the main program because the main program is spawning a new process each time it's run.

Without more details it's not possible to offer any specific help, but I'd suspect that a program that the script is starting was compiled on a different system and copied to the "new" one. If that program uses direct kernel links, it probably needs to be recompiled for the kernel being used on the "new" system.
 
Old 06-25-2013, 02:02 PM   #5
jefsa
Member
 
Registered: Mar 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
HI,

I really do not want to give up that easy!! I do not know what specific details I can provide but what I do know is that
the person I work with (not here) created a tar file from a operating one and I believe he scp it over to this machine.
This script does work, it just does not work on my machine.

I know my machine works, so far as I can use the command line to obtain the requested results that would be obtained if
I was using the GUI.

Maybe this helps!!

Thanks.

Regards,
Jeff
 
Old 06-25-2013, 02:33 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
You need to debug the script in steps. Find what works, how far it works, try to zero in on the point which causes the segmentation fault. Segmentation faults are an illegal memory access. Edit this script to add debug to find out how far you attain in the script, comment out lines to limit the parts of it which run, stuff like that. Every script basically runs from start to finish. The file or files which define the script may not look like that. For instance a bash script can have functions at the top of it, and near the bottom the actual script main is, and it's not called main, merely that you see one or more functions and after those, you next see script executable lines, which defines the main body of the script. So figure out how this script is architect, start following the flow of it, and diagnosing what works, what doesn't, and where it runs into the segmentation fault. You may find that the fault is merely because part of the script is looking for another file which wasn't copied over, but likely you'll find a program or script line which is causing this problem.
 
1 members found this post helpful.
Old 06-26-2013, 10:11 AM   #7
jefsa
Member
 
Registered: Mar 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi,

Ok, I understand what you are saying but my knowlege base is very limited but I am learning!!

I have found something that produced a fault indication when I ran an associated executable script as follows:
No protocol specified
Tk_Init failed:

When I ran the same executable on a known good host it worked just fine!! The GUI came up and I was able to make a
entry in a field and it worked fine.

I did a copy of the good executable to a executable test file, scp this over to my machine and ran it which produced the above faults.
The orignal script on my machine also showed the same results. So there is a problem at least at this point.

What do these faults indicate and where do I go from here?

Thanks.

Regards,
Jeff
 
Old 06-26-2013, 12:54 PM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,087
Blog Entries: 10

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Sounds like you're running a tcl script. If so, for instance if the script has a .tcl extension at the end of it the way I'd diagnose would be to see if Tcl were installed and able to run the most simple test script. If Tcl were not properly installed, I'd install it, or re-install it. Check the version of Tcl on the systems where it works and compare it against what you have now.

Try this for a reference on how to install and use Tcl in Linux and how to write a very rudimentary script to test that it's working http://www.tldp.org/HOWTO/TclTk-HOWTO.html.

Here's how to check your version:
Code:
me@my-desktop:~$ which tclsh
/usr/bin/tclsh

me@my-desktop:~$ tclsh
% puts $tcl_version
8.4
% exit
me@my-desktop:~$
The next step would be to try and run the specific script you've copied. There may be support files which are required, which are either unique to the version and hence why you're having problems, or unique to that script and as a result you haven't copied all you're required to copy. Unfortunately it may be a very advanced script, or it may be a one file script. That's what you have to debug.

A good first step is to just run a basic hello world and see that it works properly.
 
1 members found this post helpful.
Old 06-26-2013, 01:25 PM   #9
jefsa
Member
 
Registered: Mar 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Hi,

It is a tcl script that is creating the GUI and yes it is advanced and large. They may several for this application.
It is certainaly beyond my knowledge base and was written before I got here.

I did copy one of the scripts as mentioned in the last reply but I got the same results.

However, you gave me a starting point to see if tcl works on this machine...I really do not know!!! I will look at your website.

Thanks.

Regards,
Jeff
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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, what does it mean ? Mcfestoe Linux - Newbie 6 06-03-2011 11:51 AM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 10:34 AM
segmentation fault libriana Linux - Newbie 2 06-10-2005 06:52 PM
Help! Segmentation Fault qieqie Linux - Newbie 3 06-03-2005 10:10 PM
why segmentation fault??? andrewnow Programming 8 03-26-2005 07:50 PM


All times are GMT -5. The time now is 10:58 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration