LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kill -3 didn't generate core file on centos5 (https://www.linuxquestions.org/questions/linux-newbie-8/kill-3-didnt-generate-core-file-on-centos5-4175466768/)

lwang3rock 06-20-2013 01:09 PM

kill -3 didn't generate core file on centos5
 
Hi,
I tried "kill -3 <pid>", but no core file was generated.
I tried "kill -6 <pid>" or "kill -11 <pid>", these two all generated core files, but the process were killed. So I think my other setting should be fine, including ulimit, core_pattern...
I don't know why "kill -3 <pid>" didn't generate core file. I need this because I need the core file. After I invoke "kill -3 <pid>", the process was still running when I checked using "ps -ef"
Code:

[ipbx@lab33 ~]$ ~/testS&
[1] 442416
[ipbx@lab33 ~]$ kill -s SIGQUIT 442416
[ipbx@lab33 ~]$ la ~/tmp
total 91032
drwxrwxr-x  2 ipbx ipbx    4096 Jun 20 10:00 .
drwxr-xr-x. 43 ipbx ipbx    4096 Jun 20 09:47 ..
-rw-------  1 ipbx ipbx  700416 Jun 20 10:00 core-bash-11-1001-1001-440636-1371747625
-rw-------  1 ipbx ipbx 62664704 Jun 20 06:35 core-java-6-1001-1001-431229-1371735344
-rw-------  1 ipbx ipbx 59412480 Jun 20 09:39 core-java-6-1001-1001-439925-1371746351
-rw-------  1 ipbx ipbx  319488 Jun 20 09:59 core-sleep-3-1001-1001-442350-1371747560

note that core file was not generated with that pid 442416
Code:

[ipbx@lab33 ~]$ uname -a
Linux lab33 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Thanks,
3rock

jpollard 06-20-2013 03:33 PM

Check your ulimits - (ulimit -cH) to see what your limits are. Likely it is set to 0.

goobered - you can get core dumps. signal 3 is SIGQUIT, so it exits without dumping.

signal 6 is SIGABRT, which calls for a core dump.

If the process catches signals, then it can choose to ignore some, or do specific things for that signal. this holds true for all signals except SIGKILL (9).


All times are GMT -5. The time now is 08:19 PM.