Find the answer to your Linux question:
Results 1 to 6 of 6
Hi All, I have several user-developed processes written in C++ which run as Linux daemons and communicate with each other using IPC. At some point after starting the daemons, one ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    43

    Question debugging a segfault in libc-2.10.1.so ?

    Hi All,

    I have several user-developed processes written in C++ which run as Linux daemons and communicate with each other using IPC.

    At some point after starting the daemons, one of the them causes the following segfault:

    kernel: [1040186.227966] my_app[16338]: segfault at 2f7265bc ip 003ef3d7 sp bfa10070 error 4 in libc-2.10.1.so[394000+13e000]

    I am not sure if this is a very general message which does not carry any information to resolve it.

    My questions are:
    1. How should I read the error message above generated by the kernel ? What do the fields contained in the message mean? Do they carry any valuable information to resolve the segfault error?

    2. What steps do you suggest to successfully isolate the problem and resolve it ? (in terms of debugging tools or anything else)

    The system, where the daemons are deployed, has recently undergone an OS upgrade (upgrade to Ubuntu 9.10). (May it be the reason for the segfault ?)

    Thanks.

  2. #2
    Just Joined!
    Join Date
    Jan 2005
    Posts
    17
    Which Diastro of Linux are you running /Developing them from?

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    43
    Quote Originally Posted by ngwasuma View Post
    Which Diastro of Linux are you running /Developing them from?
    Ubuntu 9.10

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Assuming you also updated your development tools, then I would suggest that you recompile and relink your application code. My best guess is that there is an incompatibility between the version of libc that you compiled/linked with originally, and that provided by the new libc provided by 9.10.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Nov 2009
    Posts
    43
    Quote Originally Posted by Rubberman View Post
    Assuming you also updated your development tools, then I would suggest that you recompile and relink your application code. My best guess is that there is an incompatibility between the version of libc that you compiled/linked with originally, and that provided by the new libc provided by 9.10.
    I already got this segfault error after I recompiled and relinked my application daemons. Hence this might be more than a recompilation/relink problem.

    Don't you think that this segfault may be stemming from my own application code itself instead of libc due to a memory leak, undefined behaviour, etc ?

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by aryan_ View Post
    I already got this segfault error after I recompiled and relinked my application daemons. Hence this might be more than a recompilation/relink problem.

    Don't you think that this segfault may be stemming from my own application code itself instead of libc due to a memory leak, undefined behaviour, etc ?
    It could be due to a bug in your code. Build it with the -g (debugable) option so you can do a post-mortem analysis of the crash.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...