Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

Vtune cannot find setenv symbol even after being exported in the target binary

pbansal
Beginner
2,156 Views

Hello,

I am trying to profile statically linked binary using Vtune 2021.3.0 installed with oneapi kit.

I have build the application with the required switches i.e. -g, -O2 and  -Wl, -u__setenv. As you can see from attached image which is output of "objdump -x <target binary name> | grep setenv", __setenv symbol is exported to the binary.

However, when I am trying to profile this binary with Vtune with hotspot analysis with the following command, it still throws the following error:

vtune: Error: Valid setenv symbol is not found in the binary of the analysis target.

vtune: Error: Binary file of the analysis target does not contain symbols required for profiling. See the 'Analyzing Statically Linked Binaries' help topic for more details. I vtune -collect hotspots -search-dir=/usr/lib/debug/lib64  <path to binary>

I received the above error with the following command:

vtune -collect hotspots -search-dir=/usr/lib/debug/lib64  <path to binary>

where /usr/lib/debug/lib64 is the path to directory where the symbol libc-2.28.so.debug is located.

Could you please help on the above issue. 

Thanks,

Prakhar

 

0 Kudos
11 Replies
AthiraM_Intel
Moderator
2,132 Views

Hi,


Thanks for reaching out to us.


Could you please confirm whether the binary file exports all the symbols from system libraries as mentioned in the below documentation:

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/linux-targets/analyzing-statically-linked-binaries-on-linux-targets.html


If the issue still persists, please share reproducer code and the complete steps you followed so that we can try out the same from our end.


Thanks.


0 Kudos
AthiraM_Intel
Moderator
2,096 Views

Hi,


Could you please give us an update?


Thanks


0 Kudos
pbansal
Beginner
2,069 Views

Hello,

Sorry for the delay in reply!

I verified that all the required symbols from the documentation on Analyze statically Linked Binaries on Linux* targets are exported to the target binary.

Please find the following steps to reproduce the issue at your end:

1) Download the Aerospike Database server from git repo:

git clone https://github.com/aerospike/aerospike-server.git

2) Please apply the attached patch(after extracting from zip) after cloning Aerospike into local repository to add required compiler switches:

git apply > <patch name>

3)  Build the server by following the steps in https://github.com/aerospike/aerospike-serverPlease do the default build.

4) Run vtune from the root of aerospike-server directory (Assuming vtune 2021.3.0 is installed) with path to asd binary for database server.

vtune -collect hotspots -search-dir=/usr/lib/debug/lib64   /target/Linux-x86_64/bin/asd,  where /usr/lib/debug/lib64 is the path to directory where the symbol libc-2.28.so.debug is located.

Above command will result in below error:

vtune: Error: Valid setenv symbol is not found in the binary of the analysis target.

vtune: Error: Binary file of the analysis target does not contain symbols required for profiling. See the 'Analyzing Statically Linked Binaries' help topic for more details.

Please let me know for any questions in reproducing the issue.

Thanks,
Prakhar

 

0 Kudos
AthiraM_Intel
Moderator
2,050 Views

Hi,


Thanks for sharing the details. We will try the same from our end and let you know the updates soon.

Could you please let us know which OS you are using?


Thanks


0 Kudos
pbansal
Beginner
2,043 Views

Hi,

I am using Linux with Centos 8 distribution on Intel's cascade lake server.

 

Thanks!

 

0 Kudos
AthiraM_Intel
Moderator
2,024 Views

Hi,

 

Thanks. We are checking on it internally, will get back to you soon with an update.

 

Thanks.

 

0 Kudos
DMITRY_T_Intel
Employee
1,982 Views

Hi Prakhar,

I escalated this issue to development. I will let you know as soon as I get any information.

Thank you!


0 Kudos
pbansal
Beginner
1,905 Views

Hi,

 

Is there any update on this issue?

 

Thanks,

Prakhar

0 Kudos
pbansal
Beginner
1,880 Views

Hi,

 

I'm still awaiting a reply on this issue. Is there any update?

 

Thanks!

0 Kudos
pbansal
Beginner
1,848 Views

Hi,

 

Is there any update on this issue?

 

Thanks,

Prakhar

0 Kudos
DMITRY_T_Intel
Employee
1,750 Views

Hi Prakhar,

Our developers told me that this issue was fixed in VTune Profiler version 2021.4.0. Meanwhile VTune Profiler version 2021.5.0 has been released and it can be downloaded from this page: https://software.intel.com/content/www/us/en/develop/articles/oneapi-standalone-components.html Please try it .

Thank you very much!


0 Kudos
Reply