how to generate a core dump

Magnus Therning magnus at therning.org
Wed Sep 14 15:46:40 UTC 2005


On Wed, Sep 14, 2005 at 05:18:56PM +0200, Ernst Taumberger wrote:
>Hello
>
>I am trying to get a core dump from a program, for example by sending it
>SIGABRT, whose default action is to dump core and terminate the process.
>
>... but I don't get any core files
>
>for instance, the script 
>
>------------------------
>#!/bin/bash
>
>kill -11 $$
>-------------------------
>
>should produce a core file, only it doesn't
>
>sysinfo: Linux notabene 2.6.10-5-386 #1 Thu Aug 18 22:23:56 UTC 2005 i686 GNU/Linux
>         Ubuntu 5.04 (Hoary Hedgehog)
>
>and before you ask: ulimit is properly set (unlimited)
>                    cat /proc/sys/kernel/core_uses_pid ..... 1
>                    cat /proc/sys/kernel/core_pattern  ..... core
>
>There must be a system-wide setting someplace that inhibits the
>generation of core dumps (which are not a desirable thing for
>non-programmers).

Hmmm, on my system:

 $ ulimit
 unlimited
 $ ulimit -a
 -t: cpu time (seconds)         unlimited
 -f: file size (blocks)         unlimited
 -d: data seg size (kbytes)     unlimited
 -s: stack size (kbytes)        8192
 -c: core file size (blocks)    0
 -m: resident set size (kbytes) unlimited
 -u: processes                  512
 -n: file descriptors           1024
 -l: locked-in-memory size (kb) unlimited
 -v: address space (kb)         unlimited
 -N 10: file locks              unlimited

So a 'ulimit' of "unlimited" doesn't mean that core file size isn't
limited.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

I have a mouse, but don't have a mouse driver for MINIX and have never
felt the need to write one. Typing "rm x y z" is a lot faster than
clicking five times and then having to convince the system that you
really, truly, mean it and this is not a mistake and that you are
consenting adult over 18 and that you completely understand the
consequences and you still want to do it.
     -- Andrew S. Tanenbaum, in his personal FAQ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050914/e3550ce9/attachment.sig>


More information about the ubuntu-users mailing list