Solved

core does not get generated in linux

Posted on 2012-04-11
4
438 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now