[lttng-dev] loading modules with modprobe

Kienan Stewart kstewart at efficios.com
Tue Jul 16 09:05:13 EDT 2024


Hi François,

On 7/15/24 6:10 PM, François Belias via lttng-dev wrote:
> Hello,
> 
> I'm currently running Linux kernel version 6.5.0-41-generic and 
> attempting to install LTTng from source. Here are the steps I followed:
> 
>   - I cloned the LTTng git repository to my computer from 
> [https://github.com/lttng/lttng-modules.git](https://github.com/lttng/lttng-modules.git) <https://github.com/lttng/lttng-modules.git](https://github.com/lttng/lttng-modules.git)>.
> - Downloaded the kernel source tree corresponding to my kernel version 
> to enable compilation.
> - Executed `make KERNELDIR=/path/to/my/linux/source`, which was 
> completed successfully.
> - Ran `make KERNELDIR=/path/to/my/linux/source modules_install`, also 
> without any issues.
> - Finally, I executed `sudo depmod -a`, which was completed successfully.
> 
> However, when I attempt to load a module with commands like `sudo 
> modprobe lttng-ketprobes` or "sudo modprobe lttng-tracer", I encounter 
> the following errors:
> 
> - For `lttng-ketprobes`: `modprobe: FATAL: Module lttng-ketprobes not 
> found in directory /lib/modules/6.5.0-41-generic`.
> - For `lttng-tracer`: `modprobe: ERROR: could not insert 'lttng_tracer': 
> Exec format error`.

If you rebuilt modules on the master branch as of yesterday you may need 
to clean the LTTng modules install directory, rebuild, and reinstall.

This is due to kprobes, kretprobes, and uprobes modules being included 
in the tracer core module. C.f. 
https://github.com/lttng/lttng-modules/commit/0c2c6606eb66cb5222ab7a2a4f8329fd5dfdef70

You may want to stick with running lttng-modules 2.13.x which will not 
have breaking changes merged in.

The exec format error also could be due to modules that are installed 
but built against a different version of the Linux kernel.

A few things to check

- If your kernel has been upgraded recently, ensure the new kernel is 
the one actually running
- If the modules haven't been rebuilt since the upgrade, they should be 
rebuilt and reinstalled
- As I recall, you are playing around with some addon modules - do any 
of those modules define dependencies on the kprobes, kretprobes, or 
uprobes modules which now are no longer produced by builds of the master 
branch

Is there further information in dmesg or journalctl regarding the module 
loading?

hope this helps.

thanks,
kienan

> 
> I've confirmed that the modules exist but can't load them. I'm unsure 
> how to resolve these issues. Could someone please assist me?
> 
> Thank you.
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


More information about the lttng-dev mailing list