Hi all.
I ran "ulimit -c unlimited" as root on my machine (centos 5.3 x86_64) when I run the process it is getting SIGSEGV but not creating a core dump? What else do I need to do to get a core dump file
when I run "gdb myprocess" the SIGSEGV does not happen.
Jerry
Hi,
On Wed, Sep 16, 2009 at 13:25, Jerry Geis geisj@pagestation.com wrote:
I ran "ulimit -c unlimited" as root on my machine (centos 5.3 x86_64) when I run the process it is getting SIGSEGV but not creating a core dump? What else do I need to do to get a core dump file
You need to run "ulimit -c unlimited" with the user and at the session where you start the process. "ulimit" settings are inherited by processes started by that session, it's not like a system setting or something like that.
You must also make sure that the user that is running the process has write permissions to the current directory of the process, otherwise it won't be able to write the corefile.
If you give more information on which process is crashing and how it is started (/etc/init.d script?) we could help you more on where to put the "ulimit" settings for that process.
HTH, Filipe
You need to run "ulimit -c unlimited" with the user and at the session where you start the process. "ulimit" settings are inherited by processes started by that session, it's not like a system setting or something like that.
You must also make sure that the user that is running the process has write permissions to the current directory of the process, otherwise it won't be able to write the corefile.
If you give more information on which process is crashing and how it is started (/etc/init.d script?) we could help you more on where to put the "ulimit" settings for that process.
Filipe
the process is not a centos process. It is my program. I am logged in as root and I am running the process as root and I did run the "ulimit -c unlimited" as root.
I dont see the core file in the current directory, in /tmp or anyplace else? Very strange.
Jerry
I need to not handle SIGSEGV in my program - then it generates a core file.
Thanks,
Jerry
# ulimit -c unlimited # myprog arg1 arg2 arg3
Is it possible that your program is overriding rlimit definitions? Does "strings myprog | grep rlimit" return anything?
On Wed, Sep 16, 2009 at 13:52, Jerry Geis <geisj at pagestation.com http://lists.centos.org/mailman/listinfo/centos> wrote:
/ I need to not handle SIGSEGV in my program - then it generates
/>/ a core file. / Does this mean you fixed your problem by removing a sighandler for SIGSEGV? It's not clear to me if your problem is fixed or not...
Filipe,
yes - I removed catching the signal SIGSEGV from my program. This then generated the core file as expected. I debugged the issue using the command:
gdb myprog -c core.1275
the core.1275 is the generated core file
I never realized catching the SIGSEGV would not generate a core file. So I have already fixed the my issue.
Thanks for the help.
Jerry
Jerry Geis wrote:
the process is not a centos process. It is my program. I am logged in as root and I am running the process as root and I did run the "ulimit -c unlimited" as root.
I dont see the core file in the current directory, in /tmp or anyplace else? Very strange.
Try doing kill -6 <PID> on your program and see if that generates a core
nate
Hi,
On Wed, Sep 16, 2009 at 13:34, Jerry Geis geisj@pagestation.com wrote:
the process is not a centos process. It is my program. I am logged in as root and I am running the process as root and I did run the "ulimit -c unlimited" as root.
Are you running your program just after the "ulimit" line?
Like this:
# ulimit -c unlimited # myprog arg1 arg2 arg3
Is it possible that your program is overriding rlimit definitions? Does "strings myprog | grep rlimit" return anything?
On Wed, Sep 16, 2009 at 13:52, Jerry Geis geisj@pagestation.com wrote:
I need to not handle SIGSEGV in my program - then it generates a core file.
Does this mean you fixed your problem by removing a sighandler for SIGSEGV? It's not clear to me if your problem is fixed or not...
HTH, Filipe