ingress-nginx: Unable to load debugging information from the nginx compiled binary
NGINX Ingress controller version: 0.13
Kubernetes version (use kubectl version): 1.8.x
What happened: I need to instrument the nginx binary with a third party proprietary monitoring tool (AppMon), which involves loading an external agent that needs access to nginx’s debugging information generated at compile time.
What you expected to happen: Given the current build.sh script, I’d expect the nginx binary to contain its debugging symbols. The script does include the flag -g into CC_OPT (line 285).
However, a simple test using gdb shows me it cannot find the debug symbols in the compiled binary.
How to reproduce it (as minimally and precisely as possible):
This can be checked with a current build of the image, i.e. quay.io/kubernetes-ingress-controller/nginx:0.34, run the following:
$> docker run --rm --name nginx -it quay.io/kubernetes-ingress-controller/nginx:0.34 bash
root@26c49acb2520:/# apt-get update && apt-get install -y gdb
<snipped output>
root@26c49acb2520:/# gdb /usr/sbin/nginx
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/nginx...(no debugging symbols found)...done.
(gdb)
The message at the bottom is the focus: no debugging symbols found.
My team is willing to maintain a custom build of the nginx-controller image to incorporate the third party agent for monitoring, but we need the compiled binary to include debugging symbols.
Can anyone help?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (13 by maintainers)
@rlees85
You are right. We don’t have any experience with the OneAgent solution yet. But it is on our roadmap for a future licence upgrade.
At this point, I have no idea how the OneAgent performs its deep monitoring, but since it’s supposed to be more prepared for a cloud environment, there should be a broader support for containerized apps and their more recent builds.
A DynaTrace support ticket is a good way to start. They do provide good technical support, even if delayed by their timezone. That’s what we did to get it working with the traditional agent.
Just confirmed, 0.35 image has the debug symbols in its ~15MB binary.
Will reopen the issue if anything else comes up.
Thank you very much for the help!