* [Buildroot] No core dump when killed with ABRT, SEGV, etc.
@ 2013-03-26 16:25 Grant Edwards
2013-03-26 16:50 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Grant Edwards @ 2013-03-26 16:25 UTC (permalink / raw)
To: buildroot
I get a proper core dump if a program actually causes a segfault, but
I can't figure out how to force a coredump by killing a running
process.
On my desktop machines with glibc, this generates a core dump:
tty1:
$ ulimit -c 9999999
$ <start program>
tty2:
$ kill -ABRT <pid>
On my buildroot system, there's no core dump. The program is aborted
as expected, but it doesn't dump a core file. If the same program
tries to actually dereference a NULL pointer there is a core dump.
Why doesn't killing a process with SIGABRT or SIGSEGV cause a core
dump?
--
Grant Edwards grant.b.edwards Yow! I am covered with
at pure vegetable oil and I am
gmail.com writing a best seller!
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] No core dump when killed with ABRT, SEGV, etc.
2013-03-26 16:25 [Buildroot] No core dump when killed with ABRT, SEGV, etc Grant Edwards
@ 2013-03-26 16:50 ` Peter Korsgaard
2013-03-26 17:01 ` Grant Edwards
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2013-03-26 16:50 UTC (permalink / raw)
To: buildroot
>>>>> "Grant" == Grant Edwards <grant.b.edwards@gmail.com> writes:
Grant> I get a proper core dump if a program actually causes a segfault, but
Grant> I can't figure out how to force a coredump by killing a running
Grant> process.
Grant> On my desktop machines with glibc, this generates a core dump:
Grant> tty1:
Grant> $ ulimit -c 9999999
Grant> $ <start program>
Grant> tty2:
Grant> $ kill -ABRT <pid>
Grant> On my buildroot system, there's no core dump. The program is aborted
Grant> as expected, but it doesn't dump a core file. If the same program
Grant> tries to actually dereference a NULL pointer there is a core dump.
Grant> Why doesn't killing a process with SIGABRT or SIGSEGV cause a core
Grant> dump?
Are you using busybox init? If so, ensure you have
FEATURE_INIT_COREDUMPS enabled and a /.init_enable_core file in your
rootfs:
config FEATURE_INIT_COREDUMPS
bool "Support dumping core for child processes (debugging only)"
default y
depends on INIT
help
If this option is enabled and the file /.init_enable_core
exists, then init will call setrlimit() to allow unlimited
core file sizes. If this option is disabled, processes
will not generate any core files.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] No core dump when killed with ABRT, SEGV, etc.
2013-03-26 16:50 ` Peter Korsgaard
@ 2013-03-26 17:01 ` Grant Edwards
0 siblings, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2013-03-26 17:01 UTC (permalink / raw)
To: buildroot
On 2013-03-26, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Grant" == Grant Edwards <grant.b.edwards@gmail.com> writes:
>
> Grant> I get a proper core dump if a program actually causes a segfault, but
> Grant> I can't figure out how to force a coredump by killing a running
> Grant> process.
>
> Grant> On my desktop machines with glibc, this generates a core dump:
>
> Grant> tty1:
>
> Grant> $ ulimit -c 9999999
> Grant> $ <start program>
>
> Grant> tty2:
> Grant> $ kill -ABRT <pid>
>
> Grant> On my buildroot system, there's no core dump. The program is aborted
> Grant> as expected, but it doesn't dump a core file. If the same program
> Grant> tries to actually dereference a NULL pointer there is a core dump.
>
> Grant> Why doesn't killing a process with SIGABRT or SIGSEGV cause a core
> Grant> dump?
>
> Are you using busybox init? If so, ensure you have
> FEATURE_INIT_COREDUMPS enabled and a /.init_enable_core file in your
> rootfs:
I don't have that set, but I don't think it would matter.
I'm starting the program from the command line in a tty as show above
after running the ulimit command to enable core dumps. When I do
that, I get a core dump if the program itself causes a segfault, but
not if the program is killed with ABRT or SEGV signals.
The FEATURE_INIT_COREDUMPS just does the equivalent of the ulimit -c
command, right? Am I misunderstanding what FEATURE_INIT_COREDUMPS
does?
--
Grant Edwards grant.b.edwards Yow! ... bleakness
at ... desolation ... plastic
gmail.com forks ...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-26 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 16:25 [Buildroot] No core dump when killed with ABRT, SEGV, etc Grant Edwards
2013-03-26 16:50 ` Peter Korsgaard
2013-03-26 17:01 ` Grant Edwards
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox