SUMMARY: segmentation fault

From: John T Wilson (wilsonj@awcdb1.eglin.af.mil)
Date: Fri May 13 1994 - 04:03:17 CDT


My original question to the list was:

Hello Sun experts, Several times over the last couple of
years, I've gotten the system message "segmentation fault"
after seemingly unrelated operations. This last time, I was
attempting to monitor file i/o in Oracle7 on a 670MP running
SunOS 4.1.3. I was kicked out of Oracle and back to the
system, with the message "segmentation fault". I haven't been
able to find out anything in our documentation about it. If
anyone has any answers, I would greatly appreciate it.

Since the replies were pretty short and not too numerous, I've included
the text of each along with the author's name below. Many thanks to all
who responded!!! BTW, a core dump does NOT accompany the segmentation
fault (which is reproducible). Haven't had time to check with Oracle
Customer Support yet. Thanks again.

********** SUMMARY REPLIES BEGIN HERE *********

Kai Grossjohann <grossjoh@sally.informatik.uni-dortmund.de>

a segmentation fault means that the program writes to or reads from an
address not in its address space allocated to it by the system. This
happens with `dangling pointers', i.e. pointers that point to nowhere
in particular, for instance to an area of memory that has been free()d
already. As to why Oracle does this, I've got no idea.

******************************************************************************

peter.allan@aea.orgn.uk

See SunOS user's guide: Basic Troubleshooting p16

Often caused by exceeding array bounds.

In my own programs it's easy enough to suspect my own error
and then track it down. In other programs you may just have
to accept it as a random mishap.

******************************************************************************

Jochen Bern <bern@penthesilea.Uni-Trier.DE>

"Segmentation Fault" means that some User Program tried to access a
Piece ("Segment") of Memory that wasn't yet allocated to it. (FYI, If
the Kernel does such a Thing, the Result is a "panic: Data Fault".)
To put it plainly, something's wrong in the Program. Mail the Info
you've got to the Support People of the Software.

******************************************************************************

Michael Kline <mike@birch.lib.utexas.edu>

Segmentation faults usually mean that you ran out of memory. Try increasing
your swap space and see if that helps.

******************************************************************************

Tilman Sommer <sommer@vsun02.ag01.Kodak.com>

You probably get hundreds of messages back on this: This message
shows up whenever the UNIX kernel detects a request to access to a
memory location which is not owned by the program requesting the access.
Virtual memory is really segmented and each segment belongs to just one program.
In that case, the process (program) will be terminated via signal 11 (SIGSEGV)
since this always happens whenever there is a bug in the program running -
mostly invalid pointers. Also, the message you've seen shows up.

SO, complain with ORACLE and report the bug. If possible tell them
the circumstances and even better, tell them how to reproduce
this problem.

******************************************************************************

Brad Burdick <bburdick@radio.com>

Segmentation fault means that your application blew up. Usually caused by
referencing memory that does not belong to the application or stomping
around in memory because of a stray pointer or accessing an invalid pointer.

i.e., application problem, should contact Oracle.

******************************************************************************

Daniel Hurtubise <daniel@CANR.Hydro.Qc.CA>

I don't think that you'll find a clean cut answer on this one. Segmentation
faults are caused by applications that have bugs in them. I have
had similar problems with other applications AND ORACLE. The only way
that I have been able to find out the cause is by using the core dumps
and the adb command. This can help in finding where the application is
crashing. Usually (almost always) these problems are handled by some
techy who can read core dumps at the source developper, ie Oracle in your
case.

I would suggest that you contact oracle and have them look at the problem,
although they'll probably tell you to upgrade to a new version (I've never
gotten good tech. help from oracle).

******************************************************************************

Michael Pavlov <Michael.Pavlov@toexpres.com>

Last nite i was checking the server from home and
netstat -a | less caused "Segmentation fault" every single time
I checked it now, after reboot and it's fine.
Most of tha times i'm getting this error doing something illegal,
like calling binary incompatible prog, etc.
Please make sure you'll summarise.

******************************************************************************

Kevin Weinrich <kbw2@helios.ath.epa.gov>

Segm. fault is when an executable tries to access memory outside
its segment - e.g., an array dimensioned 1-100 tries to access the 101st
element.

******************************************************************************

Curt Larock <larock@software.org>

Segmentation faults in commercial software are usually the result of the
process running out of memory or swap space. The process tries to
obtain additional memory using malloc(), there's no more free space so
malloc() returns 0, the process then tries to store something at address
0 causing a segmentation fault.
Since the memory available depends on the processes currently running
this can be a "phases-of-the-moon" type error that occurs intermittently.
It may also be caused by a memory leak in a long-running process (like
Oracle), and may only occur if the system has been up a long time
between reboots.

/usr/etc/pstat -s will show you how much swap is free.

******************************************************************************

Adam Fox <adamfox@super.org>

A segmentaion violation (or segmentation fault) simply means that a program is
trying to access memory that does not belong to it. Since your machine is a
multi-processing machine, the OS assigns blocks of memory to each process.
When a program tries to access a piece of memory outside of its block (segment),
this causes a segemtation violation and causes most programs to crash.

If this is happening in Oracle and is recreatable, you may want to work with
your vendor as this could be a bug in their software or a bug in the
configuration of the database.

This is a common error in software writing and is usually caused by folks messing
up their pointers (if you done any programing in C or a similar language you
probably understand how this can happen).

************ END OF SUMMARY ************

John T. Wilson
Email wilsonj@awcdb1.eglin.af.mil
Commercial 904-882-8988
DSN 872-8988
FAX 904-882-2909 (SCAM/JT WILSON on cover sheet)



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:00 CDT