Bug 9352

Summary: External modules fail to build when kernel is reused from sstate
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Martin Jansa <Martin.Jansa>
Component: kernelAssignee: Martin Jansa <Martin.Jansa>
Status: RESOLVED FIXED QA Contact: Francisco Pedraza <francisco.j.pedraza.gonzalez>
Severity: normal    
Priority: Medium+ CC: jose.perez.carranza, richard.purdie, tom.zanussi
Version: unspecified   
Target Milestone: 2.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
log.lttng-modules none

Description Martin Jansa 2016-03-29 19:48:16 UTC
It always fails like this:

NOTE: Executing RunQueue Tasks
ERROR: lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0 do_make_scripts: Function failed: do_make_scripts (log file is located at /home/jenkins/oe/world/shr-core/tmp-glibc/work/qemux86-oe-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/log.do_make_scripts.24725)
ERROR: Logfile of failure stored in: /home/jenkins/oe/world/shr-core/tmp-glibc/work/qemux86-oe-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/log.do_make_scripts.24725
Log data follows:
| DEBUG: Executing shell function do_make_scripts
| make: Entering directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-source'
| make[1]: Entering directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-build-artifacts'
|   GEN     ./Makefile
| scripts/kconfig/conf  --silentoldconfig Kconfig
| ***
| *** Configuration file ".config" not found!
| ***
| *** Please run some configurator (e.g. "make oldconfig" or
| *** "make menuconfig" or "make xconfig").
| ***
| make[3]: *** [silentoldconfig] Error 1
| make[2]: *** [silentoldconfig] Error 2
| make[1]: *** No rule to make target `include/config/auto.conf', needed by `scripts'.  Stop.
| make[1]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-build-artifacts'
| make: *** [sub-make] Error 2
| make: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-source'
| WARNING: exit code 2 from a shell command.
| ERROR: Function failed: do_make_scripts (log file is located at /home/jenkins/oe/world/shr-core/tmp-glibc/work/qemux86-oe-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/log.do_make_scripts.24725)
ERROR: Task 6 (/home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_make_scripts) failed with exit code '1'
NOTE: Tasks Summary: Attempted 416 tasks of which 410 didn't need to be rerun and 1 failed.

It might be caused by:
commit 55b4f7fd217f0c65d457c731150340c18fb3fa19
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Thu May 14 10:31:51 2015 +0100

    kernel/rm_work: Improve interaction

As it's broken for months, various do_make_scripts failures were reported in:
http://www.openembedded.org/wiki/Bitbake_World_Status (2016-03-12, 2016-03-09, 2016-03-05, 2016-02-21, 2016-02-14, 2016-02-04, 2016-01-25)

and less often in previous releases
http://www.openembedded.org/wiki/Bitbake_World_Status_Jethro (2015-09-13)
http://www.openembedded.org/wiki/Bitbake_World_Status_Fido (2014-12-30)

$ bitbake -c cleansstate linux-yocto lttng-modules; bitbake -c build lttng-modules
This works fine, but if you do:
$ rm -rf tmp-glibc
$ bitbake -c cleansstate lttng-modules; bitbake linux-yocto | tee; bitbake -c build lttng-modules | tee

Then you'll either see linux-yocto being completely rebuilt or lttng-modules failure like shown above.

I haven't found what conditions decide if it will be rebuilt or fail - now I did many
rebuilds with and without rm_work, with or without tmp-glibc populated and with or without
explicit clensstate before the build.

Middle build:

$ grep linux-yocto tmp-glibc/log/cooker/qemux86/20160329193141.log
NOTE: Running setscene task 3 of 120 (/home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_package_write_ipk_setscene)
NOTE: Running setscene task 4 of 120 (/home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_deploy_setscene)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_package_write_ipk_setscene: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_deploy_setscene: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_deploy_setscene: Succeeded
NOTE: Running setscene task 7 of 120 (/home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_populate_sysroot_setscene)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_package_write_ipk_setscene: Succeeded
NOTE: Running setscene task 8 of 120 (/home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_packagedata_setscene)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_populate_sysroot_setscene: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_packagedata_setscene: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_populate_sysroot_setscene: Succeeded
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_packagedata_setscene: Succeeded
NOTE: Running setscene task 13 of 120 (/home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_package_setscene)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_package_setscene: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_package_setscene: Succeeded
NOTE: Running task 249 of 557 (ID: 6, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_fetch)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_fetch: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_fetch: Succeeded
NOTE: Running task 290 of 557 (ID: 2, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_unpack)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_unpack: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_unpack: Succeeded
NOTE: Running task 532 of 557 (ID: 27, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_checkout)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_checkout: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_checkout: Succeeded
NOTE: Running task 533 of 557 (ID: 0, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_validate_branches)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_validate_branches: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_validate_branches: Succeeded
NOTE: Running task 534 of 557 (ID: 1, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_metadata)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_metadata: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_metadata: Succeeded
NOTE: Running task 535 of 557 (ID: 3, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_patch)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_patch: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_patch: Succeeded
NOTE: Running task 553 of 557 (ID: 16, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_package_qa)
NOTE: Running task 554 of 557 (ID: 14, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_populate_lic)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_populate_lic: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_package_qa: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_populate_lic: Succeeded
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_package_qa: Succeeded
NOTE: Running noexec task 555 of 557 (ID: 17, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_build)
NOTE: Running task 556 of 557 (ID: 18, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_rm_work)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_rm_work: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_rm_work: Succeeded
NOTE: Running task 557 of 557 (ID: 19, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_rm_work_all)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_rm_work_all: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_rm_work_all: Succeeded

