-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load debugging information from the nginx compiled binary #2153
Comments
@juliohm1978 thank you for the report. The next release will contain the debug symbols. |
Thanks @aledbf! That was fast. Any chance I can get a tip for adding the necessary flags myself into a custom build? I'm already setup to build the image locally. |
@juliohm1978 the missing part is https://www.nginx.com/blog/new-debugging-features-probe-nginx-internals/ |
|
All the configuration for debug is already present. |
@juliohm1978 please check #2155. The issue was related to thee compiler optimization flags. root@88b760d25a68:/# 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...done.
(gdb) quit
root@88b760d25a68:/# ls -lat /usr/sbin/nginx
-rwxr-xr-x 1 root root 14923048 Feb 28 12:53 /usr/sbin/nginx |
@juliohm1978 right now the ci is building the new images. You can pull that image in ~20 minutes. |
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! |
Quick follow up! I was able to successfuly attach the monitoring agent, but we had to further modify the nginx compiler flags. For anyone interested, the new image 0.35 includes debug symbols using the flags Unfortunately for us, the DynaTrace agent is very intrusive and we will need to maintain a custom build of the nginx-controller in-house to make this work. I'd like to thank you all for the support. Great community! |
@juliohm1978 can you post the crash detsails? |
The agent is loaded with the following command line
It will print its debug messages to stdout, along with the runtime of nginx itself. Nginx finally crashes with the following:
There's also a resulting 250MB core dump, but we'll have to upload it somewhere if you wish to dive into it. Removing the UPDATE: This is what
|
@juliohm1978 I don't suppose you have had any experience with If I do nothing (use
I've tried:
I guess no-one will have a clue, I will raise an issue with Dynatrace, but if you did try with one-agent I just want to know your experience! |
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. |
I'm back again (sorry) ... to add to the above, I raised a ticket with Dynatrace about OneAgent and it now works. I think it was the same issue as you had above (jemalloc). Dynatrace fixed it though... It looks like, however the decision is to stay with AppMon.... and I just tried the Dynatrace AppMon Agent 7.1 and it barfs. I've raised a ticket with Dynatrace but will more than likely need to bake our own ingress-nginx image, same as you. I was wondering, do you run nginx directly or do you use Also, when using Seems like a bit of a wasps nest and any help if you have experienced any of these problems would be a great help. |
Hi @rlees85, We havent had any issues with the agent hanging at bootstrap. We still use |
NGINX Ingress controller version: 0.13
Kubernetes version (use
kubectl version
): 1.8.xWhat 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
intoCC_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:
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?
The text was updated successfully, but these errors were encountered: