abort (core dumped)

Posted on 2004-08-31
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
  • 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.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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/

Does this mean anything to anyone..?
LVL 22

Accepted Solution

cookre earned 100 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 105
Beginner to Unreal Engine 4 5 94
What is wrong with the below insert statement. Getting error when executing. 5 45
backup program with robocopy 6 42
This is an explanation of a simple data model to help parse a JSON feed
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

791 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