Hi Benjamin,

On Wed, Jan 08, 2020 at 09:24:30AM +0900, Benjamin Poirier wrote:
[...]
> Looks like the modules are built before lttng-sessiond is started:
>       Setting up lttng-modules-dkms (2.11.0-2) ...
>       Loading new lttng-modules-2.11.0 DKMS files...
>       Building for 5.4.0-2-amd64
>       Building initial module for 5.4.0-2-amd64
>       Done.
> 
>       lttng-lib-ring-buffer.ko:
>       Running module version sanity check.
>        - Original module
>          - No original module exists within this kernel
>        - Installation
>          - Installing to /lib/modules/5.4.0-2-amd64/updates/dkms/
> 
>       [...]
> 
>       depmod...
> 
>       DKMS: install completed.
>       Setting up linux-headers-5.4.0-2-amd64 (5.4.8-1) ...
>       /etc/kernel/header_postinst.d/dkms:
>       dkms: running auto installation service for kernel 5.4.0-2-amd64:.
>       Setting up sudo (1.8.29-1) ...
>       Setting up babeltrace (1.5.7-2) ...
>       Setting up liburcu6:amd64 (0.11.1-2) ...
>       Setting up linux-headers-amd64 (5.4.8-1) ...
>       Setting up liblttng-ctl0:amd64 (2.11.0-3) ...
>       Setting up lttng-tools (2.11.0-3) ...
> 
> Still, it doesn't work.
> 
> > Simply restarting the sessiond should fix this.
> 
> I tried restarting lttng-sessiond or rebooting the machine but it was no
> help, lttng-sessiond always reports:
>       Error: Failed to load kmod library resources
>       Warning: No kernel tracer available
> 
> A quick look into the code shows that is:
> src/bin/lttng-sessiond/modprobe.c
>       kmod_set_log_fn(*ctx, log_kmod, NULL);
>       ret = kmod_load_resources(*ctx);
>       if (ret < 0) {
>               ERR("Failed to load kmod library resources");
>               goto error;
>       }
> 
> I didn't dig into libkmod, but I noticed (using opensnoop.bt) the
> following:
>       8071   lttng-sessiond      2   0 
> /lib/modules/5.4.0-2-amd64/modules.dep.bin
>       8071   lttng-sessiond      2   0 
> /lib/modules/5.4.0-2-amd64/modules.alias.bin
>       8071   lttng-sessiond      2   0 
> /lib/modules/5.4.0-2-amd64/modules.symbols.bin
>       8071   lttng-sessiond      2   0 
> /lib/modules/5.4.0-2-amd64/modules.builtin.alias.bin
> 
> On another machine which I haven't yet updated and where lttng still
> works, I see:
>       193519 lttng-sessiond      2   0 
> /lib/modules/5.4.0-1-amd64/modules.dep.bin
>       193519 lttng-sessiond      2   0 
> /lib/modules/5.4.0-1-amd64/modules.alias.bin
>       193519 lttng-sessiond      2   0 
> /lib/modules/5.4.0-1-amd64/modules.symbols.bin
>       193519 lttng-sessiond      2   0 
> /lib/modules/5.4.0-1-amd64/modules.builtin.bin
> 
> Not sure if /lib/modules/5.4.0-2-amd64/modules.builtin.alias.bin is
> relevant but it's an empty file...
> 
> After downgrading libkmod2 from
>       Version: 26+20191223-1
> to
>       Version: 26-3
> the issue with lttng is no longer apparent:
>       root@vsid:/tmp# lttng list --kernel
>       Kernel events:
>       -------------
>             asoc_snd_soc_bias_level_start (loglevel: TRACE_EMERG (0)) (type: 
> tracepoint)
>             asoc_snd_soc_bias_level_done (loglevel: TRACE_EMERG (0)) (type: 
> tracepoint)
>             asoc_snd_soc_dapm_start (loglevel: TRACE_EMERG (0)) (type: 
> tracepoint)
>       [...] 
> 

Should we track this in a separate bug from #948257?

Regards,
Salvatore

Reply via email to