Bug 12800

Summary: [YP 2.5 Kernel 4.14-RT and and meta-intel9] Shows error on lttng modules timer instrumentation for 4.14 -rt kernel
Product: [Build System, Metadata & Runtime] BSPs Reporter: Surya <surya.narayanx.pradhan>
Component: bsps-meta-intelAssignee: Armin Kuster <akuster>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: anuj.mittal, richard.purdie
Version: 2.5.1   
Target Milestone: 2.5.2   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Patches to solve lttng-modules error for kernel 4.14-rt.
none
lttng-modules_%.bbappend file to apply patches to solve error for kernel 4.9 & 4.14-rt none

Description Surya 2018-06-20 05:45:45 UTC
Lttng-modules v2.10.5 shows timer instrumentation error during build with kernel Linux-intel-4.14-rt. 

IMAGE:

YP 2.5 Kernel 4.14-RT and and meta-intel9.0 )

BOARD INFO :

Saddle Brook(Skylake) Platform
Processor Family: Intel x86-64
BIOS File:H_CSBKG007_00_16M_SDLBRK_Dx_Production.bin

DEFECT BEHAVIOR:

 
 from /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/lttng-probe-timer.c:43:
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/../probes/lttng-tracepoint-event-impl.h:142:6: error: conflicting types for 'trace_hrtimer_start'
|  void trace_##_name(_proto);
|       ^
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/../probes/lttng-tracepoint-event-impl.h:54:2: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP'
|   LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args))
|   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/../instrumentation/events/lttng-module/timer.h:163:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_MAP'
|  LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
|  ^~~~~~~~~~~~~~~~~~~~~~~~~~
| In file included from /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-source/include/trace/events/timer.h:8:0,
|                  from /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/lttng-probe-timer.c:32:
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-source/include/linux/tracepoint.h:187:21: note: previous definition of 'trace_hrtimer_start' was here
|   static inline void trace_##name(proto)    \
|                      ^
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-source/include/linux/tracepoint.h:352:2: note: in expansion of macro '__DECLARE_TRACE'
|   __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
|   ^~~~~~~~~~~~~~~
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-source/include/linux/tracepoint.h:488:2: note: in expansion of macro 'DECLARE_TRACE'
|   DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
|   ^~~~~~~~~~~~~
| /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-source/include/trace/events/timer.h:191:1: note: in expansion of macro 'TRACE_EVENT'
|  TRACE_EVENT(hrtimer_start,
|  ^~~~~~~~~~~
|   CC [M]  /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/lib/prio_heap/lttng_prio_heap.o
|   CC [M]  /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/lttng-probe-statedump.o
| make[4]: *** [/home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes/lttng-probe-timer.o] Error 1
| make[4]: *** Waiting for unfinished jobs....
|   CC [M]  /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/lib/../wrapper/splice.o
|   LD [M]  /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/lib/lttng-lib-ring-buffer.o
| make[4]: *** wait: No child processes.  Stop.
| make[3]: *** [/home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5/probes] Error 2
| make[3]: *** Waiting for unfinished jobs....
| make[2]: *** [_module_/home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/lttng-modules-2.10.5] Error 2
| make[2]: Leaving directory `/home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-build-artifacts'
| make[1]: *** [sub-make] Error 2
| make[1]: Leaving directory `/home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work-shared/intel-corei7-64/kernel-source'
| make: *** [modules] Error 2
| ERROR: oe_runmake failed
| WARNING: /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/temp/run.do_compile.18894:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /home/ilab/skylake-2.5sumo/yocto_build/build/tmp/work/intel_corei7_64-poky-linux/lttng-modules/2.10.5-r0/temp/log.do_compile.18894)
Comment 1 Surya 2018-06-20 05:59:08 UTC
To reproduce the error please use below settings in local.conf 

MACHINE = "intel-corei7-64"

PREFERRED_PROVIDER_virtual/kernel = "linux-intel-rt"
PREFERRED_VERSION_linux-intel-rt = "4.14%"

Now try to compile kernel using bitbake commands.
Comment 2 Surya 2018-06-20 06:00:44 UTC
To reproduce the error please use below settings in local.conf 

MACHINE = "intel-corei7-64"

PREFERRED_PROVIDER_virtual/kernel = "linux-intel-rt"
PREFERRED_VERSION_linux-intel-rt = "4.14%"

Now try to compile kernel using bitbake commands.
Comment 3 Surya 2018-06-20 06:03:31 UTC
To reproduce the issue please use below settings in local.conf

MACHINE = "intel-corei7-64"

PREFERRED_PROVIDER_virtual/kernel = "linux-intel-rt"
PREFERRED_VERSION_linux-intel-rt = "4.14%"
Comment 4 Surya 2018-06-20 06:13:29 UTC
Created attachment 4330 [details]
Patches to solve lttng-modules error for kernel 4.14-rt.

This patch will solve lttng-modules timer instrumentation issues for kernel 4.14-rt.
Comment 5 Surya 2018-06-20 06:18:57 UTC
Created attachment 4331 [details]
lttng-modules_%.bbappend file to apply patches to solve error for kernel 4.9 & 4.14-rt


This lttng-modules_%.bbappend file can be used to apply patches to solve error with kernel Linux-intel-4.9-rt & 4.14-rt
Comment 6 Anuj Mittal 2018-06-21 02:27:49 UTC
2.10.6 upgrade has the fix for build failure with 4.14 rt kernel. So, this should be fixed when that upgrade is merged in master/sumo. 

In the meantime, please try with meta-intel master that backports the commit fixing this.
Comment 7 Richard Purdie 2018-06-21 14:51:09 UTC
Master fixed in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5f12e1841af2195e7a1fa6d4deab4415245cd2be reassign to Armin for backport to sumo
Comment 8 Armin Kuster 2018-06-21 15:42:25 UTC
backport and in stable/sumo-nmut for building
Comment 9 Armin Kuster 2018-06-22 20:27:48 UTC
passed build. in stable/sumo-next
Comment 11 Armin Kuster 2018-09-24 18:16:21 UTC
.