<div dir="ltr"><div>Hello Kienan,<br><br>I've continued investigating my issue and discovered something new that might shed some light. Here's the rundown:<br><br>1. To ensure my add-ons weren't causing problems, deleted all old modules and I followed the documentation on the LTTng website (<a href="https://lttng.org/docs/v2.13/#doc-building-from-source">https://lttng.org/docs/v2.13/#doc-building-from-source</a>) and downloaded `lttng-modules-2.13.13`.<br><br>2. Inside the downloaded folder, I successfully executed `make KERNELDIR=/usr/src/linux-source-6.5.0` without any issues.<br><br>3. Subsequently, I ran `make KERNELDIR=/usr/src/linux-source-6.5.0 modules_install`, which also completed successfully.<br><br>4. After that, I updated the module dependencies using `sudo depmod -a`, which went fine.<br><br>However, when I tried to load a module, such as `sudo modprobe lttng-probe-kvm`, it reported that the module couldn't be found at `/lib/modules/6.5.0-41-generic/`. Upon checking the logs, I confirmed that step 3 had installed the modules in `/lib/modules/6.5.0/`.<br><br>To address this, I modified step 3 to simply `make modules_install`, which then installed the modules correctly at `/lib/modules/6.5.0-41-generic/` and ran again step 4. But now, when attempting to load a module, I'm encountering the error `modprobe: ERROR: could not insert 'lttng_probe_kvm': Exec format error`.<br><br>Do you have any insights or ideas on what might be causing this issue?<br><br>Thanks again for your assistance.<br></div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 16 juill. 2024, à 09 h 05, 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/15/24 6:10 PM, François Belias via lttng-dev wrote:<br>
> Hello,<br>
> <br>
> I'm currently running Linux kernel version 6.5.0-41-generic and <br>
> attempting to install LTTng from source. Here are the steps I followed:<br>
> <br>
>   - I cloned the LTTng git repository to my computer from <br>
> [<a href="https://github.com/lttng/lttng-modules.git%5D(https://github.com/lttng/lttng-modules.git)" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-modules.git](https://github.com/lttng/lttng-modules.git)</a> <<a href="https://github.com/lttng/lttng-modules.git%5D(https://github.com/lttng/lttng-modules.git)" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-modules.git](https://github.com/lttng/lttng-modules.git)</a>>.<br>
> - Downloaded the kernel source tree corresponding to my kernel version <br>
> to enable compilation.<br>
> - Executed `make KERNELDIR=/path/to/my/linux/source`, which was <br>
> completed successfully.<br>
> - Ran `make KERNELDIR=/path/to/my/linux/source modules_install`, also <br>
> without any issues.<br>
> - Finally, I executed `sudo depmod -a`, which was completed successfully.<br>
> <br>
> However, when I attempt to load a module with commands like `sudo <br>
> modprobe lttng-ketprobes` or "sudo modprobe lttng-tracer", I encounter <br>
> the following errors:<br>
> <br>
> - For `lttng-ketprobes`: `modprobe: FATAL: Module lttng-ketprobes not <br>
> found in directory /lib/modules/6.5.0-41-generic`.<br>
> - For `lttng-tracer`: `modprobe: ERROR: could not insert 'lttng_tracer': <br>
> Exec format error`.<br>
<br>
If you rebuilt modules on the master branch as of yesterday you may need <br>
to clean the LTTng modules install directory, rebuild, and reinstall.<br>
<br>
This is due to kprobes, kretprobes, and uprobes modules being included <br>
in the tracer core module. C.f. <br>
<a href="https://github.com/lttng/lttng-modules/commit/0c2c6606eb66cb5222ab7a2a4f8329fd5dfdef70" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-modules/commit/0c2c6606eb66cb5222ab7a2a4f8329fd5dfdef70</a><br>
<br>
You may want to stick with running lttng-modules 2.13.x which will not <br>
have breaking changes merged in.<br>
<br>
The exec format error also could be due to modules that are installed <br>
but built against a different version of the Linux kernel.<br>
<br>
A few things to check<br>
<br>
- If your kernel has been upgraded recently, ensure the new kernel is <br>
the one actually running<br>
- If the modules haven't been rebuilt since the upgrade, they should be <br>
rebuilt and reinstalled<br>
- As I recall, you are playing around with some addon modules - do any <br>
of those modules define dependencies on the kprobes, kretprobes, or <br>
uprobes modules which now are no longer produced by builds of the master <br>
branch<br>
<br>
Is there further information in dmesg or journalctl regarding the module <br>
loading?<br>
<br>
hope this helps.<br>
<br>
thanks,<br>
kienan<br>
<br>
> <br>
> I've confirmed that the modules exist but can't load them. I'm unsure <br>
> how to resolve these issues. Could someone please assist me?<br>
> <br>
> Thank you.<br>
> <br>
> _______________________________________________<br>
> lttng-dev mailing list<br>
> <a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br>
> <a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</blockquote></div>