3rd build:
NOTE: Executing RunQueue Tasks
NOTE: Running task 185 of 424 (ID: 27, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_fetch)
NOTE: Running task 364 of 424 (ID: 4, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_fetch)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_fetch: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_fetch: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_fetch: Succeeded
NOTE: Running task 390 of 424 (ID: 0, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_unpack)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_fetch: Succeeded
NOTE: Running task 391 of 424 (ID: 23, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_unpack)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_unpack: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_unpack: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_unpack: Succeeded
NOTE: Running task 392 of 424 (ID: 1, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_patch)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_patch: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_patch: Succeeded
NOTE: Running task 393 of 424 (ID: 8, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_populate_lic)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_populate_lic: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_populate_lic: Succeeded
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_unpack: Succeeded
NOTE: Running task 394 of 424 (ID: 43, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_checkout)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_checkout: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_checkout: Succeeded
NOTE: Running task 395 of 424 (ID: 21, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_validate_branches)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_validate_branches: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_validate_branches: Succeeded
NOTE: Running task 396 of 424 (ID: 22, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_metadata)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_metadata: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_metadata: Succeeded
NOTE: Running task 397 of 424 (ID: 24, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_patch)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_patch: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_patch: Succeeded
NOTE: Running task 398 of 424 (ID: 28, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_configme)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_configme: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_configme: Succeeded
NOTE: Running task 399 of 424 (ID: 29, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_configure)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_configure: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_configure: Succeeded
NOTE: Running task 400 of 424 (ID: 30, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_configcheck)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_configcheck: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_configcheck: Succeeded
NOTE: Running task 401 of 424 (ID: 31, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_compile)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_compile: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_compile: Succeeded
NOTE: Running task 402 of 424 (ID: 39, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_shared_workdir)
NOTE: Running task 403 of 424 (ID: 32, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_kernel_link_vmlinux)
NOTE: Running task 404 of 424 (ID: 34, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_uboot_mkimage)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_shared_workdir: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_link_vmlinux: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_uboot_mkimage: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_shared_workdir: Succeeded
NOTE: Running task 405 of 424 (ID: 40, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_compile_kernelmodules)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_kernel_link_vmlinux: Succeeded
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_uboot_mkimage: Succeeded
NOTE: Running task 406 of 424 (ID: 6, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_make_scripts)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_make_scripts: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_compile_kernelmodules: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_make_scripts: Succeeded
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_compile_kernelmodules: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_make_scripts: Succeeded
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_compile_kernelmodules: Succeeded
NOTE: Running task 407 of 424 (ID: 41, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_strip)
NOTE: Running task 408 of 424 (ID: 5, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_configure)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_strip: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_configure: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_strip: Succeeded
NOTE: Running task 409 of 424 (ID: 33, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_sizecheck)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_configure: Succeeded
NOTE: Running task 410 of 424 (ID: 7, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_compile)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_compile: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_sizecheck: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_sizecheck: Succeeded
NOTE: Running task 411 of 424 (ID: 25, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_install)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_install: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_install: Succeeded
NOTE: Running task 415 of 424 (ID: 26, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/linux/linux-yocto_4.4.bb, do_populate_sysroot)
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_populate_sysroot: Started
NOTE: recipe linux-yocto-4.4.3+gitAUTOINC+32e84686fc_3d2455f9da-r0: task do_populate_sysroot: Succeeded
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_compile: Succeeded
NOTE: Running task 418 of 424 (ID: 2, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_install)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_install: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_install: Succeeded
NOTE: Running task 419 of 424 (ID: 12, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_package)
NOTE: Running task 420 of 424 (ID: 3, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_populate_sysroot)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_populate_sysroot: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_package: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_populate_sysroot: Succeeded
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_package: Succeeded
NOTE: Running task 421 of 424 (ID: 9, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_packagedata)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_packagedata: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_packagedata: Succeeded
NOTE: Running task 422 of 424 (ID: 13, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_package_write_ipk)
NOTE: Running task 423 of 424 (ID: 10, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_package_qa)
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_package_write_ipk: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_package_qa: Started
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_package_qa: Succeeded
NOTE: recipe lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0: task do_package_write_ipk: Succeeded
NOTE: Running noexec task 424 of 424 (ID: 11, /home/jenkins/oe/world/shr-core/openembedded-core/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_build)
NOTE: Tasks Summary: Attempted 424 tasks of which 392 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
Comment 1 Bruce Ashfield 2016-03-29 20:08:21 UTC
Bouncing to Richard to re-assign.

