Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Core dump -- when does it happen?

0 views
Skip to first unread message

Carlos Moreno

unread,
Mar 16, 2003, 11:16:53 PM3/16/03
to

Hi,

My question is not as trivial as the subject may
sound.

The problem I'm having is that an application is
mysteriously stopping to work, on a daily basis;
it is a sockets-based server (written in C++, and
running on a RedHat 7.3 box).

I'm trying to figure out when and why the problem
happens, but the thing is that the application
"disappears", and I don't see a core file, or any
evidence of the cause of the application stopping.

My understanding is that whenever the application
crashes, then the OS dumps an image of the memory
to the file core.

It's not normal termination, since I have a cout
statement at the end of main, logging the fact
that the server is shutting down.

It's not an exception (the application is written
in C++), since the entire body of the main function
is enclosed in a:

try
{
}
catch (const exception & e)
{
cerr << "Exception: " << e.what() << endl;
}
catch (...)
{
cerr << "Unknown exception" << endl;
}

I don't have a single call to exit() or abort(),
nor do I have any destructor that throws (in fact,
I don't even think I have a single destructor!
everything is based on STL containers and
std::strings).

It would seem like someone is executing a kill -9
on the process, but I am discarding such possibility
(we really don't believe our box has been hacked,
and besides, an intruder would have much better
things to do than to kill -9 our application).

Can someone shed some light on this? What other
ways can a program terminate? Are there any
special conditions required for the system to dump
a memory image to the file "core" for post-mortem
analysis?

Thanks for any ideas!

Carlos
--

Erik Max Francis

unread,
Mar 16, 2003, 11:34:46 PM3/16/03
to
Carlos Moreno wrote:

> My question is not as trivial as the subject may
> sound.
>
> The problem I'm having is that an application is
> mysteriously stopping to work, on a daily basis;
> it is a sockets-based server (written in C++, and
> running on a RedHat 7.3 box).

Check limit/ulimit. You might have things configured to suppress the
creation of core files.

--
Erik Max Francis / m...@alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ That which is resisted persists.
\__/ Camden Benares
7 Sisters Productions / http://www.7sisters.com/
Web design for the future.

Kasper Dupont

unread,
Mar 17, 2003, 4:15:19 AM3/17/03
to
Carlos Moreno wrote:
>
> My understanding is that whenever the application
> crashes, then the OS dumps an image of the memory
> to the file core.

http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#core

--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaa...@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);

Carlos Moreno

unread,
Mar 17, 2003, 9:46:10 AM3/17/03
to
Erik Max Francis wrote:
> Carlos Moreno wrote:
>
>
>>My question is not as trivial as the subject may
>>sound.
>>
>>The problem I'm having is that an application is
>>mysteriously stopping to work, on a daily basis;
>>it is a sockets-based server (written in C++, and
>>running on a RedHat 7.3 box).
>
>
> Check limit/ulimit. You might have things configured to suppress the
> creation of core files.
>

Hmmm, curious. Is that something that could happen
without my being aware? I don't call setrlimit from
my application, nor do I run the application through
a wrapper that may use some shell version of these.

Where could I find out more about this possibility?
the command "apropos core" shows nothing relevant,
and "man 3 ulimit" points me to setrlimit/getrlimit

Thanks!

Carlos
--

Erik Max Francis

unread,
Mar 17, 2003, 7:05:40 PM3/17/03
to
Carlos Moreno wrote:

> Hmmm, curious. Is that something that could happen
> without my being aware? I don't call setrlimit from
> my application, nor do I run the application through
> a wrapper that may use some shell version of these.

Your shell/environment could be configured to, say, only allow small
core files, for which most would fail to be created since they'd be too
big.

> Where could I find out more about this possibility?
> the command "apropos core" shows nothing relevant,
> and "man 3 ulimit" points me to setrlimit/getrlimit

Check the man page for your shell.

--
Erik Max Francis / m...@alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE

/ \ It is human nature to think wisely and act foolishly.
\__/ Anatole France
Church / http://www.alcyone.com/pyos/church/
A lambda calculus explorer in Python.

Kasper Dupont

unread,
Mar 18, 2003, 5:01:09 AM3/18/03
to
Carlos Moreno wrote:
>
> Hmmm, curious. Is that something that could happen
> without my being aware?

RH7.3 by default set the limit to 0 bytes.

0 new messages