Find the answer to your Linux question:
Results 1 to 4 of 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    its
    its is offline
    Just Joined!
    Join Date
    Oct 2010
    Posts
    9

    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

    [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??

  2. #2
    Just Joined!
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    sysctl -p should show you if its explicitly set be dumped somewhere. Look for kernel.core_pattern. If it is not set refer to this link, and should get you started. Let me know if syntax does not work, and I'll try it on a rhel 6.4 box myself.
    Linux system administrator and Oracle DBA guide: How to enable core dump for application users under RHEL5

  3. #3
    its
    its is offline
    Just Joined!
    Join Date
    Oct 2010
    Posts
    9
    Quote Originally Posted by Pimpntel View Post
    sysctl -p should show you if its explicitly set be dumped somewhere. Look for kernel.core_pattern. If it is not set refer to this link, and should get you started. Let me know if syntax does not work, and I'll try it on a rhel 6.4 box myself.
    kernel.core_pattern was not in the sysctl -p.. I am trying out the page you have given.. still stumped why it is not generating a dump

  4. #4
    Just Joined!
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Hey,

    I was able to do this, but I had the same challenge you did when I first tried.
    make sure ulimit -c unlimited is set for the user creating the core dump
    sysctl should have
    fs.suid_dumpable = 1
    kernel.core_pattern = /tmp/core
    kernel.core_uses_pid = 1
    After you added to /etc/sysctl.conf do sysctl -w and sysctl -p to see
    In my example I did sleep 1000 &
    pidof sleep
    kill -3 $(pidof sleep)
    Is selinux running?

    Try getenforce as a command to see if selinux is running or cat /etc/sysconfig/seliux for boot time config. It may be involved in the mix if you have tried everything I pasted above already.

    If you are using CentOS edit in repos.d CentOS-Debuginfo.repo from 0 to 1 to enable it
    Run debuginfo-install coreutils-8.4-19.el6.x86_64
    Execute gdb /bin/sleep "core file" to debug

    Can you try with this example I provided to ensure you can do a core dump with a program other than the vendor one. Maybe in the init scripts for that other program they unset ulimit or somthing?
    Last edited by Pimpntel; 04-04-2013 at 03:07 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •