Why Is "No AllocTracer Symbols Found. Are JDK Debug Symbols Installed?" Displayed?
Problem
The memory Profiler depends on the JDK symbol information. If JDK does not contain symbol information, the following error may occur:
[ERROR] xxxx Failed to start Continuous Profile Collector
[ERROR] xxxx No AllocTracer symbols found. Are JDK debug symbols installed?
Solution
If the Java process runs in a container environment and the preceding error is reported or no data is displayed, the possible cause is that the Alpine base image is used. The Alpine base image removes JDK debug symbols to reduce the size, which affects the Profiler function. You are advised to install debug symbols for JDK in the base image (for some JDK versions, the installation may fail due to the lack of debug symbol packages) or use a non-Alpine base image.
If the application is deployed on a CentOS physical machine, perform the following steps to install debug symbols:
- Run the following command to check whether the debuginfo source has been configured:
yum repolist all | grep -i debug
Check whether the source configuration is as follows:
debuginfo/7/x86_64 CentOS-7 - debuginfo - mirrors.huaweicloud.com Enabled: 8,760
If the debuginfo source has not been configured, go to step 2 to add the configuration. If the debuginfo source has been configured, go to step 3.
- Add the debuginfo configuration to the Yum configuration file.
vi /etc/yum.repos.d/CentOS-Base.repo [debuginfo] name=CentOS-$releasever - debuginfo - mirrors.huaweicloud.com failovermethod=priority baseurl=http://mirrors.huaweicloud.com/centos-debuginfo/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=http://mirrors.huaweicloud.com/centos/RPM-GPG-KEY-CentOS-Debug-7
After saving the configuration, run the following command:
yum clean all yum makecache yum-config-manager --enable debuginfo
- Install the symbol information corresponding to the JDK version.
JDK 8 yum list installed|grep openjdk #Query the JDK version. java-1.8.0-openjdk.x86_64 1:1.8.0.332.b09-1.el7_9 @updates debuginfo-install -y java-1.8.0-openjdk #Install the symbol information. JDK 11 yum list installed|grep openjdk #Query the JDK version. java-11-openjdk.x86_64 1:11.0.15.0.9-2.el7_9 @updates debuginfo-install -y java-11-openjdk #Install the symbol information.
- Check whether the JDK symbol information is successfully installed.
gdb $JAVA_HOME/lib/server/libjvm.so -ex 'info address UseG1GC' gdb /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre/lib/amd64/server/libjvm.so -ex 'info address UseG1GC' GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7 Copyright (C) 2013 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-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre/lib/amd64/server/libjvm.so...Reading symbols from /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre/lib/amd64/server/libjvm.so.debug...done. done.
If the installation is correct, the following information is displayed:
Symbol "UseG1GC" is static storage at address 0x107f993.
If the installation fails, the following information is displayed:
No symbol "UseG1GC" in current context.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot