Solved

core does not get generated in linux

Posted on 2012-04-11
4
440 Views
Last Modified: 2012-04-12
Hello
This is URGENT!!!
core file is not getting generated for a process(pid: 1234), after running "kill -9 1234" or "kill -11 1234"


machine is:
Linux abc.def.xyz.org 2.6.18-164.2.1.el5xen #1 SMP Mon Sep 21 04:45:50 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

ulimit -a is:
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 32768
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 32768
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


cat /proc/1234/limits is:
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             32768                32768                processes
Max open files            1024                 1024                 files
Max locked memory         32768                32768                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       32768                32768                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0


PLease help

Sham
0
Comment
Question by:mohet01
  • 2
  • 2
4 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 37832266
Hi,

"kill -9" will never force a core dump.

Try "kill -6"  ("ABRT") instead.

If this doesn't work try "kill -3" ("QUIT").

wmp
0
 

Author Comment

by:mohet01
ID: 37832354
if the sigsegv is generated due to code problem, how to generate core?
Sham
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 37832529
Your program should always generate a core dump when a SEGV occurs, unless its SUID root
(permissions -rws...... and owner root).

In this case special coding is required, see this thread:

http://fixunix.com/unix/398999-forcing-core-dump-sigsegv-setuid-program-linux.html

Or remove the setuid bit and run the program as root, if required (and if you're allowed to do so).
0
 

Author Closing Comment

by:mohet01
ID: 37837000
perfect
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question