Open Guangjun-Yin opened 2 years ago
This is an issue installing the LTTng kernel modules. What distro/version are you seeing this on?
isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# dpkg-query -l | grep -i dkms
ii dkms 2.2.0.3-2ubuntu11.8 all Dynamic Kernel Module Support Framework
iF lttng-modules-dkms 2.8.0-1ubuntu1~16.04.9 all Linux Trace Toolkit (LTTng) kernel modules (DKMS)
isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~#
isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# dpkg-query -l lttng-modules-dkms
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=================================-=====================-=====================-=======================================================================
iF lttng-modules-dkms 2.8.0-1ubuntu1~16.04. all Linux Trace Toolkit (LTTng) kernel modules (DKMS)
if it isn't. please let me know the cmd to query the information you need.
Best,
Jason
@Guangjun-Yin can you please run cat /etc/lsb-release
and share the output here?
Here is the output you requested:
isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS" isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~#
@Guangjun-Yin, I was able to successfully install via sudo ./perfcollect install
on a clean install of Ubuntu 16.04.7. The issue that you are running into is related to installation of the LTTng kernel modules which care about the kernel version. The kernel version of my default installation is 4.4.0-186-generic
. Per the logs that you pasted in, your kernel version is 4.15.0-173-generic
. Given that your kernel is newer, I would have expected this to work, but it is possible that LTTng 2.7.1 hasn't been tested with the newer kernel. The good news is that the kernel modules aren't used out of the box by perfcollect, so one option that you have is to remove the installation of these kernel modules from the install script, and then re-run sudo ./perfcollect install
.
You can do this by removing lttng-modules-dkms
from https://github.com/microsoft/perfview/blob/main/src/perfcollect/perfcollect#L1203.
that you for your feedback, after removing the lttng-modules-dkms from https://github.com/microsoft/perfview/blob/main/src/perfcollect/perfcollect#L1203.
solated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# ./perfcollect install
Installing perf_event packages.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-tools-4.15.0-187-generic
E: Couldn't find any package by glob 'linux-tools-4.15.0-187-generic'
E: Couldn't find any package by regex 'linux-tools-4.15.0-187-generic'
E: Unable to locate package linux-cloud-tools-4.15.0-187-generic
E: Couldn't find any package by glob 'linux-cloud-tools-4.15.0-187-generic'
E: Couldn't find any package by regex 'linux-cloud-tools-4.15.0-187-generic'
Installing LTTng packages.
Reading package lists... Done
Building dependency tree
Reading state information... Done
liblttng-ust0 is already the newest version (2.7.1-1).
lttng-tools is already the newest version (2.7.1-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~#
=======
Can you provide suggested package source to download then missing package? then I can let the VM team to add it to their package source.
Best,
Jason
Is it possible that you have a custom kernel? The linux-tools
or linux-cloud-tools
packages for the specific kernel version are the right ones for this distribution, but it seems that they don't exist. This would happen if you install a kernel that hasn't been officially shipped for this particular distro, as then the supporting packages won't have been created and published.
anyone can help a perfview installation question? while following the doc to install the perfview on the pcf VM: https://github.com/microsoft/perfview/blob/main/src/perfcollect/perfcollect the installation was failed with:
ERROR: DKMS version is too old and lttng-modules-dkms was not built with legacy DKMS support. You must either rebuild lttng-modules-dkms with legacy postinst support or upgrade DKMS to a more current version. dpkg: error processing package lttng-modules-dkms (--configure): subprocess installed post-installation script returned error exit status 1
asked the customer to install the latest DKMS, and got the feedback from VMware support:
they do not have any support for dkms v2.8+. "R&D believe certainly not in xenial stemcells. dkms 2.2 is the highest version available from Canonical for xenial.
any idea to make the perfview to work, here is the full log:
isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# sudo ./perfcollect install Installing perf_event packages. Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-tools-4.15.0-173-generic E: Couldn't find any package by glob 'linux-tools-4.15.0-173-generic' E: Couldn't find any package by regex 'linux-tools-4.15.0-173-generic' E: Unable to locate package linux-cloud-tools-4.15.0-173-generic E: Couldn't find any package by glob 'linux-cloud-tools-4.15.0-173-generic' E: Couldn't find any package by regex 'linux-cloud-tools-4.15.0-173-generic' Installing LTTng packages. Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: babeltrace liblttng-ctl0 liblttng-ust-ctl2 liburcu4 The following NEW packages will be installed: babeltrace liblttng-ctl0 liblttng-ust-ctl2 liblttng-ust0 liburcu4 lttng-modules-dkms lttng-tools 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 1,069 kB of archives. After this operation, 6,418 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 babeltrace amd64 1.3.2-1 [25.3 kB] Get:2 http://archive.ubuntu.com/ubuntu xenial/universe amd64 liburcu4 amd64 0.9.1-3 [47.3 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 liblttng-ctl0 amd64 2.7.1-2ubuntu1 [84.2 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial/universe amd64 liblttng-ust-ctl2 amd64 2.7.1-1 [72.2 kB] Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 liblttng-ust0 amd64 2.7.1-1 [127 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 lttng-modules-dkms all 2.8.0-1ubuntu1~16.04.9 [273 kB] Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 lttng-tools amd64 2.7.1-2ubuntu1 [439 kB] Fetched 1,069 kB in 0s (1,278 kB/s) Selecting previously unselected package babeltrace. (Reading database ... 61430 files and directories currently installed.) Preparing to unpack .../babeltrace_1.3.2-1_amd64.deb ... Unpacking babeltrace (1.3.2-1) ... Selecting previously unselected package liburcu4:amd64. Preparing to unpack .../liburcu4_0.9.1-3_amd64.deb ... Unpacking liburcu4:amd64 (0.9.1-3) ... Selecting previously unselected package liblttng-ctl0:amd64. Preparing to unpack .../liblttng-ctl0_2.7.1-2ubuntu1_amd64.deb ... Unpacking liblttng-ctl0:amd64 (2.7.1-2ubuntu1) ... Selecting previously unselected package liblttng-ust-ctl2:amd64. Preparing to unpack .../liblttng-ust-ctl2_2.7.1-1_amd64.deb ... Unpacking liblttng-ust-ctl2:amd64 (2.7.1-1) ... Selecting previously unselected package liblttng-ust0:amd64. Preparing to unpack .../liblttng-ust0_2.7.1-1_amd64.deb ... Unpacking liblttng-ust0:amd64 (2.7.1-1) ... Selecting previously unselected package lttng-modules-dkms. Preparing to unpack .../lttng-modules-dkms_2.8.0-1ubuntu1~16.04.9_all.deb ... Unpacking lttng-modules-dkms (2.8.0-1ubuntu1~16.04.9) ... Selecting previously unselected package lttng-tools. Preparing to unpack .../lttng-tools_2.7.1-2ubuntu1_amd64.deb ... Unpacking lttng-tools (2.7.1-2ubuntu1) ... Processing triggers for man-db (2.7.5-1ubuntu0.1~esm1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3+esm1) ... Processing triggers for systemd (229-4ubuntu21.31+esm1) ... Processing triggers for ureadahead (0.100.0-19.1) ... Setting up babeltrace (1.3.2-1) ... Setting up liburcu4:amd64 (0.9.1-3) ... Setting up liblttng-ctl0:amd64 (2.7.1-2ubuntu1) ... Setting up liblttng-ust-ctl2:amd64 (2.7.1-1) ... Setting up liblttng-ust0:amd64 (2.7.1-1) ... Setting up lttng-modules-dkms (2.8.0-1ubuntu1~16.04.9) ... ERROR: DKMS version is too old and lttng-modules-dkms was not built with legacy DKMS support. You must either rebuild lttng-modules-dkms with legacy postinst support or upgrade DKMS to a more current version. dpkg: error processing package lttng-modules-dkms (--configure): subprocess installed post-installation script returned error exit status 1 Setting up lttng-tools (2.7.1-2ubuntu1) ... Processing triggers for libc-bin (2.23-0ubuntu11.3+esm1) ... Processing triggers for systemd (229-4ubuntu21.31+esm1) ... Processing triggers for ureadahead (0.100.0-19.1) ... Errors were encountered while processing: lttng-modules-dkms E: Sub-process /usr/bin/dpkg returned an error code (1) isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~# sudo ./perfcollect collect tracewithagent Perf not installed. Run ./perfcollect install or install perf manually. isolated_diego_cell_oneagent/262e785a-e654-44c2-ae4e-5613ba7dd89c:~