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

VTune hard freezes my computer

swineone1337
Beginner
1,716 Views

I'm trying to profile a program using VTune. I'm currently compiling it with Intel's own compiler, but as I recall the issue happens regardless of the compiler used. My code uses Intel TBB and OpenMP, and I'm not sure whether it's relevant, but it allocates large amounts of memory (on the order > 10 GB). Again not sure whether it's relevant, but I had to compile and digitally sign VTune's kernel modules with a locally-generated cryptographic key (installed into the computer's TPM), otherwise they wouldn't load.

 

When I run it in the terminal, it takes about 4 seconds to run. The first time I run it under VTune, it supposedly runs in 0.1 s (it is self-contained, has no command-line arguments, no files it needs to access on the current directory, etc.). The second time, it hard freezes my computer. The mouse doesn't move, pressing NumLock/CapsLock on the keyboard doesn't light up the corresponding light on the keyboard, and pressing the computer's power button has no effect. I have to hold the power button for ~5s to turn it off.

 

Any idea what might be wrong, and what I need to do to fix it? Feel free to suggest experiments to perform to dig into the root cause of the issue.

 

System info:

-Intel Core i7-12700KF CPU

-OS: Ubuntu Linux 22.04

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"

-Compiler (installed using Ubuntu's apt package manager, latest version available):

$ icpx --version
Intel(R) oneAPI DPC++/C++ Compiler 2023.1.0 (2023.1.0.20230320)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm
Configuration file: /opt/intel/oneapi/compiler/2023.1.0/linux/bin-llvm/../bin/icpx.cfg

 -VTune version (installed using Ubuntu's apt package manager, latest version available):

$ vtune --version
Intel(R) VTune(TM) Profiler 2023.1.0 pre-release (build 625246) Command Line Tool
Copyright (C) 2009 Intel Corporation. All rights reserved.

 

0 Kudos
8 Replies
swineone1337
Beginner
1,714 Views

Here is the output of /var/log/kern.log immediately after the first run of VTune (the one which returns in 0.1s when it should take over 4 seconds, but at least doesn't freeze the computer):

 

Apr 11 10:31:57 loonix kernel: [ 1902.328123] BUG: scheduling while atomic: challenge1/11765/0x00000002
Apr 11 10:31:57 loonix kernel: [ 1902.328128] Modules linked in: xt_multiport xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables libcrc32c nfnetlink br_netfilter bridge stp llc socwatch2_15(O) sep5(O) rfcomm cmac algif_hash algif_skcipher af_alg socperf3(O) nvidia_uvm(PO) nvidia_drm(PO) intel_rapl_msr intel_rapl_common intel_tcc_cooling snd_sof_pci_intel_tgl nvidia_modeset(PO) snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus x86_pkg_temp_thermal snd_hda_codec_realtek intel_powerclamp nvidia(PO) pax(O) overlay bnep snd_hda_codec_generic snd_soc_core ledtrig_audio snd_compress snd_hda_codec_hdmi ac97_bus snd_pcm_dmaengine coretemp snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core iwlmvm
Apr 11 10:31:57 loonix kernel: [ 1902.328161]  snd_hwdep snd_pcm btusb kvm_intel btrtl snd_seq_midi mac80211 kvm btbcm snd_seq_midi_event crct10dif_pclmul btintel snd_rawmidi ghash_clmulni_intel btmtk binfmt_misc aesni_intel libarc4 snd_seq bluetooth drm_kms_helper crypto_simd iwlwifi cryptd snd_seq_device fb_sys_fops snd_timer rapl cmdlinepart pmt_telemetry syscopyarea nls_iso8859_1 pmt_class spi_nor intel_cstate input_leds ecdh_generic wmi_bmof joydev snd mei_me sysfillrect cfg80211 mtd mxm_wmi ecc sysimgblt soundcore mei intel_vsec serial_multi_instantiate sch_fq_codel acpi_pad acpi_tad mac_hid msr parport_pc ppdev lp ramoops pstore_blk drm parport reed_solomon pstore_zone efi_pstore ip_tables x_tables autofs4 hid_logitech ff_memless hid_generic usbhid hid nvme spi_intel_pci i2c_i801 ahci igc xhci_pci crc32_pclmul nvme_core spi_intel i2c_smbus libahci xhci_pci_renesas wmi video pinctrl_alderlake
Apr 11 10:31:57 loonix kernel: [ 1902.328200] CPU: 6 PID: 11765 Comm: challenge1 Tainted: P           O      5.19.0-38-generic #39~22.04.1-Ubuntu
Apr 11 10:31:57 loonix kernel: [ 1902.328202] Hardware name: Micro-Star International Co., Ltd. MS-7D25/PRO Z690-A WIFI (MS-7D25), BIOS A.10 12/06/2021
Apr 11 10:31:57 loonix kernel: [ 1902.328202] Call Trace:
Apr 11 10:31:57 loonix kernel: [ 1902.328204]  <TASK>
Apr 11 10:31:57 loonix kernel: [ 1902.328205]  show_stack+0x52/0x69
Apr 11 10:31:57 loonix kernel: [ 1902.328210]  dump_stack_lvl+0x49/0x6d
Apr 11 10:31:57 loonix kernel: [ 1902.328212]  dump_stack+0x10/0x18
Apr 11 10:31:57 loonix kernel: [ 1902.328214]  __schedule_bug.cold+0x4f/0x6b
Apr 11 10:31:57 loonix kernel: [ 1902.328216]  __schedule+0x473/0x5d0
Apr 11 10:31:57 loonix kernel: [ 1902.328217]  ? memcg_slab_post_alloc_hook+0x1bc/0x280
Apr 11 10:31:57 loonix kernel: [ 1902.328220]  schedule+0x68/0x110
Apr 11 10:31:57 loonix kernel: [ 1902.328221]  rwsem_down_read_slowpath+0x367/0x4d0
Apr 11 10:31:57 loonix kernel: [ 1902.328223]  ? mmap_region+0x2b4/0x690
Apr 11 10:31:57 loonix kernel: [ 1902.328225]  down_read+0x43/0xb0
Apr 11 10:31:57 loonix kernel: [ 1902.328231]  UTILITY_down_read_mm+0x12/0x20 [sep5]
Apr 11 10:31:57 loonix kernel: [ 1902.328238]  linuxos_Exec_Unmap_Notify+0xbf/0x180 [sep5]
Apr 11 10:31:57 loonix kernel: [ 1902.328244]  ? __vm_munmap+0x1/0x150
Apr 11 10:31:57 loonix kernel: [ 1902.328247]  kprobe_ftrace_handler+0x114/0x1d0
Apr 11 10:31:57 loonix kernel: [ 1902.328250]  ? __vm_munmap+0x5/0x150
Apr 11 10:31:57 loonix kernel: [ 1902.328251]  0xffffffffc02690e3
Apr 11 10:31:57 loonix kernel: [ 1902.328253] RIP: 0010:__vm_munmap+0x1/0x150
Apr 11 10:31:57 loonix kernel: [ 1902.328255] Code: e7 48 8b 75 d0 e8 cf ff 10 00 41 89 c7 85 c0 0f 84 44 ff ff ff e9 d0 fd ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 e8 <1b> a5 91 24 55 48 89 e5 41 57 49 89 f7 41 56 49 89 fe 41 55 4c 8d
Apr 11 10:31:57 loonix kernel: [ 1902.328257] RSP: 0018:ffff9fdd437bbeb8 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328259] RAX: ffffffff9b94ec50 RBX: 0000000000000000 RCX: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328261] RDX: 0000000000000001 RSI: 0000000004000000 RDI: 00007f01a0000000
Apr 11 10:31:57 loonix kernel: [ 1902.328262] RBP: ffff9fdd437bbec0 R08: 0000000000000000 R09: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328263] R10: 0000000000000000 R11: 0000000000000000 R12: ffff9fdd437bbf58
Apr 11 10:31:57 loonix kernel: [ 1902.328264] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328265]  ? vm_munmap+0x20/0x20
Apr 11 10:31:57 loonix kernel: [ 1902.328267]  ? __vm_munmap+0x5/0x150
Apr 11 10:31:57 loonix kernel: [ 1902.328268]  ? __x64_sys_munmap+0x1b/0x30
Apr 11 10:31:57 loonix kernel: [ 1902.328270]  ? __vm_munmap+0x5/0x150
Apr 11 10:31:57 loonix kernel: [ 1902.328271]  ? __x64_sys_munmap+0x1b/0x30
Apr 11 10:31:57 loonix kernel: [ 1902.328272]  do_syscall_64+0x59/0x90
Apr 11 10:31:57 loonix kernel: [ 1902.328273]  ? default_do_nmi+0x45/0x170
Apr 11 10:31:57 loonix kernel: [ 1902.328275]  ? irqentry_nmi_exit+0x12/0x40
Apr 11 10:31:57 loonix kernel: [ 1902.328276]  ? exc_nmi+0xc2/0x1a0
Apr 11 10:31:57 loonix kernel: [ 1902.328278]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
Apr 11 10:31:57 loonix kernel: [ 1902.328282] RIP: 0033:0x7f045671ec2b
Apr 11 10:31:57 loonix kernel: [ 1902.328283] Code: 8b 15 09 a2 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 a1 0f 00 f7 d8 64 89 01 48
Apr 11 10:31:57 loonix kernel: [ 1902.328284] RSP: 002b:00007f01b3ffdd88 EFLAGS: 00000206 ORIG_RAX: 000000000000000b
Apr 11 10:31:57 loonix kernel: [ 1902.328285] RAX: ffffffffffffffda RBX: 0000000000021000 RCX: 00007f045671ec2b
Apr 11 10:31:57 loonix kernel: [ 1902.328285] RDX: 0000000000000000 RSI: 0000000004000000 RDI: 00007f01a0000000
Apr 11 10:31:57 loonix kernel: [ 1902.328286] RBP: 0000000004000000 R08: 00000000ffffffff R09: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328286] R10: 0000000000004022 R11: 0000000000000206 R12: 00007f019c000000
Apr 11 10:31:57 loonix kernel: [ 1902.328287] R13: 0000000000001000 R14: 00007f01a0000000 R15: 00007f019c000000
Apr 11 10:31:57 loonix kernel: [ 1902.328289]  </TASK>
Apr 11 10:31:57 loonix kernel: [ 1902.328294] ------------[ cut here ]------------
Apr 11 10:31:57 loonix kernel: [ 1902.328294] kernel BUG at kernel/entry/common.c:449!
Apr 11 10:31:57 loonix kernel: [ 1902.328297] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
Apr 11 10:31:57 loonix kernel: [ 1902.328299] CPU: 6 PID: 11765 Comm: challenge1 Tainted: P        W  O      5.19.0-38-generic #39~22.04.1-Ubuntu
Apr 11 10:31:57 loonix kernel: [ 1902.328300] Hardware name: Micro-Star International Co., Ltd. MS-7D25/PRO Z690-A WIFI (MS-7D25), BIOS A.10 12/06/2021
Apr 11 10:31:57 loonix kernel: [ 1902.328300] RIP: 0010:irqentry_nmi_enter+0x4e/0x50
Apr 11 10:31:57 loonix kernel: [ 1902.328301] Code: ff ff ff 80 3d 82 a9 96 01 00 75 0a 31 c0 5d 31 ff c3 cc cc cc cc bf 01 00 00 00 e8 ac b2 31 ff 31 c0 5d 31 ff c3 cc cc cc cc <0f> 0b 55 80 3d 58 a9 96 01 00 48 89 e5 75 28 e8 5e fe ff ff 65 8b
Apr 11 10:31:57 loonix kernel: [ 1902.328302] RSP: 0018:fffffe000016fec8 EFLAGS: 00010046
Apr 11 10:31:57 loonix kernel: [ 1902.328303] RAX: 0000000000f00000 RBX: 0000000000000007 RCX: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328304] RDX: 0000000000000000 RSI: ffffffffffffffff RDI: fffffe000016fef8
Apr 11 10:31:57 loonix kernel: [ 1902.328304] RBP: fffffe000016fee8 R08: 0000000000000000 R09: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328305] R10: 0000000000000000 R11: 0000000000000000 R12: fffffe000016fef8
Apr 11 10:31:57 loonix kernel: [ 1902.328305] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328305] FS:  00007f01b3ffec40(0000) GS:ffff93218f980000(0000) knlGS:0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328306] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr 11 10:31:57 loonix kernel: [ 1902.328307] CR2: 00007f01b3ffdf88 CR3: 0000000140dc0004 CR4: 0000000000770fe0
Apr 11 10:31:57 loonix kernel: [ 1902.328308] PKRU: 55555554
Apr 11 10:31:57 loonix kernel: [ 1902.328308] Call Trace:
Apr 11 10:31:57 loonix kernel: [ 1902.328309]  <NMI>
Apr 11 10:31:57 loonix kernel: [ 1902.328309]  ? exc_nmi+0x9f/0x1a0
Apr 11 10:31:57 loonix kernel: [ 1902.328310]  end_repeat_nmi+0x16/0x67
Apr 11 10:31:57 loonix kernel: [ 1902.328311] RIP: 0010:__do_munmap+0x443/0x500
Apr 11 10:31:57 loonix kernel: [ 1902.328312] Code: 85 e4 0f 85 24 fd ff ff 48 83 7d b8 00 4d 8b 65 00 0f 85 9d 00 00 00 4c 89 6d b8 48 c7 45 c8 00 00 00 00 e9 23 fd ff ff 66 90 <49> 8d 7d 78 41 bf 01 00 00 00 e8 de d7 df ff e9 b1 fd ff ff 48 89
Apr 11 10:31:57 loonix kernel: [ 1902.328313] RSP: 0018:ffff9fdd437bbe00 EFLAGS: 00000202
Apr 11 10:31:57 loonix kernel: [ 1902.328314] RAX: ffff931a43cfaab0 RBX: 0000000000000000 RCX: 00000000037fc000
Apr 11 10:31:57 loonix kernel: [ 1902.328314] RDX: 00007f0199f6f000 RSI: ffff931a43cfaa90 RDI: 0000000004000000
Apr 11 10:31:57 loonix kernel: [ 1902.328315] RBP: ffff9fdd437bbe58 R08: 0000000000100000 R09: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328315] R10: 0000000000000000 R11: 0000000000000000 R12: ffff931a455ef450
Apr 11 10:31:57 loonix kernel: [ 1902.328315] R13: ffff931a00293b80 R14: ffff931a455ef450 R15: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328317]  ? __do_munmap+0x443/0x500
Apr 11 10:31:57 loonix kernel: [ 1902.328318]  ? __do_munmap+0x443/0x500
Apr 11 10:31:57 loonix kernel: [ 1902.328319]  </NMI>
Apr 11 10:31:57 loonix kernel: [ 1902.328319]  <TASK>
Apr 11 10:31:57 loonix kernel: [ 1902.328320]  __vm_munmap+0x7f/0x150
Apr 11 10:31:57 loonix kernel: [ 1902.328321]  __x64_sys_munmap+0x1b/0x30
Apr 11 10:31:57 loonix kernel: [ 1902.328322]  do_syscall_64+0x59/0x90
Apr 11 10:31:57 loonix kernel: [ 1902.328323]  ? default_do_nmi+0x45/0x170
Apr 11 10:31:57 loonix kernel: [ 1902.328324]  ? irqentry_nmi_exit+0x12/0x40
Apr 11 10:31:57 loonix kernel: [ 1902.328325]  ? exc_nmi+0xc2/0x1a0
Apr 11 10:31:57 loonix kernel: [ 1902.328326]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
Apr 11 10:31:57 loonix kernel: [ 1902.328327] RIP: 0033:0x7f045671ec2b
Apr 11 10:31:57 loonix kernel: [ 1902.328328] Code: 8b 15 09 a2 0f 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 a1 0f 00 f7 d8 64 89 01 48
Apr 11 10:31:57 loonix kernel: [ 1902.328328] RSP: 002b:00007f01b3ffdd88 EFLAGS: 00000206 ORIG_RAX: 000000000000000b
Apr 11 10:31:57 loonix kernel: [ 1902.328329] RAX: ffffffffffffffda RBX: 0000000000021000 RCX: 00007f045671ec2b
Apr 11 10:31:57 loonix kernel: [ 1902.328330] RDX: 0000000000000000 RSI: 0000000004000000 RDI: 00007f01a0000000
Apr 11 10:31:57 loonix kernel: [ 1902.328330] RBP: 0000000004000000 R08: 00000000ffffffff R09: 0000000000000000
Apr 11 10:31:57 loonix kernel: [ 1902.328331] R10: 0000000000004022 R11: 0000000000000206 R12: 00007f019c000000
Apr 11 10:31:57 loonix kernel: [ 1902.328331] R13: 0000000000001000 R14: 00007f01a0000000 R15: 00007f019c000000
Apr 11 10:31:57 loonix kernel: [ 1902.328332]  </TASK>
Apr 11 10:31:57 loonix kernel: [ 1902.328332] Modules linked in:
Apr 11 10:31:57 loonix kernel: [ 1902.328333]  xt_multiport xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables libcrc32c nfnetlink br_netfilter bridge stp llc socwatch2_15(O) sep5(O) rfcomm cmac algif_hash algif_skcipher af_alg socperf3(O) nvidia_uvm(PO) nvidia_drm(PO) intel_rapl_msr intel_rapl_common intel_tcc_cooling snd_sof_pci_intel_tgl nvidia_modeset(PO) snd_sof_intel_hda_common soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi soundwire_bus x86_pkg_temp_thermal snd_hda_codec_realtek intel_powerclamp nvidia(PO) pax(O) overlay bnep snd_hda_codec_generic snd_soc_core ledtrig_audio snd_compress snd_hda_codec_hdmi ac97_bus snd_pcm_dmaengine coretemp snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core iwlmvm snd_hwdep snd_pcm
Apr 11 10:31:57 loonix kernel: [ 1902.328360]  btusb kvm_intel btrtl snd_seq_midi mac80211 kvm btbcm snd_seq_midi_event crct10dif_pclmul btintel snd_rawmidi ghash_clmulni_intel btmtk binfmt_misc aesni_intel libarc4 snd_seq bluetooth drm_kms_helper crypto_simd iwlwifi cryptd snd_seq_device fb_sys_fops snd_timer rapl cmdlinepart pmt_telemetry syscopyarea nls_iso8859_1 pmt_class spi_nor intel_cstate input_leds ecdh_generic wmi_bmof joydev snd mei_me sysfillrect cfg80211 mtd mxm_wmi ecc sysimgblt soundcore mei intel_vsec serial_multi_instantiate sch_fq_codel acpi_pad acpi_tad mac_hid msr parport_pc ppdev lp ramoops pstore_blk drm parport reed_solomon pstore_zone efi_pstore ip_tables x_tables autofs4 hid_logitech ff_memless hid_generic usbhid hid nvme spi_intel_pci i2c_i801 ahci igc xhci_pci crc32_pclmul nvme_core spi_intel i2c_smbus libahci xhci_pci_renesas wmi video pinctrl_alderlake
Apr 11 10:31:57 loonix kernel: [ 1902.328381] 
Apr 11 10:31:57 loonix kernel: [ 1902.328383] ---[ end trace 0000000000000000 ]---
0 Kudos
swineone1337
Beginner
1,711 Views

Running vtune-self-checker.sh also hard freezes the computer. Here is the partial log up until the freeze:

 

$ ./vtune-self-checker.sh 
Intel(R) VTune(TM) Profiler Self Check Utility
Copyright (C) 2009 Intel Corporation. All rights reserved.
Build Number: 625246

HW event-based analysis (counting mode) (Intel driver)   
Example of analysis types: Performance Snapshot
    Collection: Ok
    Finalization: Ok...
    Report: Ok

Instrumentation based analysis check   
Example of analysis types: Hotspots and Threading with user-mode sampling
    Collection: Fail
vtune: Error: Cannot start data collection because the scope of ptrace system call is limited. To enable profiling, please set /proc/sys/kernel/yama/ptrace_scope to 0. To make this change permanent, set kernel.yama.ptrace_scope to 0 in /etc/sysctl.d/10-ptrace.conf and reboot the machine.

HW event-based analysis check (Intel driver)   
Example of analysis types: Hotspots with HW event-based sampling, HPC Performance Characterization, etc.
    Collection: Ok
vtune: Warning: To enable hardware event-based sampling, VTune Profiler has disabled the NMI watchdog timer. The watchdog timer will be re-enabled after collection completes.
    Finalization: Ok...
vtune: Warning: Cannot read load addresses of sections from `/sys/module/kvm/sections'. This may affect the correctness of symbol resolution for `kvm'. Make sure this directory exists and all files in this directory have read permissions.

vtune: Warning: Function and source-level analysis for the Linux kernel will not be possible since neither debug version of the kernel nor kernel symbol tables are found. See the Enabling Linux Kernel Analysis topic in the product online help for instructions.

    Report: Ok

HW event-based analysis check (Intel driver)   
Example of analysis types: Microarchitecture Exploration
    Collection: Ok
vtune: Warning: To enable hardware event-based sampling, VTune Profiler has disabled the NMI watchdog timer. The watchdog timer will be re-enabled after collection completes.
    Finalization: Ok...
vtune: Warning: Function and source-level analysis for the Linux kernel will not be possible since neither debug version of the kernel nor kernel symbol tables are found. See the Enabling Linux Kernel Analysis topic in the product online help for instructions.

    Report: Ok

HW event-based analysis with uncore events (Intel driver)   
Example of analysis types: Memory Access
    Collection: Ok
vtune: Warning: To enable hardware event-based sampling, VTune Profiler has disabled the NMI watchdog timer. The watchdog timer will be re-enabled after collection completes.
    Finalization: Ok...
vtune: Warning: Function and source-level analysis for the Linux kernel will not be possible since neither debug version of the kernel nor kernel symbol tables are found. See the Enabling Linux Kernel Analysis topic in the product online help for instructions.

    Report: Ok

HW event-based analysis with stacks   
Example of analysis types: Hotspots with HW event-based sampling and call stacks
    Collection: Fail
vtune: Warning: Unlimited stack size (0) not allowed if the VTune Profiler sampling driver is not loaded. Stack size option will be changed to 1024 during data collection.
vtune: Error: Current OS kernel does not support driverless collection on hybrid CPUs. Consider loading the VTune Profiler sampling driver using root credentials or updating the OS kernel.
vtune: Warning: Access to /proc/kallsyms file is limited. Consider changing /proc/sys/kernel/kptr_restrict to 0 to enable resolution of OS kernel and kernel module symbols.

HW event-based analysis with context switches...
0 Kudos
Jeffrey_R_Intel1
Employee
1,580 Views

You mentioned your "code uses Intel TBB and OpenMP".
Intel Threading Building Blocks has an environment configuration script: <INSTALL_DIR>/<version>/env/vars.sh.
Try creating a shell script that first "sources" this file then runs your application. E.g.
   #!/bin/bash
   source /opt/intel/oneapi/tbb/latest/env/vars.sh
   /path/to/executable

Note, you may have to change the install dir to match your configuration.

Then configure VTune Profiler to run that shell script, or run "/bin/bash" with the shell script as the argument.
If that still fails, try changing the second line to
   source /opt/intel/oneapi/setvars.sh

Also, see the warnings reported by the VTune self-check.
To remove those,
   sudo echo 0 > /proc/sys/kernel/perf_event_paranoid
   sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope
   sudo echo 0 > /proc/sys/kernel/kptr_restrict


0 Kudos
Rahila_T_Intel
Moderator
1,652 Views

Hi,


Thank you for posting in Intel Communities.


To assist you better, can you get back to us with the following information:

1. Kernel version

2. Are you trying inside a VM

3. Could you please try to run matrix multiplication sample in terminal as admin and let us know if you are still facing the same issue?

4. The exact steps/commands that you followed/executed that led you to this error.



 Thanks


0 Kudos
swineone1337
Beginner
1,633 Views

Thank you for your answer. Here is the requested information.

1. Kernel version is 5.19.0-38-generic (the latest available from Ubuntu apt-get for my distribution version, Ubuntu 22.04.2 LTS).

2. Not running inside a VM.

3. I am assuming the sample in question is at this link. I have run it using the following steps, and it didn't freeze my computer.

a. Download the sample (.tar.gz version) from the link above and decompress it to a new directory.

b. cd to the directory and run make, which creates the executable matrix.gcc. By the way, my version of gcc is:

$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

c. Run the executable directly from the terminal, without invoking VTune, just to make sure it is working. This is the output I get:

$ ./matrix.gcc 
Addr of buf1 = 0x7f7688dff010
Offs of buf1 = 0x7f7688dff180
Addr of buf2 = 0x7f7686dfe010
Offs of buf2 = 0x7f7686dfe1c0
Addr of buf3 = 0x7f7684dfd010
Offs of buf3 = 0x7f7684dfd100
Addr of buf4 = 0x7f7682dfc010
Offs of buf4 = 0x7f7682dfc140
Threads #: 16 Pthreads
Matrix size: 2048
Using multiply kernel: multiply1
Execution time = 4.919 seconds

d. Waited for ~5 minutes to make sure the computer didn't freeze.

e. Run the sample under VTune with following command:

sudo /opt/intel/oneapi/vtune/2023.1.0/bin64/vtune -collect performance-snapshot ./matrix.gcc

 f. This is the output:

vtune: Peak bandwidth measurement started.
vtune: Peak bandwidth measurement finished.
vtune: Collection started. To stop the collection, either press CTRL-C or enter from another console window: vtune -r /home/swineone/matrixmult/matrix_sample/r000ps -command stop.
Addr of buf1 = 0x7fa0699ff010
Offs of buf1 = 0x7fa0699ff180
Addr of buf2 = 0x7fa0679fe010
Offs of buf2 = 0x7fa0679fe1c0
Addr of buf3 = 0x7fa0659fd010
Offs of buf3 = 0x7fa0659fd100
Addr of buf4 = 0x7fa0639fc010
Offs of buf4 = 0x7fa0639fc140
Threads #: 16 Pthreads
Matrix size: 2048
Using multiply kernel: multiply1
Execution time = 5.212 seconds
vtune: Collection stopped.
vtune: Using result path `/home/swineone/matrixmult/matrix_sample/r000ps'
vtune: Executing actions 75 % Generating a report                              Elapsed Time: 5.248s
    IPC: 0.210
     | The IPC may be too low. This could be caused by issues such as memory
     | stalls, instruction starvation, branch misprediction or long latency
     | instructions. Explore the other hardware-related metrics to identify what
     | is causing low IPC.
     |

(...)

g. Waited for ~3 minutes, confirmed this didn't freeze my computer.

h. Tried again without sudo, which gave a similar output.

i. Waited for ~10 minutes, confirmed this didn't freeze my computer.

4. I've been unable to make the computer freeze using the matrix multiplication sample alone, and even the VTune self-checker that made it freeze before, although I did manage to freeze it once today running my own code. However, upon further attempts I've been able to run my code, something which I was unable to do before. So, not sure what was going on. From my second post, it looks like some kind of kernel bug (or perhaps a bug in VTune's drivers).

 

0 Kudos
Rahila_T_Intel
Moderator
1,605 Views

Hi,


Glad to know that your issue is resolved now.

We are not able to reproduce the issue from our end. Since your initial query is resolved, can we close this case?


If you need assistance while using any Intel products or services, you can start a new thread. We are always happy to help.



Thanks


0 Kudos
Rahila_T_Intel
Moderator
1,500 Views

Hi,


We have not heard back from you. Could you please give us an update?


Thanks


0 Kudos
Rahila_T_Intel
Moderator
1,424 Views

Hi,


We have not heard back from you.

We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks


0 Kudos
Reply