Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Segmentation Fault, no core dump [duplicate]

I am consistently getting a segmentation fault in my program, yet no core dump files are generated. ulimit shows a value of unlimited, did ulimit -c unlimited just to be sure, and it appears to be fine. Any ideas?

like image 270
OBLE Codemonkey Avatar asked Mar 07 '13 13:03

OBLE Codemonkey


People also ask

Is segmentation fault a core dump?

Core Dump (Segmentation fault) in C/C++ Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.” When a piece of code tries to do read and write operation in a read only location in memory or freed block of memory, it is known as core dump.

How do I get a core dump?

You can use the gcore command in the gdb (GNU Debugger) interface to get a core image of a running process. This utility accepts the pid of the process for which you want to force the core dump. To get the list of Java processes running on the machine, you can use any of the following commands: ps -ef | grep java.


1 Answers

if your program runs as root (or with root capabilities) check:

cat /proc/sys/fs/suid_dumpable

or if program is a daemon check:

getsebool allow_daemons_dump_core

like image 121
Maciek B Avatar answered Sep 22 '22 11:09

Maciek B