Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Segmentation fault (core dumped) Post 14962 by thehoghunter on Friday 8th of February 2002 10:23:13 AM
Old 02-08-2002
You can get a core dump because of many things. It normally is because of environment variables not being correct. I get the following every time I forget to set my term to vt100 -

$ echo $TERM
dtterm
$ vi /etc/motd
dtterm: Unknown terminal type

[Using open mode]
Segmentation Fault(coredump)
$ ls -l core
-rw-r--r-- 1 tghunter sysadmin 562480 Feb 8 10:13 core
$ file core
core: ELF 32-bit MSB core file SPARC Version 1, from 'vi'


As you can see I tried to vi a file but my term was dtterm instead of vt100 (I was doing a telnet to another server). It dumps a core file which can be removed. Programmers will use core files to check their code when they have a problem. Most admins have a cron job to remove core files from the filesystems (but watch out, some applications have files called somethingcore - removing them causes headaches!)

Example of programmers having problems:
Calls to Performance Library routines cause segmentation faults. What could be wrong and what can I do?

You may be experiencing stack overflow in your program. There are two types of stack space that need to be addressed.

First, there is the stack space allocated to a process. This is controlled by the limit command. Try unlimiting your process stack by saying:

% unlimit stacksize
Secondly, if your program is multi-threaded each thread must have its own stack space. This is controlled by the ${STACKSIZE} environment variable. The units are in KB so saying:

% setenv STACKSIZE 4000
sets each thread's stack size to 4 MB. This is the minimum value that Performance Library requires, so make sure that ${STACKSIZE} is set to at least 4000. You may need to increase this value if your program uses large stack based variables.
thehoghunter
 

10 More Discussions You Might Find Interesting

1. Programming

Segmentation Fault (core dumped)

what r the situations to receive an error msg like the one below Segmentation Fault (core dumped) (2 Replies)
Discussion started by: bankpro
2 Replies

2. UNIX for Advanced & Expert Users

Memory Fault - Core Dumped

I use SCO UNIX 5.07 on a Compaq Proliant Machine. Each time I press the Escape or Delete key while running a program or issuing a FoxBase+ command from the dot prompt, I receive the error message: "Memory Fault - Core Dumped" and the screen locks up immediately. I would appreciate if necessary... (0 Replies)
Discussion started by: bayuz
0 Replies

3. Solaris

Segmentation Fault (core dumped)

i am getting Segmentation Fault (core dumped) on solaris, but when i run the same program with same input on linux it runs successfully. How can i trace the fault in program on solaris. (6 Replies)
Discussion started by: junaid.nehvi
6 Replies

4. Solaris

segmentation fault core dumped

i am getting segmentation fault (core dumped) i tried following things but couldn't understand what is wrong with my prog and where the problem is.... i have only adb debugger available on solaris.... so plz help bash-3.00$ pstack core core 'core' of 765: ./mod_generalised_tapinread... (4 Replies)
Discussion started by: junaid.nehvi
4 Replies

5. Red Hat

Segmentation fault (core dumped)

Hi All, I am getting "Segmentation fault (core dumped)" error in the runtime. I am new this please can you tell me why is that i am getting this error and I am not sure of my compilation : gcc -c avc_test.c gcc -c md5.c gcc avc_test.o md5.o -shared -Llibcoreavc_sdk.so -o proj ... (1 Reply)
Discussion started by: fido.genial
1 Replies

6. Programming

getting Segmentation Fault (core dumped) error but Program runs fine.

