Analyzers
Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4963 Discussions

Error on debugging a console app on linux

Dennis84
Beginner
1,579 Views

Hello,

 

when debugging a console app on windows, everything works fine and the analysis is possible.

Now i wanted to try to debug the same app on linux, but this seems to be a nightmare in comparison with windows.

 

First of all, I use a linux vm and a windows vm.

I use this command:

vtune -collect hotspots -result-dir r006hs ./appname

the app starts now, but nothing happens after console screen is showing.

When trying to attach to the process, this happens and the app crashes:

 

)AMPLXE_TPSSCOLLECTOR: tool:1353: g_instr_global.is_libpthread_so_initialized == 0 : g_instr_global.is_libpthread_so_initialized == 1

Assertion failed: tool:1353: g_instr_global.is_libpthread_so_initialized == 0 : g_instr_global.is_libpthread_so_initialized == 1
. Please contact the technical support. Segmentation fault (core dumped)

 

Any ideas to step forward?

I'm thankful for every advice!

 

 

0 Kudos
13 Replies
JaideepK_Intel
Moderator
1,553 Views

Hi,


Thank you for posting in Intel Communities.


In order to reproduce your issue from our end, could you please answer the below questions?

  1. What is the version of vtune.
  2. Could you please share the processor and OS (local machine and VM) details.
  3. Could you please share a sample reproducer (Exact replica of your application) so that we can reproduce your issue from our end.
  4. Could you please run the same analysis using matrix sample (path:/opt/intel/oneapi/vtune/latest/samples/en/C++/matrix/) and let us know you are facing same issue ?


Thanks,

Jaideep


0 Kudos
Dennis84
Beginner
1,539 Views

Hello Jaideep,

 

thanks for your answer and your help.

let me answer your questions:

1.

Intel(R) VTune(TM) Profiler 2023.0.0 (build 624757) Command Line Tool
Copyright (C) 2009 Intel Corporation. All rights reserved.

2.

I Installed a new Ubuntu 22.10 with the respective vtune profiler.

a newer kernel 6.X does not work with vtune 2023.

cpu on host ist Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model

the vm has 4 cores

3.

I need to check if it is possible to share the application.

It is a self coded app in fpc and need to check if that is possible

4.

can you explain to me how i can do this?

I'm pretty sure I use the matrix example, but maybe i do something wrong.

 

Thanks for your support!

0 Kudos
JaideepK_Intel
Moderator
1,463 Views

Hi,

 

We are unable to reproduce your issue from our end (Are you running inside a VM?).

 

Could you please follow the below steps?

  1. Run terminal as root/sudo user.
  2. Check whether all the drivers are loaded properly or not with the below command.
sudo <oneapi_install_directory>/vtune/latest/sepdk/src/insmod-sep -q

example:

/opt/intel/oneapi/vtune/latest/sepdk/src/insmod-sep -q

 

If all the drivers are not loaded properly, please run the below command:

sudo <oneapi_install_directory>/vtune/latest/sepdk/src/build-driver

(eg:/opt/intel/oneapi/vtune/latest/sepdk/src/build-driver)

 

In order to verify all the analyses are working fine, we need to run the self-check file:

sh <oneapi_install_directory>/vtune/latest/bin64/vtune-self-checker.sh

(eg: sh /opt/intel/oneapi/vtune/latest/bin64/vtune-self-checker.sh)

 

Thanks,

Jaideep

 

 

 

 

0 Kudos
Dennis84
Beginner
1,451 Views

Hello @JaideepK_Intel 

 

Yes, i run vtunes in a vm, but this is possible as i read and also works in a windows vm with the same tool.

first step: all drivers are loaded:

/opt/intel/oneapi/vtune/latest/sepdk/src/insmod-sep -q

pax driver is loaded and owned by group "vtune" with file permissions "660".
socperf3 driver is loaded and owned by group "vtune" with file permissions "660".
sep5 driver is loaded and owned by group "vtune" with file permissions "660".

socwatch driver is loaded and owned by group "vtune" with file permissions "660".

vtsspp driver is loaded and owned by group "vtune" with file permissions "660".

 

the self checker fails for some events because it is a linux vm, but the hotspot analysis in usermode should run:

 

The check observed a product failure on your system.
Review errors in the output above to fix a problem or contact Intel technical su pport.

The system is ready for the following analyses:
* Hotspots and Threading with user-mode sampling
* Hotspots with HW event-based sampling, HPC Performance Characterization, etc.
* Microarchitecture Exploration
* Threading with HW event-based sampling

The following analyses have failed on the system:
* Performance Snapshot
* Memory Access
* Hotspots with HW event-based sampling and call stacks
* GPU Compute/Media Hotspots (characterization mode)
* GPU Compute/Media Hotspots (source analysis mode)

 

It this maybe a problem with libpthread?

I read in the help section that there can be any problems with this library.

My Application uses threading and starts many threads directly after starting.

It seems that when i run the application, only one thread for the gui is started, the others are ignored.

Can you give me an advice how i can check this issue?

 

Thanks for your support!

 

0 Kudos
JaideepK_Intel
Moderator
1,355 Views

Hi,

Good day to you.

Please provide the following details:

  1. As you mentioned above, are you facing the same issue with all these processors? (Xeon E3-1200 v5/v6; E3-1500 v5; 6th/7th/8th Gen Core Processor Gaussian Mixture Model)
  2. If your machine is crashing, could you please share the crash report?
  3. Can you run same analysis using Fibonacci recursion code(n=46) and let us know it's working fine or not?

link: Program for Fibonacci numbers - GeeksforGeeks


Thanks,

Jaideep


0 Kudos
Dennis84
Beginner
1,260 Views

Good morning,

 

sorry for the late reply, but i think i found the issue.

But first lets answer your questions:

1. i have only one CPU from the family i wrote, but i don't think this issue is hardware related.

2. not the machine is crashing, only my app is crashing with the error i wrote.

I tested a small free pascal application and here the same issue happened. I will attach the base example here.

 

The issue i found is the following:

when i check the compiled binary with ldd on linux then i see on an debian buster (old stable) this:

 

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2c70de8000)

 

but on a newer Ubuntu System (22.10) i only see a reference to libc6, but no pthread.

I think that is why the error occurs, because in one case libpthread is linked and in the other case it is not.

What do you think? Is this check for the link really neccesary?

 

Thanks for taking care.

 

 

 

 

 

0 Kudos
JaideepK_Intel
Moderator
1,267 Views

Hi,


Can you please follow above steps and let us know ?


Thanks,

Jaideep


0 Kudos
JaideepK_Intel
Moderator
1,214 Views

Hi,

 

I hope you are doing well.

 

We can see you are trying to profile a Pascal sample, but unfortunately, Pascal is not supported. Please go through the below link and screenshots for reference. Could you please try on the supported programming language?

JaideepK_Intel_0-1680689368077.png

Link: https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!

 

Thanks,

Jaideep

 

0 Kudos
JaideepK_Intel
Moderator
1,169 Views

Hi,


I hope you are doing well.


As mentioned above pascal is currently not supported by the Vtune.

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!

 

Thanks,

Jaideep


0 Kudos
Dennis84
Beginner
1,157 Views

Hello Jaideep,

 

thank you for the answer.

I mean, on official channels this is a solution.

But for my personal view it is not, because in general debugging pascal is working really good with vtune, but it seems that only on newer linux machines this is an issue with linking.

If there is nothing we can do about this, then there is nothing more to say as i have to accept the answer as solution.

0 Kudos
JaideepK_Intel
Moderator
1,139 Views

Hi,


I hope you are doing well.


Sorry to say this, but we only support queries related to supported languages as mentioned in system requirements.

Can we go ahead and close this case?


Thanks,

Jaideep


0 Kudos
Dennis84
Beginner
1,066 Views

then please close the ticket.

There is no other way.

 

Thanks.

0 Kudos
JaideepK_Intel
Moderator
1,044 Views

Hi,


Thanks for the confirmation. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Have a great day ahead.


Regards,

Jaideep


0 Kudos
Reply