[SWLUG] how hard can it be... to get a core dump

Mark Summerfield mark at qtrac.eu
Thu Sep 25 13:12:37 UTC 2008


On 2008-09-25, Philip Downer wrote:
> Mark Summerfield wrote:
> > I think the Ubuntu people have changed the kernel to control core dumps
> > and this is something I can't seem to get around.
>
> ah actually this seems more likely :
>
> "If it's a core dump of a program that you wrote yourself, normally the
> file is called "core" and is in the working directory from which you ran
> it. A segmentation fault is usually a memory-handling error (like an
> invalid or NULL pointer, for example).
>
> It appears that resource limits (which include the maximum size of a
> core dump file) are set by PAM on login. The settings for these limits
> are in /etc/security/limits.conf, which on my system (which is
> unmodified) is comments only. A quick look at the source code suggests
> that the default core dump limit is 0 (zero), which means no dump at all
> is created (even though the message suggests otherwise).
>
> In summary: edit /etc/security/limits.conf, set the core limit to be
> non-zero (measured in kilobytes), and log in again."
>
> -- taken from https://answers.launchpad.net/ubuntu/+question/10616

I'd found that myself and tried it. I tried a limit of 600000 and with
"unlimited", in both cases ulimit -c reported what was there, but in
neither case did I get a core dump.

[Aside: If I had a choice I'd just use Fedora, but unfortunately it
doesn't work on my Toshiba laptop (I've tried Fedora 6, 7, 8, and 9).
OTOH Running under Fedora doesn't produce the bug so I acutally need to
run Kubuntu to find it. The programs I've got the problem with aren't
mine but the author can't reproduce the bug although at least one other
person using Ubuntu can---and he can't get a core dump either.]


-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Programming in Python 3" - ISBN 0137129297




More information about the Swlug mailing list