"The Linux Gazette...making Linux just a little more fun!"

(?) The Answer Guy (!)

By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/

(?) General S. Fault

From dlancas on Mon, 11 Oct 1999

Along the lines of "wha'appen?", I started using KDE the other day, and klicked on my kcalc and waited... and waited.... and then I klicked again just for the heck of it. When I tried to start the calculator from the terminal, I got the wonderful segmentation fault. This happened previously with xosview which was working great then stopped working one day. I recently upgraded KDE to the newest stable version (1.1.2) and noticed that along with the calculator, some other programs are also giving me segmentation faults (such as the KDE text editor).

Just who is segmentation and why is my computer blaming him for screwing up my system? I looked in numerous books, etc, and can not find any mention of this. Thanks in advance.

Doug Lancaster www.lancompworx.com

(!) Maybe "Segmentation" is General Protection Fault's middle name ;-)
Actually a segmentation fault is Unix technese for: "that program stepped out of bounds!" It is similar to the old MS Windows "General Protection Fault" or the old QEMM "Exception 13" etc (except that segfaults don't make Linux kernels unstable and don't indicate that we should hastily save all our work and reboot "before it's too late!").
The way that Linux keeps user programs from interferring with system operations, and other user programs is through memory management.
When a program is loaded it is allocated some memory for it's binary executable code (ironically called "text"), it's static data segment (the "BSS"), and its stack and heap (dynamic data). If the program needs more memory it must request it through the malloc() system call. If a program ever tries to access memory outside of its segments it is stopped by the processor (on x86 and some other platforms) or some other hardware MMU (on some other CPU architectures). This processor or MMU "exception" (or "trap" as its known in some architectures) then calls on a kernel exception handler, which then summarily kills the program, (optionally) dumps a post mortem debugging file, usually named 'core' (and consequently known as a "core file"), and signals the program's parent process (with a SIGCHLD).
When the parent process is the shell, it prints a message like the one you describe: "segmentation fault, core dumped"
So, probably the programs in question have bugs in them. Perhaps they swallowed a corrupt bit of data that the programmer wasn't quite clever enough to foresee in his parsers. Possibly some of the libraries on which these programs depend have changed or differ from the versions that the programmer was using.
Of course there are other possibilities. Perhaps the binaries or some of their libraries have been corrupted on the disk. Possibly you have some bad memory chips (possibly some RAM that only misbehaves under specific conditions, such as when you are running the video card is specific resolutions). Those sorts of problems usually give other symptoms like the infamous "Sig 11" problems (http://www.bitwizard.nl/sig11).
I'd definitely shutdown and force a full fsck of all your filesystems ASAP. If that doesn't report any problems then it probably is just the software.
Probably the latest "stable" KDE is not as stable as your previous version. Maybe you need to upgrade some libraries to go with the new release.
Good luck. You might try downgrading back to the older version to see if that clears it up.

Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 48 December 1999
HTML transformation by Heather Stern of Starshine Technical Services, http://www.starshine.org/

[ Answer Guy Current Index ] [ Index of Past Answers ] greetings 1 2 3 5
5 6 7 8 9
10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27
28 29 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45
46 47 48 49 50 51 52 53 54
55 56 57

[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Linux Gazette FAQ ] [ Next Section ]