Re: Kernel tracing from inside a Docker container

Michael Jeanson via lttng-dev <[email protected]> Thu, 7 Nov 2024 11:16:14 -0500
Newsgroups org.lttng.lists.lttng-dev
Message-ID <[email protected]>
On 2024-11-07 11:00, Dirk Eibach via lttng-dev wrote:
> Hi,
> 
> I guess I found it! The kernel module files have to be present under
> /lib/modules inside the container, even when they are already loaded
> on the host side.
> After putting them there, everything works fine and I finally can
> record kernel events.
> 
> Thank you so much for your support.

I just looked at the code that loads the modules and we do fail early
if libkmod fails to initialize. I think we could just print a warning
there instead and still try to open '/proc/lttng' and then fail if it's
not present.