My company sells linux-based devices with a number of executables. One of these applications is hanging every few days in the newest version of our product.
We are using glibc 2.19 and gcc 4.8.3 and Linux kernel version 3.16.38. We are building for x86_64.
Our glibc version is very old, and we supposedly patched it a year ago with the fix for: Bug #12926: getaddrinfo()/make_request() spins forever (https://sourceware.org/bugzilla/show_bug.cgi?id=12926)
The maintainer of our crosstool swears that the one we are using has a patched glibc. However, there are other failure possibilities, like our builds may be picking up a different glibc for some reason.
On our build machine, we save away unstripped versions of our application's executables and shared object binaries that we can later use when debugging core files.
I have generated a few core files by logging into a device with a hung application and sending the process a SIGILL.
The core files appear to show that we are experiencing a hang in getaddrinfo() and the stack traces look like the ones we used to get before patching glibc. Example from a recent core file using the latest deployed build:
Thread #18 1456 (Suspended : Container)
recvmsg() at 0x7f1fa276c17d
make_request() at 0x7f1fa278695d
__check_pf() at 0x7f1fa2786e54
getaddrinfo() at 0x7f1fa2759501
Thread #16 1454 (Suspended : Container)
__lll_lock_wait_private() at 0x7f1fa277777b
_L_lock_443() at 0x7f1fa2786f4d
__check_pf() at 0x7f1fa2786d05
getaddrinfo() at 0x7f1fa2759501
I would like to be able to verify which version of getaddrinfo() the release executables we have deployed are executing: patched or unpatched. Doing this on my personal development box won't help because that would only verify my own toolchain / build environment. Is there any way I can do this with the release binaries we have deployed?
EDIT: I forgot to mention that we link statically.
EDIT 2: I was wrong about static linking. We used to link pretty much everything statically, but we no longer link statically with system libraries. Thanks to those who pointed this out.