Application giving core dump on AIX 5.3 ML5 CSP - Unix

This is a discussion on Application giving core dump on AIX 5.3 ML5 CSP - Unix ; Hi Guys, I have compiled my application on AIX 5300-05-05 and it is running fine on the same environment. Now I am running the same application on the AIX 5300-05-CSP and it is giving core. Here surprisingly core is getting ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Application giving core dump on AIX 5.3 ML5 CSP

  1. Application giving core dump on AIX 5.3 ML5 CSP

    Hi Guys,

    I have compiled my application on AIX 5300-05-05 and it is running
    fine on the same environment. Now I am running the same application on
    the AIX 5300-05-CSP and it is giving core. Here surprisingly core is
    getting genrated after the successful execution of my application
    completely.

    Below is the core analysis:

    Segmentation fault in . at 0x67613030 ($t1)

    0x67613030 (???) warning: Unable to access address 0x67613030 from
    core

    (dbx) where

    ..() at 0x67613030

    cuexit.exit(??) at 0xd0322408

    (dbx) whereis exit

    cuexit.exit [/usr/lib/threads/libc.a]

    cuexit.exit [/usr/lib/librtl.a]


    I am not able to decide I am getting this problem because of service
    pack mismatch or something else.
    I read about the fixes done in CSP but not any clue.

    Please help me.....
    Let me know if I have missed something in explanation.


    Thanks

  2. Re: Application giving core dump on AIX 5.3 ML5 CSP

    monty wrote:
    > Hi Guys,
    >
    > I have compiled my application on AIX 5300-05-05 and it is running
    > fine on the same environment. Now I am running the same application on
    > the AIX 5300-05-CSP and it is giving core. Here surprisingly core is
    > getting genrated after the successful execution of my application
    > completely.
    >
    > Below is the core analysis:
    >
    > Segmentation fault in . at 0x67613030 ($t1)
    > [...]


    No solid information, but something to investigate: The
    offending address, interpreted as ASCII characters, would be
    "ga00" (or perhaps "00ag"). Does either of those seem familiar,
    perhaps as part of a longer string? It may be that you're
    using the first four characters of a string in a context where
    you should actually be using a pointer to them.

    --
    Eric Sosman
    esosman@ieee-dot-org.invalid

  3. Re: Application giving core dump on AIX 5.3 ML5 CSP

    monty writes:

    > I have compiled my application on AIX 5300-05-05 and it is running
    > fine on the same environment. Now I am running the same application on
    > the AIX 5300-05-CSP and it is giving core. Here surprisingly core is
    > getting genrated after the successful execution of my application
    > completely.


    Nothing really surprizing: you have a bug in your application
    (most likely writing beyond the end of some malloc()ed block),
    and that bug shows up as a crash on one revision of the OS, while
    it remains dormant and doesn't cause a crash on another revision.

    This happens all the time.

    > Segmentation fault in . at 0x67613030 ($t1)


    You've corrupted some memory block by writing "ga00" past the end
    of it.

    > I am not able to decide I am getting this problem because of service
    > pack mismatch or something else.


    Something else: bug in your application.

    To find that bug, use debug malloc facilities provided by AIX
    malloc implementation:
    http://publib.boulder.ibm.com/infoce...bug_malloc.htm
    or use commercial tools designed for the same purpose,
    such as Insure++ (www.parasoft.com) or Purify
    (www.ibm.com/software/awdtools/purify).

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  4. Re: Application giving core dump on AIX 5.3 ML5 CSP

    On 6 Feb, 00:32, Paul Pluzhnikov wrote:
    > monty writes:
    > > I have compiled my application on AIX 5300-05-05 and it is running
    > > fine on the same environment. Now I am running the same application on
    > > the AIX 5300-05-CSP and it is giving core. Here surprisingly core is
    > > getting genrated after the successful execution of my application
    > > completely.

    >
    > Nothing really surprizing: you have a bug in your application
    > (most likely writing beyond the end of some malloc()ed block),
    > and that bug shows up as a crash on one revision of the OS, while
    > it remains dormant and doesn't cause a crash on another revision.
    >
    > This happens all the time.
    >
    > > Segmentation fault in . at 0x67613030 ($t1)

    >
    > You've corrupted some memory block by writing "ga00" past the end
    > of it.
    >
    > > I am not able to decide I am getting this problem because of service
    > > pack mismatch or something else.

    >
    > Something else: bug in your application.
    >
    > To find that bug, use debug malloc facilities provided by AIX
    > malloc implementation:
    > *http://publib.boulder.ibm.com/infoce...ndex.jsp?topic....
    > or use commercial tools designed for the same purpose,
    > such as Insure++ (www.parasoft.com) or Purify
    > (www.ibm.com/software/awdtools/purify).
    >
    > Cheers,
    > --
    > In order to understand recursion you must first understand recursion.
    > Remove /-nsp/ for email.


    I dont have any of the tool mentioned. Is there any other way to
    resolve the problem.
    Just for the information, this application has went through fine on
    other plateforms like solaris, windows with the same code base.
    Also I have tested it on different AIX versions but it has never given
    any problem.




  5. Re: Application giving core dump on AIX 5.3 ML5 CSP

    monty writes:

    >> To find that bug, use debug malloc facilities provided by AIX
    >> malloc implementation:
    >> *http://publib.boulder.ibm.com/infoce...ndex.jsp?topic...


    > I dont have any of the tool mentioned.


    Yes, you do. It is *built in* into the malloc in your libc.

    >> or use commercial tools designed for the same purpose,


    You should also consider paying for a tool -- they are well worth
    it in time saved (on bugs like this).

    > Is there any other way to resolve the problem.


    Sure: just write your own equivalent of Insure or Purify (it will
    only cost you 5+ (mythical) man-years of development, or a couple
    million dollars).

    > Just for the information, this application has went through fine on
    > other plateforms like solaris, windows with the same code base.


    That means *nothing* -- the bug could be in AIX-specific code.
    If it isn't, and if the app runs on Linux, you may be able to catch
    the bug using excellent and free Valgrind (www.valgrind.org).

    On Solaris, use libumem, or any other of the bazillion of debug
    malloc implementations.

    > Also I have tested it on different AIX versions but it has never given
    > any problem.


    It is not unheard of for the crash may only happen on a particular
    machine (just because all the stars aligned on it).

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  6. Re: Application giving core dump on AIX 5.3 ML5 CSP

    On Feb 6, 9:40*pm, Paul Pluzhnikov wrote:
    > monty writes:
    > >> To find that bug, use debug malloc facilities provided by AIX
    > >> malloc implementation:
    > >> *http://publib.boulder.ibm.com/infoce...ndex.jsp?topic...

    > > I dont have any of the tool mentioned.

    >
    > Yes, you do. It is *built in* into the malloc in your libc.
    >
    > >> or use commercial tools designed for the same purpose,

    >
    > You should also consider paying for a tool -- they are well worth
    > it in time saved (on bugs like this).
    >
    > > Is there any other way to resolve the problem.

    >
    > Sure: just write your own equivalent of Insure or Purify (it will
    > only cost you 5+ (mythical) man-years of development, or a couple
    > million dollars).
    >
    > > Just for the information, this application has went through fine on
    > > other plateforms like solaris, windows with the same code base.

    >
    > That means *nothing* -- the bug could be in AIX-specific code.
    > If it isn't, and if the app runs on Linux, you may be able to catch
    > the bug using excellent and free Valgrind (www.valgrind.org).
    >
    > On Solaris, use libumem, or any other of the bazillion of debug
    > malloc implementations.
    >
    > > Also I have tested it on different AIX versions but it has never given
    > > any problem.

    >
    > It is not unheard of for the crash may only happen on a particular
    > machine (just because all the stars aligned on it).
    >
    > Cheers,
    > --
    > In order to understand recursion you must first understand recursion.
    > Remove /-nsp/ for email.


    Thanks for the advise......

    Some how I have identified that close function, which is being called
    at the end of application to close one of opened file, is throwing
    core.


  7. Re: Application giving core dump on AIX 5.3 ML5 CSP

    monty writes:

    > Some how I have identified that close function, which is being called
    > at the end of application to close one of opened file, is throwing
    > core.


    No, it isn't.

    Somehow I believe you are programming by coincidence:
    http://www.pragprog.com/the-pragmati...ts/coincidence

    Your problem is elsewhere, and if you don't find it now (when it
    reliably reproduces) it will blow up in your face later, probably
    at the most inopportune moment.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

+ Reply to Thread