This is well over my head, and my hands are full with perf races, and queued kernel merges.
Comment 2 Ed Bartosh 2016-04-06 08:59:44 UTC
I am not able to reproduce build failure mentioned here, but kernel rebuild is 100% reproducible.
Comment 3 Richard Purdie 2016-04-12 08:58:14 UTC
I have a theory about this. I think that linux-yocto-tiny-kexecboot 
(from http://git.openembedded.org/meta-openembedded/tree/meta-initramfs/recipes-kernel/linux/linux-yocto-tiny-kexecboot_4.4.bb) is pretty toxic and smashes the kernel shared source directory, then any further use of the directory is broken and for example kernel module builds fail.

Could someone try "bitbake linux-yocto; bitbake linux-yocto-tiny-kexecboot; bitbake lttng-modules" and see if that gives the failure in question?
Comment 4 Martin Jansa 2016-04-12 09:19:42 UTC
I'm seeing these issues even after blacklisting linux-yocto-tiny(-kexecboot) in my world builds:

https://github.com/shr-project/jenkins-jobs/commit/c168b7824c2c68bd5894532fc122929d2d9df9a7
Comment 5 Ed Bartosh 2016-04-12 09:40:07 UTC
This works just fine in my environment:
 rm -rf tmp/ ; bitbake linux-yocto; bitbake linux-yocto-tiny-kexecboot ; bitbake lttng-modules
I didn't notice any build failures.

I've noticed that linux-yocto was rebuilt when building lttng-modules though.
Comment 6 Richard Purdie 2016-04-12 10:00:43 UTC
Martin: Can you point at one of the world builds where this fails and linux-yocto-tiny-kexecboot is blacklisted please?

*Something* is getting built which trashes the shared kernel workdir, but what that is, I don't know :/.
Comment 7 Richard Purdie 2016-04-12 10:59:27 UTC
A command which consistently shows this error is:
rm tmp -rf; bitbake linux-yocto-tiny-kexecboot lttng-modules -c cleansstate; bitbake lttng-modules; bitbake lttng-modules -c cleansstate; bitbake linux-yocto-tiny-kexecboot ; bitbake lttng-modules

Basically, "bitbake lttng-modules" forces the do_shared_workdir to run (which includes building the base part of the kernel since that isn't stored in sstate). The "bitbake linux-yocto-tiny-kexecboot" then destroys the shared_workdir, then the second build of the module fails as the shared workdir is corrupt.

If this isn't in Martin's world builds, the log files of those would be useful as something is likely breaking that directory, we just need to figure out what.
Comment 8 Ed Bartosh 2016-04-12 11:16:56 UTC
I confirm that this command breaks the build the way it's showed in the first comment: 

rm tmp -rf; bitbake linux-yocto-tiny-kexecboot lttng-modules -c cleansstate; bitbake lttng-modules; bitbake lttng-modules -c cleansstate; bitbake linux-yocto-tiny-kexecboot ; bitbake lttng-modules
...

ERROR: lttng-modules-2.7.1+gitAUTOINC+45e0ebd91f-r0 do_make_scripts: Function failed: do_make_scripts (log file is located at /home/ed/git/yocto/poky/build/tmp/work/qemux86_64-poky-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/log.do_make_scripts.17071)
ERROR: Logfile of failure stored in: /home/ed/git/yocto/poky/build/tmp/work/qemux86_64-poky-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/log.do_make_scripts.17071
Log data follows:
| DEBUG: Executing shell function do_make_scripts
| make: Entering directory '/home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-source'
| make[1]: Entering directory '/home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-build-artifacts'
|   HOSTCC  scripts/basic/fixdep
|   GEN     ./Makefile
|   HOSTCC  scripts/kconfig/conf.o
|   SHIPPED scripts/kconfig/zconf.tab.c
|   SHIPPED scripts/kconfig/zconf.lex.c
|   SHIPPED scripts/kconfig/zconf.hash.c
|   HOSTCC  scripts/kconfig/zconf.tab.o
|   HOSTLD  scripts/kconfig/conf
| scripts/kconfig/conf  --silentoldconfig Kconfig
| ***
| *** Configuration file ".config" not found!
| ***
| *** Please run some configurator (e.g. "make oldconfig" or
| *** "make menuconfig" or "make xconfig").
| ***
| /home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-source/scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
| make[3]: *** [silentoldconfig] Error 1
| /home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-source/Makefile:531: recipe for target 'silentoldconfig' failed
| make[2]: *** [silentoldconfig] Error 2
| make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'scripts'.  Stop.
| make[1]: Leaving directory '/home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-build-artifacts'
| Makefile:146: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2
| make: Leaving directory '/home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-source'
| WARNING: /home/ed/git/yocto/poky/build/tmp/work/qemux86_64-poky-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/run.do_make_scripts.17071:1 exit 2 from 'make CC="x86_64-poky-linux-gcc  -fuse-ld=bfd" LD="x86_64-poky-linux-ld.bfd " AR="x86_64-poky-linux-ar " -C /home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-source O=/home/ed/git/yocto/poky/build/tmp/work-shared/qemux86-64/kernel-build-artifacts scripts'
| ERROR: Function failed: do_make_scripts (log file is located at /home/ed/git/yocto/poky/build/tmp/work/qemux86_64-poky-linux/lttng-modules/2.7.1+gitAUTOINC+45e0ebd91f-r0/temp/log.do_make_scripts.17071)
ERROR: Task 6 (/home/ed/git/yocto/poky/meta/recipes-kernel/lttng/lttng-modules_git.bb, do_make_scripts) failed with exit code '1'
NOTE: Tasks Summary: Attempted 409 tasks of which 403 didn't need to be rerun and 1 failed.
Comment 9 Martin Jansa 2016-04-12 12:04:53 UTC
I don't have a recent log from jenkins build, I was re-testing this manually in the same workspace (which already had the PNBLACKLIST).

I'll try to reproduce this again after current jenkins builds are finished.

The tiny, tiny-kexecboot builds are definitely breaking things (even the build of the linux-yocto kernel itself), but the manual testing shown some issues even when they weren't built in the same TOPDIR - maybe it could be broken sstate for linux-yocto from previous build where tiny/tiny-kexecboot wasn't blacklisted yet.
Comment 10 Richard Purdie 2016-04-12 13:02:02 UTC
You shouldn't need to blacklist linux-yocto-tiny as that recipe is very different to linux-yocto-tiny-kexec. Notice that the latter zero's out PROVIDES. If PROVIDES isn't zero'ed, both would provide virtual/kernel and we'd see warnings/errors about multiple duplicate providers.

The build is designed so only one kernel owns the shared workdir but that kexec recipe goes specifically out of its way to bypass the checks.

I'd propose that linux-yocto-tiny is ok to be left enabled but that linux-yocto-tiny-exec needs rewriting.
Comment 11 Martin Jansa 2016-05-09 19:13:39 UTC
Closing to stop the e-mails.
Comment 12 Martin Jansa 2016-06-03 13:56:51 UTC
This seems to work as simple reproducer:

for i in linux-yocto netmap-modules lttng-modules kernel-devsrc cryptodev-module; do
    echo "cleansstate $i"
    bitbake -c cleansstate $i >>log.$i 2>&1
    ls tmp-glibc/work-shared/qemux86/kernel-*

    echo "build $i"
    bitbake $i >>log.$i 2>&1
    ls tmp-glibc/work-shared/qemux86/kernel-*
done

After cleansstate lttng-modules:

tmp-glibc/work-shared/qemux86/kernel-build-artifacts:
arch  include  kernel-abiversion  Module.symvers  System.map-4.4.11-yocto-standard

which is ok and expected, but then after building lttng-modules:

tmp-glibc/work-shared/qemux86/kernel-build-artifacts:
include  Makefile  Module.symvers  scripts  source

log.lttng-modules attached
Comment 13 Martin Jansa 2016-06-03 13:57:47 UTC
Created attachment 3212 [details]
log.lttng-modules