[Gllug] [OT] Linux question - core dumps

Simon A. Boggis simon at dcs.qmul.ac.uk
Mon Feb 17 01:20:28 UTC 2003


On Sat, 2003-02-15 at 23:48, rich at annexia.org wrote:
> 
> Sorry to post an off-topic question to this political discussion group ...
> 
> I have a server which is running as 'nobody' (actually it starts running
> as root and setuid/setgids to this user). It is running in a directory
> called /tmp/cores/ which is 0755, chowned to nobody.nogroup. I've also
> called 'ulimit -c unlimited'. Despite this, the server refuses to dump
> core if it crashes. This is really annoying because it makes it very
> hard to debug the server (it crashes about once every 5 days).
> 
> Any ideas how to force it to dump core???
> 
> Rich.

This is a question which has vexed me in the past too - I've never found
the answer (i.e. what the rules are supposed to be), although it may be
that I didn't look hard enough. I think the other respondent who says
that it is kernel restricted is right, or at least that's what I've
heard from somewhere.

I've done a few experiments (using the attached crappy test program).

1) running it as root with argument 0 (i.e. don't change uid/gid) it
dumps core
2) running it as a normal user with argument of user's uid it dumps core
3) running it as root with another user's uid it doesn't dump core.

Simon

-- 
----------------------------------------------------------------------
Dr Simon A. Boggis                                  Systems Programmer
Department of Computer Science,                     Tel. 020 7882 7522
Queen Mary, University of London, London E1 4NS UK. 
---- GPG public key <http://www.dcs.qmul.ac.uk/~simon/#publickey> ----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcoredump.c
Type: text/x-c
Size: 2287 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030217/07c9a667/attachment.bin>


More information about the GLLUG mailing list