i am executing following program int main() { char str; FILE * fp; int i=0; ... (4 Replies)
Discussion started by: bhavesh.sapra
4 Replies

7. UNIX for Advanced & Expert Users

Segmentation Fault/ core dumped in metadb

When I was trying to mirror in my v880 server after OS up gradation from 8 to 10 metadb -afc 3 /dev/dsk/c1t1d0s7 I got an error metadb: Segmentation Fault Segmentation Fault (core dumped) Then I logged a case to Oracle/sun team they suggest "Please could you try metadb -ac 3... (0 Replies)
Discussion started by: taherahmed
0 Replies

8. Programming

C: Memory Fault (core dumped)

When I run programm show this message: Memory Fault (core dumped) Does anyone can help me and tell me what is wrong? please #include <stdlib.h> #include <stdio.h> #include <process.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> int main(int argc, char *argv) { ... (3 Replies)
Discussion started by: ebasse2
3 Replies

9. UNIX and Linux Applications

Tilda Segmentation fault (core dumped)

Can anyone tell me why I keep getting a Segmentation fault when I try to run tilda? $ tilda Segmentation fault (core dumped) It seemed to run after I deleted my tilda directory like this thread said to do. Unfortunately it wouldn't let me set my keybinding with anything I tried. ... (0 Replies)
Discussion started by: cokedude
0 Replies

10. UNIX for Dummies Questions & Answers

Find a string across line break (because of "segmentation fault core dumped")

Hi, thanks to a precedent post, and thanks to the reply of derekludwig of the forum, I have convert my first awk command as : test.txt is : AAAAAGHIJKLAjKMEFJKLjklABCDJkLEFGHIJKL awk -f findstring.awk test.txt > textreturn.txtfindstring.awk is : BEGIN{ SLENGTH = 3 } { ... (3 Replies)
Discussion started by: thewizarde6
3 Replies
fmd(1M)                                                   System Administration Commands                                                   fmd(1M)

NAME
fmd - fault manager daemon SYNOPSIS
/usr/lib/fm/fmd/fmd [-V] [-f file] [-o opt=val] [-R dir] DESCRIPTION
fmd is a daemon that runs in the background on each Solaris system. fmd receives telemetry information relating to problems detected by the system software, diagnoses these problems, and initiates proactive self-healing activities such as disabling faulty components. When appropriate, the fault manager also sends a message to the syslogd(1M) service to notify an administrator that a problem has been detected. The message directs administrators to a knowledge article on Sun's web site, http://www.sun.com/msg/, which explains more about the problem impact and appropriate responses. Each problem diagnosed by the fault manager is assigned a Universal Unique Identifier (UUID). The UUID uniquely identifes this particular problem across any set of systems. The fmdump(1M) utility can be used to view the list of problems diagnosed by the fault manager, along with their UUIDs and knowledge article message identifiers. The fmadm(1M) utility can be used to view the resources on the system believed to be faulty. The fmstat(1M) utility can be used to report statistics kept by the fault manager. The fault manager is started automatically when Solaris boots, so it is not necessary to use the fmd command directly. Sun's web site explains more about what capabilities are cur- rently available for the fault manager on Solaris. OPTIONS
The following options are supported -f file Read the specified configuration file prior to searching for any of the default fault manager configuration files. -o opt=value Set the specified fault manager option to the specified value. Fault manager options are currently a Private inter- face; see attributes(5) for information about Private interfaces. -R dir Use the specified root directory for all pathnames evaluated by the fault manager, instead of the default root (/). -V Print the fault manager's version to stdout and exit. EXIT STATUS
The following exit values are returned: 0 Successful completion 1 An error occurred which prevented the fault manager from initializing, such as failure to open the telemetry trans- port. 2 Invalid command-line options were specified. FILES
/etc/fm/fmd Fault manager configuration directory /usr/lib/fm/fmd Fault manager library directory /var/fm/fmd Fault manager log directory ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWfmd | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), fmadm(1M), fmdump(1M), fmstat(1M), syslogd(1M), attributes(5), smf(5) http://www.sun.com/msg/ NOTES
The Fault Manager is managed by the service management facility, smf(5), under the service identifier: svc:/system/fmd:default The service's status can be queried using the svcs(1) command. Administrators should not disable the Fault Manager service. SunOS 5.10 17 Nov 2004 fmd(1M)
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy