Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7973413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:05:45+00:00 2026-06-04T08:05:45+00:00

We get core files from running our software on a Customer’s box. Unfortunately because

  • 0

We get core files from running our software on a Customer’s box. Unfortunately because we’ve always compiled with -O2 without debugging symbols this has lead to situations where we could not figure out why it was crashing, we’ve modified the builds so now they generate -g and -O2 together. We then advice the Customer to run a -g binary so it becomes easier to debug.

I have a few questions:

  1. What happens when a core file is generated from a Linux distro other than the one we are running in Dev? Is the stack trace even meaningful?
  2. Are there any good books for debugging on Linux, or Solaris? Something example oriented would be great. I am looking for real-life examples of figuring out why a routine crashed and how the author arrived at a solution. Something more on the intermediate to advanced level would be good, as I have been doing this for a while now. Some assembly would be good as well.

Here’s an example of a crash that requires us to tell the Customer to get a -g ver. of the binary:

Program terminated with signal 11, Segmentation fault.
#0  0xffffe410 in __kernel_vsyscall ()
(gdb) where
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x00454ff1 in select () from /lib/libc.so.6
...
<omitted frames>

Ideally I’d like to solve find out why exactly the app crashed – I suspect it’s memory corruption but I am not 100% sure.

Remote debugging is strictly not allowed.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:05:47+00:00Added an answer on June 4, 2026 at 8:05 am

    What happens when a core file is generated from a Linux distro other than the one we are running in Dev? Is the stack trace even meaningful?

    It the executable is dynamically linked, as yours is, the stack GDB produces will (most likely) not be meaningful.

    The reason: GDB knows that your executable crashed by calling something in libc.so.6 at address 0x00454ff1, but it doesn’t know what code was at that address. So it looks into your copy of libc.so.6 and discovers that this is in select, so it prints that.

    But the chances that 0x00454ff1 is also in select in your customers copy of libc.so.6 are quite small. Most likely the customer had some other procedure at that address, perhaps abort.

    You can use disas select, and observe that 0x00454ff1 is either in the middle of instruction, or that the previous instruction is not a CALL. If either of these holds, your stack trace is meaningless.

    You can however help yourself: you just need to get a copy of all libraries that are listed in (gdb) info shared from the customer system. Have the customer tar them up with e.g.

    cd /
    tar cvzf to-you.tar.gz lib/libc.so.6 lib/ld-linux.so.2 ...
    

    Then, on your system:

    mkdir /tmp/from-customer
    tar xzf to-you.tar.gz -C /tmp/from-customer
    gdb /path/to/binary
    (gdb) set solib-absolute-prefix /tmp/from-customer
    (gdb) core core  # Note: very important to set solib-... before loading core
    (gdb) where      # Get meaningful stack trace!
    

    We then advice the Customer to run a -g binary so it becomes easier to debug.

    A much better approach is:

    • build with -g -O2 -o myexe.dbg
    • strip -g myexe.dbg -o myexe
    • distribute myexe to customers
    • when a customer gets a core, use myexe.dbg to debug it

    You’ll have full symbolic info (file/line, local variables), without having to ship a special binary to the customer, and without revealing too many details about your sources.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a helper class designed to get data from Core Data and pass
this is my core data model: I'm trying to get all LanguageEntries from a
I got a core that looks very different from the ones I usually get
How to get the Direction from Compass Calibration, i used core location framework and
We're moving from a combination of CC/CC.NET to TeamCity. The core of our product
i installed faac from here http://sourceforge.net/projects/faac/files/faac-src/faac-1.28/faac-1.28.tar.gz/ and then m running this command which is
Hi I am trying to get my core data app syncing to iCloud so
Please help me. I can't figure out why I get a core dumped when
I'm new to core data and try to get all children objects of various
I am having a problem trying to get a project with Core Data to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.