DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: core dump

  1. #1
    Join Date
    May 2004
    Posts
    242

    core dump

    Hello,

    I have a process which core dumps in Production but on Development and UAT no failures at all.

    The machine is Sun Solaris.

    Does anyone know if there are any flags I can check to ensure they are not disabled in Development so that I can try and re-produce the core dump ?

    Many thanks,

    Imanuel.

  2. #2
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    Are you using the same executable? Are you building the executable on the target box or are you copying the executable from one box to the other? Same questions for the *.a files that your exe uses. Also you sure you have the same input to the processes on dev/uat and live?
    All these are influencing the answers. If the patch-levels of your DLLs / the version of the OS, the architecture of your respective boxes are different or a whole host of other things than this can happen.
    All I can suggest is use gdb and examine the core file. Examine the stack and probably that gives you a hint where you have a problem...
    DKyb
    -------------------------------
    Life is a short warm moment -
    Death is the long cold rest.
    Pink Floyd
    -------------------------------

  3. #3
    Join Date
    May 2004
    Posts
    242
    Hi,

    Thanks for that.

    Yes, it's the same executable FTPed from Production to Development, same input files, same database copy, same Oracle version and same libraries in my LD_LIBRARY_PATH.

    I looked at the code and found that the program didn't have a destructor. Despite there was nothing to delete or do in it, I created an empty one, e.g. A::~A() { }

    I put the new compiled executable in Production and re-run it and it didn't crash. How can I be sure that I was just not lucky ? I am saying this because the original program also 3 out of 10 runs didn't crash.

    Thus, I'm not sure whether I was just lucky in the new 10 re-runs of the new compiled version with the empty destructor, or whether I actually fixed the bug.

    I should say that the original program that crashed actually did everything it needed to do and crashed just right at the end. Does this tell me it's destructor related and in fact I did then fixed the bug ?

    Thanks,

    Imanuel.

  4. #4
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    If you don't define a destructor then one is created for you much like the empty destructor that you defined. That is not the real problem. You've been probably lucky as the compiler just reordered the instructions slightly or something like that. Your best bet really is to examine the stack-trace with gdb. Most likely you program produces a gpf and that can have a number of reasons: undeflow, overflow, access of protected memory,... If you add the uncertainty of different versions of DLL, different machines etc, then there is not much you can do but debug/emanine logs...
    DKyb
    -------------------------------
    Life is a short warm moment -
    Death is the long cold rest.
    Pink Floyd
    -------------------------------

  5. #5
    Join Date
    Dec 2003
    Posts
    3,366
    Moving problems or vanishing problems like this are almost always a memory problem, as stated. Get it back to the state where it crashes and try to chase it down; in this case you WANT it to crash so you can catch it in the act (still difficult, but the only way to catch it is for it to misbehave).

  6. #6
    Join Date
    Jan 2008
    Posts
    100
    I believe running it through a program called valgrind can help you eliminate these memory corruption bugs.

Similar Threads

  1. core dump
    By ami in forum C++
    Replies: 9
    Last Post: 06-03-2010, 07:01 AM
  2. core 2 duo multi-thread java
    By cohodetector in forum Java
    Replies: 3
    Last Post: 07-27-2008, 03:31 PM
  3. Replies: 0
    Last Post: 05-08-2007, 01:26 AM
  4. VC++ Debugger: Debugging Dump Files
    By deepblue035 in forum C++
    Replies: 0
    Last Post: 01-31-2007, 02:07 PM
  5. WebServices OR Core DotNet ??
    By Suresh R Iyer in forum Careers
    Replies: 8
    Last Post: 04-09-2002, 08:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center