Skip to contentSkip to conversation

Inappropriate error handling

DISCUSSION Thomas Köller 2 participants 2 messages Apr 3, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

here is an excerpt from a log of a failed build:

WARNING: icu-60.2-r0 do_populate_sysroot_setscene: Failed to fetch URL file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz, attempting MIRRORS if available
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: Fetcher failure: Unable to find file file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz anywhere. The paths that were searched were:
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: No suitable staging package found
WARNING: Logfile for failed setscene task is /mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/build/tmp/work/aarch64-poky-linux/icu/60.2-r0/temp/log.do_populate_sysroot_setscene.44028
WARNING: Setscene task (/mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/sources/poky/meta/recipes-support/icu/icu_60.2.bb:do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead

As can be seen, a setscene task failed. I do not (yet) know why this happened, but that is not what this message is about. What matters is that the real task will be executed later, which works just fine, and the entire build runs to completion without any further errors. However, at the very end I get the following output:

Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

And then the non-zero exit code that is returned causes my script to take the error exit, even though the build products are all fine and perfectly usable. This really should not happen.

#1 lore raw
Quoted 12 lines · On Fri, 03 Apr 2020 02:50:56 -0700 Thomas Köller <[email protected]>…

Hi,

here is an excerpt from a log of a failed build:

WARNING: icu-60.2-r0 do_populate_sysroot_setscene: Failed to fetch URL file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz, attempting MIRRORS if available
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: Fetcher failure: Unable to find file file://bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz;downloadfilename=bd/sstate:icu:aarch64-poky-linux:60.2:r0:aarch64:3:bd6b12b7f20a46d35ce4d9382c306075_populate_sysroot.tgz anywhere. The paths that were searched were:
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
/mnt/data/jenkins/workspace/imx-manifest_warrior/sstate
ERROR: icu-60.2-r0 do_populate_sysroot_setscene: No suitable staging package found
WARNING: Logfile for failed setscene task is /mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/build/tmp/work/aarch64-poky-linux/icu/60.2-r0/temp/log.do_populate_sysroot_setscene.44028
WARNING: Setscene task (/mnt/data/jenkins/workspace/imx-manifest_warrior/buildroot/imx8mqevk-basler/imx-4.14.98-2.0.0_ga_basler/basler-dart-bcon-mipi-dev/sources/poky/meta/recipes-support/icu/icu_60.2.bb:do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead

Quoted 6 lines

As can be seen, a setscene task failed. I do not (yet) know why this happened, but that is not what this message is about. What matters is that the real task will be executed later, which works just fine, and the entire build runs to completion without any further errors. However, at the very end I get the following output:

Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

And then the non-zero exit code that is returned causes my script to take the error exit, even though the build products are all fine and perfectly usable. This really should not happen.

This has been discussed last month:
https://lists.yoctoproject.org/g/yocto/topic/71426351.

I ended up using Joshua Watt's suggestion to run the setscene tasks in a separate bitbake process and ignore failure:

    bitbake --setscene-only <target> || true
    bitbake --skip-setscene <target>

I'd like to come up with something better but I don't have the bandwidth to look into it further right now.

Thanks,

Signature · 2 lines
Paul Barker
Konsulko Group