How to force core dump of a process


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to force core dump of a process
# 1  
Old 05-07-2008
How to force core dump of a process

We have an application that terminates with segmentation violation errors in the logs. No source code is available since this is a third party software that is way past its maintenance life cycle. Under these circumstances is there a way to force a core dump of the process for further analysis??

Please go easy on me, please... I'm a newbie...Smilie
# 2  
Old 05-07-2008
Depending on the OS you are on, you may try to trace the program execution with utilities like truss (Solaris) or strace (Linux).

In this manner you can go deep in the analysis of the process system calls, open files, etc. that may cause segmentation fault.

According to your OS, have a look at man pages and try Smilie
# 3  
Old 05-07-2008
SIGSEGV by default forces a core dump. If there is no core file the usual reason is that ulimit for the process coredump value is zero.
Code:
csadev:/home/jmcnama> ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         2015464
stack(kbytes)        256000
memory(kbytes)       unlimited
coredump(blocks)    0

A setuid process may also not want to dump core.

You probably should see a file named "core" in the cwd of the process, which is often the login directory. If this is a ulimit probelm, reset ulimit to allow coredump for the user that runs the process.
# 4  
Old 05-08-2008
The problem is only happening in Prod. Tracing is out of the question.

I did the following:

$ ulimit -c 9999999999 ## set core file size to unlimited
$ kill -s SIGSEGV <PID> ## Is this how a signal is sent to a PID??

The process terminates and no core files are created. Smilie

Is it required that the application has to be built/coded specifically to accept signals?

TIA.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Core Dump of a process in Red Hat Linux 5.9

Hello All, I am new joiner of this forum.I am new to Linux shell scripting. At present I have identified 1 application which stalls very frequently (PID is say xyz) and I am not having much information in its application log to identify the root cause of stalling. I need to take the core dump... (19 Replies)
Discussion started by: Anjan Ganguly
19 Replies

2. Solaris

core dump

Hi guys, just want to know which core file pattern is best to set for core dumps: 1) per-process file name pattern or 2) global file name pattern. I will really appreciate an explanation why the chosen one is better. Thanks a lot guys. (2 Replies)
Discussion started by: cjashu
2 Replies

3. HP-UX

Core dump in HP-UX

Hi Guys, I was wondering if somebody could give me a link to a very good source of information or document about core dump process and How to's about it. I have also googled it and found some articles myself. Thanks Messi (1 Reply)
Discussion started by: messi777
1 Replies

4. Red Hat

Process does not dump any core files when crashed even if coredumpsize is unlimited

Hello Im using redhat and try to debug my application , its crashes and in strace I also see it has problems , but I can't see any core dump I configured all the limit ( im using .cshrc ) and it looks like this : cputime unlimited filesize unlimited datasize unlimited... (8 Replies)
Discussion started by: umen
8 Replies

5. AIX

Core dump

Hi , I want to read core dump file on AIX5.3. While i am trying to use following commands, i am getting only few lines of information. ux201p3:e46123> dbx capsWrkstnMgr core Type 'help' for help. reading symbolic information ... Segmentation fault in malloc_common.extend_brk at... (1 Reply)
Discussion started by: rps
1 Replies

6. AIX

core dump

My application gives core dump. When i am debugging with dbx getting instructions below: pthdb_session.c, 818: 695445 PTHDB_INTERNAL (internal error) pthreaded.c, 1941: PTHDB_INTERNAL (internal error) Illegal instruction (illegal opcode) in . at 0x0 warning: Unable to access address 0x0... (1 Reply)
Discussion started by: bapi
1 Replies

7. UNIX for Advanced & Expert Users

core dump

Hi All, i am new to this forum.i want detail of reading the core file and trace the problem because of what the program get crashed.please help me.if any body knows any website or tutoril plese let me know. sudhir (6 Replies)
Discussion started by: sudhir patnaik
6 Replies

8. UNIX for Dummies Questions & Answers

core dump

I've got a core dump in my weblogic home directory, which i have tried to debug by initiating savecore from /etc/init.d/savecore start but savecore failed to create the two files, that is vmcore.n and vmunix.n. savecore is enable on my server to save vmcore and vmunix in /var/crash/hostname 1)... (4 Replies)
Discussion started by: hassan2
4 Replies

9. UNIX for Dummies Questions & Answers

core dump

does any one have read a core dump? is there any reader for that? or may i know what is the use of that core which takes sometimes memory in GBs? :) (6 Replies)
Discussion started by: sskb
6 Replies

10. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
Login or Register to Ask a Question