Project

General

Profile

Actions

Bug #895

closed

KVM events are not available, probe modules is silently not loading

Added by Francis Giraldeau over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/22/2015
Due date:
% Done:

100%

Estimated time:

Description

The lttng-probe-kvm and lttng-probe-kvm-x86 had the same TRACE_SYSTEM string. Because of that, both modules can't be loaded at the same time. The second module fails to load silently. This patch rename the TRACE_SYSTEM of lttng-probe-kvm-x86 to avoid the clash.

I confirm the bug with the master branch of lttng-modules and kernel 4.1. Here is the steps to reproduce:

#!/bin/sh

# stop sessiond daemon to remove all lttng modules
sudo service lttng-sessiond stop

# load the  kvm probe, then kvm-x86, which have the same TRACE_SYSTEM string
sudo modprobe lttng-probe-kvm
sudo modprobe lttng-probe-kvm-x86

test -n "$(lsmod | grep "lttng_probe_kvm ")" && echo "module lttng_probe_kvm loaded" || echo "module lttng_probe_kvm failed to load" 
test -n "$(lsmod | grep "lttng_probe_kvm_x86 ")" && echo "module lttng_probe_kvm_x86 loaded" || echo "module lttng_probe_kvm_x86 failed to load" 

# start the service to query available events
sudo service lttng-sessiond start

# broken synchronization, but that should be enough for the sessiond to start
sleep 2

# test if the kvm_entry event is available (included in the lttng-probe-kvm-x86 probe)
test -n "$(lttng list -k | grep kvm_entry)" && echo "PASS kvm_entry available" || echo "FAIL kvm_entry not available" 

The attached patch solves the issue. Here is the output of the above script without the patch:

 ./test.sh   
lttng-sessiond stop/waiting
module lttng_probe_kvm loaded
module lttng_probe_kvm_x86 failed to load
lttng-sessiond start/running, process 2179
FAIL kvm_entry not available

And here is the output with the patch:

$ ./test.sh 
lttng-sessiond stop/waiting
module lttng_probe_kvm loaded
module lttng_probe_kvm_x86 loaded
lttng-sessiond start/running, process 3325
PASS kvm_entry available

The patch does not changes the event names, such that _MAP macros is not necessary for event name backward compatibility.


Files

Actions

Also available in: Atom PDF