abort (core dumped)

Posted on 2004-08-31
Medium Priority
Last Modified: 2010-04-17

So I have a c++ program that I'm running on Redhat 8  
I would run it for about 15 to 20 minutes, and suddenly I would get this weird pthread error and crash
Then I tried running it on Redhat 9, and the pthread error disappeared but it would still crash after the same amount of time
I also added -pthread when I compiled (i.e. g++ -o -w -pthread ) and so I don't get the pthread error anymore when running on Redhat 8 but it still crashes after the same amount of time

I have absolutely no idea what this could be
Is it a pthread issue afterall?
Or something to do with my code?
I'm also using vtk and fltk with it

Is there any way of getting any clues?  Is there something along with the core file that it dumps that I can get clues with as to why it crashed???
Thank you very much!

Question by:lost_bits1110
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
LVL 22

Expert Comment

ID: 11947866
Not knowing what it's doing makes it kind of difficult to comment.

Perhaps if you were to put in a log file to track execution you could close in on where it's failing, then back-track to the ultimate cause.

Author Comment

ID: 11948122
Hi, thanks for ur input,
but what kind of logfile would I put (..and how..??)

It doesnt really matter what I do or even if the program is doing nothing for 20 minutes.. it just ALWAYS crashes after just aobut 20 minutes

and i really have no clue
it must be one of the libraries or some compatibility issue or maybe even the pthread thing

I just dont know
and I wish I'd get an error message at least to help

So what kind of log file/ (log software?) would u expect I use for this kind of probelm..?
LVL 22

Expert Comment

ID: 11948292
You create your own logfile.

Make a subroutine called, say, LogIt(char * msg)

Whenever it's called, open a text file for append, write the current date/time and msg to that file, then close it
(The open/write/close prevents the loss of any buffered data at crash time.

Call LogIt at various places throughout the program.  When the program creashes, look at the log file to see where and what the program had been doing.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 23

Expert Comment

ID: 11948829
Why don't you debug it?  Compile with -g switch, run it under gdb, and it will break
into the debugger at the point of failure.


Author Comment

ID: 11963669

Okay so I ran my program using gdb and had top -d1 opened at the same time as well

It appears that the 'SIZE' , 'RSS', and "%MEMORY" values just keep increasing as the program continues to run, which means I havne't deallocated something..? Or maybe it keeps creating new threads or something as its running, I'm not sure what exactly
For example

  PID    USER     PRI  NI  SIZE    RSS      SHARE      STAT   %CPU        %MEM   TIME    
 25055    me         18     0    369M   302M      11108      R            99.9            19.9         1:53        
then some time later...
 25055    me         17     0    736M   652M      11036      R            99.9             43.1        6:38
some more time later...
 25055    me         20     0   1320M   908M      10720      R            99.9             60.1       14:10

Then eventually it crashes and I get:
Program received signal SIGABRT, Aborted.
[Switching to Thread 16384 (LWP 25055)]
0x42028851 in kill () from /lib/i686/libc.so.6

Does this mean anything to anyone..?
LVL 22

Accepted Solution

cookre earned 400 total points
ID: 11964020
I assume from your consternation that your code doesn't do any explicit memory allocations orforks.

Could you be opening lots of files without closing them?
Dynamic array expansions?
Re-creating an object without disposing of previous, uneeded instances?
LVL 23

Expert Comment

ID: 11964397
Consider using a debugging malloc library to help you identify your memory leak:


Author Comment

ID: 12018910
ok it turns out that i was continuously allocating something by mistake
thanks for all ur help!

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Make the most of your online learning experience.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Six Sigma Control Plans

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question