10-13-2012
You cannot debug kernel code from gdb. You have to use a kernel debugger.
I would suggest that you are probably corrupting the kernel with repeated segfaults.
You probably are not aware, but originally UNIX would panic (crash with a core dump) when any process had a segfault. UNIX is not meant to have bad code violate memory time after time after time. That said, I kinda doubt it is a bug in the true sense of the word.
Your code is acting more like a virus.
What does the system log say about errors? Do you get a core when the system crashes? You probably did get a system dump. You can analyze that system core.
What OS do you have?
You do understand that what I am about to say will let you do what you ask but it may trash your OS eventually:
Block (ignore) the SIGSEGV signal and set up the signal handler to reset the ignore. Then let your code run over and over the bad code until the system dies. Be sure to turn on a full system dump. Some OSes let you turn off system core dumps. You want it on. That may take a lot of GB of disk space. Then go after your bug in the kernel with the correct tool.
I do not know your OS so I cannot give you a better answer.
Last edited by jim mcnamara; 10-13-2012 at 01:30 AM..
This User Gave Thanks to jim mcnamara For This Post:
10 More Discussions You Might Find Interesting
1. Programming
I have written a program which takes a directory as command line arguments and displays all the dir and files in it.
I don't know why I have a problem with the /etc directory.It displays all the directories and files untill it reaches a sub directory called peers which is in /etc/ppp/peers.the... (4 Replies)
Discussion started by: vijlak
4 Replies
2. AIX
Hi ,
During execution a backup binary i get following error
"Program error 11 (Segmentation fault), saving core file in '/usr/datatools"
Riyaz (2 Replies)
Discussion started by: rshaikh
2 Replies
3. Linux
Hi,
on a linux Red HAT(with Oracle DB 9.2.0.7) I have following error :
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
using channel ORA_DISK_1
Segmentation fault
What does it mean ? And the solution ?
Many thanks. (0 Replies)
Discussion started by: big123456
0 Replies
4. Programming
What is segmentation fault(core dumped) (1 Reply)
Discussion started by: gokult
1 Replies
5. Programming
I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek:
#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string.h>
using namespace std;
int outputToImport(const char*... (1 Reply)
Discussion started by: sepoto
1 Replies
6. Programming
This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great answers to my last post.:):b:
int main()
{
mysqlpp::Connection conn(false);
if... (3 Replies)
Discussion started by: sepoto
3 Replies
7. Programming
Hello everyone,
I am using the debugger from C++ and these are the message I got:
Program received signal SIGSEGV, Segmentation fault.
0x0040cc0e in malloc_consolidate (av=0x4ff3c0) at malloc.c:5169
in malloc.c
I don't know if the problem is cause i'm trying to acess an invalid memory... (1 Reply)
Discussion started by: juliecf5
1 Replies
8. Homework & Coursework Questions
this is a network programming code to run a rock paper scissors in a client and server.
I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault.
-the segmentation fault is fixed
Current problem -Also... (3 Replies)
Discussion started by: femchi
3 Replies
9. UNIX for Dummies Questions & Answers
I am using scientific linux. In the directory user/project/Build, after I ran 'make' to compile and link all the cpp files,I had no problems. But then, when I went to directory user/run/run.sh, which runs the project binary in user/project/Build/bin/project, I get a segmentation fault error. In... (1 Reply)
Discussion started by: larry burns
1 Replies
10. Programming
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
LEARN ABOUT HPUX
dump_compress_on
dump_compress_on(5) File Formats Manual dump_compress_on(5)
NAME
dump_compress_on - selects whether the system dumps memory pages compressed or uncompressed when a kernel panic occurs
VALUES
Failsafe
Default
(Allow the kernel to decide whether to dump compressed or not based on the system state at the time of the crash.)
Allowed value
Integer values and
The setting for is used as follows:
Dump uncompressed.
Dump with compression for speed if possible.
Recommended values
(Allow the kernel to choose dump mode.)
The value the kernel usually chooses is 1.
DESCRIPTION
On large systems, the time required to dump system memory when a kernel panic occurs can be excessive or even prohibitive, depending on how
much physical memory is installed in the system. Compressed dump capability results in smaller and faster dumps that will also take lesser
time to save over into the filesystem.
The (see crashconf(1M)) command and its associated configuration file control the dump compression mode in the memory dumps associated with
a system crash. On rare occasions, the system may crash before is run during the boot process. On those occasions, the configuration set
using the tunable will be used.
The default value for this parameter is The system determines whether or not to dump compressed based on the type of crash that occurs, in
this case.
Note that certain types of system crash require an uncompressed crash dump. Also, the system operator may request an uncompressed crash
dump at the time the dump is taken. In either of these cases, an uncompressed dump will be performed regardless of the mode selected in
Who Is Expected to Change This Tunable?
Only HP Field engineers should change the value of this tunable.
Restrictions on Changing
Changes to this tunable take effect immediately.
When Should the Tunable Be Turned On?
This tunable should be turned on to dump compressed when there is a system crash.
What Are the Side Effects of Turning the Tunable Off?
In this case, an uncompressed dump is taken always. On large memory machines, an uncompressed dump take typically three times longer than
a compressed dump.
When Should the Tunable Be Turned Off?
The tunable should be turned off if there is a problem with compressed dumps.
What Are the Side Effects of Turning the Tunable On?
The system decides the dump mode based on the type of crash.
What Other Tunables Should Be Changed at the Same Time?
None.
WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of
HP-UX.
Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation,
some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun-
able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was
factory installed on your system, see at
AUTHOR
was developed by Hewlett-Packard Company.
SEE ALSO
crashconf(1M), alwaysdump(5), dontdump(5).
Tunable Kernel Parameters dump_compress_on(5)