LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-03-2013, 06:52 PM   #1
khandu
Member
 
Registered: Sep 2003
Posts: 93

Rep: Reputation: 0
Unhappy Core dump not being generated in RHEL 6.4


Hi

New to linux here but after reading a bit..

We have a process being run by "user1". It crashes and we can see a segfault in the /var/log/messages

Other settings of the server are
Quote:
[10:13:28]user1 hostname:~$cat /proc/sys/kernel/core_pattern
/srv/home/user1/core.%p.%e.%t
[10:13:34]user1 hostname:~$cat /proc/sys/kernel/core_uses_pid
1
[10:13:57]user1 hostname:~$ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 127462
max locked memory (kbytes, -l) 64
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) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Still we cannot find any core dump file to send to vendor for diagnostics..

How can we fix this??
 
Old 04-03-2013, 07:57 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Greetings,

Just for a little clarification, when you say that it is crashing, is it locking the system up as well? In other words, are you having to reboot the system to recover from the crash?

Let us know.
 
Old 04-03-2013, 08:43 PM   #3
khandu
Member
 
Registered: Sep 2003
Posts: 93

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ShadowCat8 View Post
Greetings,

Just for a little clarification, when you say that it is crashing, is it locking the system up as well? In other words, are you having to reboot the system to recover from the crash?

Let us know.
Just the application is freezing / crashing.. System is fine..

Just confused why coredump is not generated with all those settings...

doing a manual coredump via gdb command.. but not core dump automatically does not help when we are not monitoring.
 
Old 04-04-2013, 04:17 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
khandu,

Checkout these two links, it may help you-

http://honglus.blogspot.in/2010/06/h...-dump-for.html
http://www.cyberciti.biz/tips/linux-core-dumps.html
 
Old 04-04-2013, 11:42 AM   #5
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Okay,

@Satyaveer Arya: Good info.

And, another thing that you could do to really get to the root cause of the issue would be to use strace.

Running something like this could show you what is happening as the process makes any open, close, read or write system calls:
Code:
 ~ $ strace -o <output_file.txt> -e trace=open,close,read,write -p<process ID#>
This will attach strace to the process you give to the -p option. If you want to capture everything that happens when the program runs, you can use this:
Code:
 ~ $ strace -o <output_file.txt> -e trace=all <program executable> [<any args to the program>]
WARNING: Capturing everything can lead to VERY large trace output files!

And, lastly, to capture *just* the process management type calls (e.g. fork, wait, and exec), you can use the following:
Code:
 ~ $ strace -o <output_file.txt> -e trace=process <program executable> [<any args to the program>]
There are many options and ways to use strace to figure out where trouble may lie in the running of a given program, so definitely check man strace to use the other options if you don't find the core issue with my suggestions above.

HTH. Let us know.

Last edited by ShadowCat8; 04-04-2013 at 11:44 AM.
 
Old 04-04-2013, 04:02 PM   #6
khandu
Member
 
Registered: Sep 2003
Posts: 93

Original Poster
Rep: Reputation: 0
Ok.. One more confusion..

I have edited /etc/sysctl.conf to have the following line

Quote:
kernel.core_pattern = /tmp/core.%e.%p
When I execute sysctl -p it changes for the user.. But after reboot for a user if I do
Quote:
$cat /proc/sys/kernel/core_pattern
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %e
It reverts back.. Although the above line is still in /etc/sysctl.conf..

How do I make this stick for all users.. Don't want to do sysctl -p everytime
 
Old 04-05-2013, 08:28 AM   #7
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
khandu,

How did you edit the file? Using sysctl -w command or by opening the sysctl.conf file using any editor?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I dump an abstract syntax tree generated by gcc into a .dot file? asdrubalivan Programming 1 04-03-2013 08:50 PM
Creating a core dump from raw ram dump? cyent Programming 2 08-15-2010 05:57 PM
File generated autimatically in RHEL 3.0 ! shipon_97 Linux - Newbie 1 08-02-2010 09:27 AM
Core dump issues. Program crashes but does not generate core dump file sabeel_ansari Programming 1 10-07-2009 04:23 PM
Core dump in Ubuntu 8.04 (Empty core file) vineet7kumar Linux - Newbie 1 01-17-2009 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration