<div dir="ltr">Hello Kienan,<br><br>Thanks to your advice, I managed to load some modules. However, I encountered errors like these when running `dmesg | grep lttng`:<br><br>```<br>[ 218.043672] module lttng_kretprobes: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time<br>[ 650.560883] lttng_kretprobes: module verification failed: signature and/or required key missing - tainting kernel<br>[ 1468.329988] module lttng_ring_buffer_client_discard: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time<br>```<br><br>I'm unsure of their meaning. After loading my module, how can I be certain that my tracepoints are active? I read online that people use `sudo lttng list -k` for this purpose, but when I tried it, I got the error: "Error: Unable to list kernel events: Kernel tracer not available". Is there another way?<br><br>Thank you for your assistance.<br><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 17 juill. 2024, à 12 h 08, Kienan Stewart <<a href="mailto:kstewart@efficios.com">kstewart@efficios.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi François,<br>
<br>
On 7/17/24 11:47 AM, François Belias wrote:<br>
> Hello, Kienan<br>
> <br>
> <br>
> *Right. Which kernel are you actually running at this time? You can check<br>
> using: `uname -a`*<br>
> Linux philippe 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC <br>
> Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux<br>
> <br>
> *Since you've got a few different images and headers installed, it is<br>
> possible to check that same info the linux-source package: `dpkg -l |<br>
> grep linux-source`.*<br>
> ii linux-source 5.15.0.116.116 <br>
> all Linux kernel source with <br>
> Ubuntu patches<br>
> ii linux-source-5.15.0 5.15.0-116.126 <br>
> all Linux kernel source for version <br>
> 5.15.0 with Ubuntu patches<br>
> ii linux-source-6.5.0 6.5.0-44.44~22.04.1 <br>
> all Linux kernel source for version <br>
<br>
Your currently running `6.5.0-41-generic #41~22.04.2-Ubuntu`<br>
<br>
You have source installed for `6.5.0-44.44~22.04.1`. From your previous <br>
e-mail, there is also a linux image installed:<br>
<br>
```<br>
linux-image-6.5.0-44-generic 6.5.0-44.44~22.04.1<br>
```<br>
<br>
Assuming you are using grub, could you verify that one of the options <br>
for booting in `/boot/grub/grub.cfg` is linux 6.5.0-44.44. Look for the <br>
lines similar to the following inside a menu entry block:<br>
<br>
(Note my example is 5.15.0-116, but you will be lookng for 6.5.0-44 or <br>
6.5.0-44.44)<br>
<br>
```<br>
linux /boot/vmlinuz-5.15.0-116-generic root=....<br>
initrd /boot/initrd.img-5.15.0-116-generic<br>
```<br>
<br>
If you have a grub entry for linux 6.5.0-44.44, could you reboot to run <br>
on the linux 6.5.0-44.44.<br>
<br>
After rebooting verify with `uname -a` that your kernel version is <br>
6.5.0-44.44.<br>
<br>
Make sure you have unpacked the linux sources:<br>
<br>
```<br>
# Approximating the version numbers, since I don't have 6.5.0 installed<br>
cd /usr/src/linux-source-6.5.0<br>
bunzip2 linux-source-6.5.0.tar.bz2<br>
tar -xf linux-source-6.5.0.tar<br>
```<br>
<br>
Then retry the build with <br>
`KERNELDIR=/usr/src/linux-source-6.5.0/linux-source-6.5.0/`<br>
<br>
I haven't personally tried the full steps on an Ubuntu installation so <br>
you may still need to tweak a couple of things, but I think this should <br>
get you on the right path.<br>
<br>
Really the important thing is to make sure that the kernel source code <br>
matches the kernel you are running.<br>
<br>
> 6.5.0 with Ubuntu patches<br>
> *Could you run either `apt-cache policy` or `apt policy` and `apt-mark<br>
> showhold` in order to know which sources you have configured.*<br>
> For this part, /*apt-mark showhold*/ gave me nothing I don't know what <br>
> is means.<br>
<br>
`apt-mark showhold` will show any packages that are on hold - it is a <br>
way of marking packages that shouldn't be updated.<br>
<br>
As you have the linux-source for 6.5.0-44.44~22.04.1, I don't think it <br>
will be necessary to have the output of `apt-cache policy`.<br>
<br>
thanks,<br>
kienan<br>
<br>
> <br>
> I am looking at the links, but nothing seems to match my kernel version.<br>
> <br>
> Thanks for your assistance.<br>
> <br>
> Le mer. 17 juill. 2024, à 11 h 46, François Belias <br>
> <<a href="mailto:beliasossim@gmail.com" target="_blank">beliasossim@gmail.com</a> <mailto:<a href="mailto:beliasossim@gmail.com" target="_blank">beliasossim@gmail.com</a>>> a écrit :<br>
> <br>
> Hello, Kienan<br>
> <br>
> <br>
> *Right. Which kernel are you actually running at this time? You can<br>
> check<br>
> using: `uname -a`*<br>
> Linux philippe 6.5.0-41-generic #41~22.04.2-Ubuntu SMP<br>
> PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux<br>
> <br>
> *Since you've got a few different images and headers installed, it is<br>
> possible to check that same info the linux-source package: `dpkg -l |<br>
> grep linux-source`.*<br>
> ii linux-source 5.15.0.116.116 <br>
> all Linux kernel source<br>
> with Ubuntu patches<br>
> ii linux-source-5.15.0 5.15.0-116.126 <br>
> all Linux kernel source for<br>
> version 5.15.0 with Ubuntu patches<br>
> ii linux-source-6.5.0 6.5.0-44.44~22.04.1 <br>
> all Linux kernel source for<br>
> version 6.5.0 with Ubuntu patches<br>
> *Could you run either `apt-cache policy` or `apt policy` and `apt-mark<br>
> showhold` in order to know which sources you have configured.*<br>
> For this part, /*apt-mark showhold*/ gave me nothing I don't know<br>
> what is means.<br>
> <br>
> I am looking at the links, but nothing seems to match my kernel<br>
> version.<br>
> <br>
> Thanks for your assistance.<br>
> <br>
> Le mer. 17 juill. 2024, à 10 h 55, Kienan Stewart<br>
> <<a href="mailto:kstewart@efficios.com" target="_blank">kstewart@efficios.com</a> <mailto:<a href="mailto:kstewart@efficios.com" target="_blank">kstewart@efficios.com</a>>> a écrit :<br>
> <br>
> Hi François,<br>
> <br>
> On 7/16/24 4:34 PM, François Belias wrote:<br>
> > Hello Kienan,<br>
> ><br>
> > When I proceed with the following steps:<br>
> ><br>
> > ```<br>
> > # Warning: this removes all untracked content from the<br>
> lttng-modules<br>
> > directory<br>
> > cd /path/to/lttng-modules-source<br>
> > git clean -dxf<br>
> ><br>
> > make<br>
> > sudo make modules_install<br>
> > sudo depmod -a<br>
> > ```<br>
> ><br>
> > I encounter a warning in<br>
> > `/home/philippe/lttng-modules/src/probes/Kbuild:79` stating<br>
> "File<br>
> > ./arch/x86/kvm/lapic.h not found. Probe 'kvm' x86-specific is<br>
> disabled.<br>
> > Use full kernel source tree to enable it." Although<br>
> everything compiles<br>
> > fine and I'm able to load modules, when I execute `sudo lttng<br>
> list -k`,<br>
> > I don't see the tracepoints `kvm_entry` and `kvm_exit`, which<br>
> I believe<br>
> > should be available. Could this be due to not using my full<br>
> kernel tree<br>
> > during compilation?<br>
> <br>
> <br>
> Exactly. Those probes depend on having the full kernel source as<br>
> they<br>
> require private headers which aren't shipped as part of the<br>
> `linux-headers` package.<br>
> <br>
> ><br>
> > Here are the answers to your questions:<br>
> ><br>
> > - *Where did `/usr/src/linux-source-6.5.0` come from?*<br>
> > I initially attempted `sudo apt-get update && sudo apt-get<br>
> install<br>
> > linux-source`, but it gave me this answer */linux-source is<br>
> already the<br>
> > newest version (5.15.0.116.116)/*`, which doesn't match my<br>
> current<br>
> > kernel version. So, I downloaded it directly from <a href="http://kernel.org" rel="noreferrer" target="_blank">kernel.org</a><br>
> <<a href="http://kernel.org" rel="noreferrer" target="_blank">http://kernel.org</a>><br>
> > <<a href="http://kernel.org" rel="noreferrer" target="_blank">http://kernel.org</a> <<a href="http://kernel.org" rel="noreferrer" target="_blank">http://kernel.org</a>>> using this command:<br>
> `wget<br>
> ><br>
> <a href="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz" rel="noreferrer" target="_blank">https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz`</a><br>
> <<a href="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz" rel="noreferrer" target="_blank">https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz</a>><br>
> ><br>
> <<a href="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz" rel="noreferrer" target="_blank">https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz`</a><br>
> <<a href="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz" rel="noreferrer" target="_blank">https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz</a>>>.<br>
> ><br>
> <br>
> Right. Which kernel are you actually running at this time? You<br>
> can check<br>
> using: `uname -a`<br>
> <br>
> In any case, Linux upstream 6.5 is not the same as Ubuntus's 6.5.<br>
> <br>
> > - *Which Linux distribution and version are you using?*<br>
> > Running `lsb_release -a` gives me:<br>
> > ```<br>
> > No LSB modules are available.<br>
> > Distributor ID: Ubuntu<br>
> > Description: Ubuntu 22.04.4 LTS<br>
> > Release: 22.04<br>
> > Codename: jammy<br>
> > ```<br>
> ><br>
> > - *Assuming your distribution has kernel packages, which do<br>
> you have<br>
> > installed, and do you have the corresponding kernel headers<br>
> package<br>
> > installed?*<br>
> ><br>
> > Running `dpkg -l | grep linux-image` shows these installed<br>
> packages:<br>
> > ```<br>
> > ii linux-image-5.15.0-116-generic 5.15.0-116.126<br>
> > amd64 Signed kernel image generic<br>
> > ii linux-image-6.5.0-28-generic <br>
> 6.5.0-28.29~22.04.1<br>
> > amd64 Signed kernel image generic<br>
> > ii linux-image-6.5.0-41-generic <br>
> 6.5.0-41.41~22.04.2<br>
> > amd64 Signed kernel image generic<br>
> > ii linux-image-6.5.0-44-generic <br>
> 6.5.0-44.44~22.04.1<br>
> > amd64 Signed kernel image generic<br>
> > ii linux-image-generic 5.15.0.116.116<br>
> > amd64 Generic Linux kernel image<br>
> > ii linux-image-generic-hwe-22.04 <br>
> 6.5.0.44.44~22.04.1<br>
> > amd64 Generic Linux kernel image<br>
> > ```<br>
> ><br>
> > And `dpkg -l | grep linux-headers` shows these installed<br>
> header packages:<br>
> > ```<br>
> > ii linux-headers-5.15.0-116 <br>
> 5.15.0-116.126 all<br>
> > Header files related to Linux kernel version 5.15.0<br>
> > ii linux-headers-5.15.0-116-generic 5.15.0-116.126<br>
> > amd64 Linux kernel headers for version 5.15.0 on 64 bit<br>
> x86 SMP<br>
> > ii linux-headers-6.5.0-28-generic <br>
> 6.5.0-28.29~22.04.1<br>
> > amd64 Linux kernel headers for version 6.5.0 on 64 bit<br>
> x86 SMP<br>
> > ii linux-headers-6.5.0-41-generic <br>
> 6.5.0-41.41~22.04.2<br>
> > amd64 Linux kernel headers for version 6.5.0 on 64 bit<br>
> x86 SMP<br>
> > ii linux-headers-6.5.0-44-generic <br>
> 6.5.0-44.44~22.04.1<br>
> > amd64 Linux kernel headers for version 6.5.0 on 64 bit<br>
> x86 SMP<br>
> > ii linux-headers-generic 5.15.0.116.116<br>
> > amd64 Generic Linux kernel headers<br>
> > ii linux-headers-generic-hwe-22.04 <br>
> 6.5.0.44.44~22.04.1<br>
> > amd64 Generic Linux kernel headers<br>
> > ```<br>
> ><br>
> <br>
> Since you've got a few different images and headers installed,<br>
> it is<br>
> possible to check that same info the linux-source package: `dpkg<br>
> -l |<br>
> grep linux-source`.<br>
> <br>
> Maybe one thing tripping this process up is that you don't have<br>
> an apt<br>
> source that provides linux-source that matches the kernel you<br>
> are using.<br>
> Could you run either `apt-cache policy` or `apt policy` and<br>
> `apt-mark<br>
> showhold` in order to know which sources you have configured.<br>
> <br>
> There are also alternative sources for the full source tree:<br>
> <br>
> - You could download the specific package from<br>
> <a href="http://packages.ubuntu.com" rel="noreferrer" target="_blank">packages.ubuntu.com</a> <<a href="http://packages.ubuntu.com" rel="noreferrer" target="_blank">http://packages.ubuntu.com</a>>. See<br>
> <a href="https://packages.ubuntu.com" rel="noreferrer" target="_blank">https://packages.ubuntu.com</a> <<a href="https://packages.ubuntu.com" rel="noreferrer" target="_blank">https://packages.ubuntu.com</a>> and<br>
> use `apt install ./downloaded_package.deb`<br>
> <br>
> - You could clone the kernel source for Ubuntu and checkout the<br>
> appropriate tag. See<br>
> <a href="https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/refs/tags" rel="noreferrer" target="_blank">https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/refs/tags</a> <<a href="https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/refs/tags" rel="noreferrer" target="_blank">https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/refs/tags</a>><br>
> <br>
> thanks,<br>
> kienan<br>
> <br>
</blockquote></div>