Bug 6806

Summary: Smart failure when running bitbake over and over
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Mark Hatle <mark.hatle>
Component: coreAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED OBSOLETE QA Contact:
Severity: major    
Priority: Medium CC: liezhi.yang, meta.mr.watcher, meta.watcher, otavio, sgw
Version: 1.7   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
See Also: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6571
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Mark Hatle 2014-10-06 17:48:47 UTC
See bug 6571, this was split from Otavio's comments:

Reproducer:

> > bitbake target
> > git pull
> > bitbake target
> > git pull
> > bitbake target
> > ...etc...?

Eventually will get:

> ERROR: Unable to install packages. Command
> '.../build-wayland/tmp/sysroots/x86_64-linux/usr/bin/smart --quiet
> --data-dir=.../build-wayland/tmp/work/imx6qsabresd-poky-linux-gnueabi/fsl-
> image-machine-test/1.0-r0/rootfs/var/lib/smart install -y
> packagegroup-fsl-tools-gpu@imx6qsabresd
> packagegroup-core-tools-testapps@imx6qsabresd
> packagegroup-base-extended@imx6qsabresd run-postinsts@all
> packagegroup-fsl-tools-benchmark@imx6qsabresd
> packagegroup-core-tools-profile@imx6qsabresd
> packagegroup-fsl-gstreamer-full@all packagegroup-fsl-tools-gpu-external@all
> weston-init@all packagegroup-fsl-gstreamer@imx6qsabresd
> packagegroup-fsl-tools-testapps@all packagegroup-core-boot@imx6qsabresd
> locale-base-en-us@cortexa9hf_vfp_neon locale-base-en-gb@cortexa9hf_vfp_neon'
> returned 1:
Comment 1 Otavio Salvador 2014-10-11 15:25:01 UTC
I made a new job in our jenkins to build dizzy; in first build it got:

framebuffer fsl-image-machine-test@imx6slevk (10/19) ERROR: Unable to install packages. Command '.../build-framebuffer/tmp/sysroots/x86_64-linux/usr/bin/smart --quiet --data-dir=.../build-framebuffer/tmp/work/imx6slevk-poky-linux-gnueabi/fsl-image-machine-test/1.0-r0/rootfs/var/lib/smart install -y packagegroup-fsl-tools-gpu@imx6slevk packagegroup-core-tools-testapps@imx6slevk packagegroup-base-extended@imx6slevk run-postinsts@all packagegroup-fsl-tools-benchmark@imx6slevk packagegroup-core-tools-profile@imx6slevk packagegroup-fsl-gstreamer-full@imx6slevk packagegroup-fsl-tools-gpu-external@all packagegroup-fsl-gstreamer@imx6slevk packagegroup-fsl-tools-testapps@imx6slevk packagegroup-core-boot@imx6slevk locale-base-en-us@cortexa9hf_vfp_neon locale-base-en-gb@cortexa9hf_vfp_neon' returned 1:
framebuffer fsl-image-machine-test@imx6slevk (10/19) error: Failed to download packages:
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/lib-mpeg2-dec-arm11-elinux2-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Invalid SHA (expected 2adb6bb5ed06a3a9c16495812e7b5c0c811398af, got 182ffdc3af75e20b1edef3f9a017567060a79060)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/all/packagegroup-fsl-tools-gpu-external-1.0-r0.all.rpm: Invalid SHA (expected b4a4ea55cf4874f6e6ae4ce9865564671c29f395, got 38da9f444d659b41a43502ab68773714cde7f8bb)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/all/ca-certificates-20140325-r0.all.rpm: Unexpected size (expected 182137, got 182129)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/lib-peq-arm11-elinux1.fhw-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Invalid SHA (expected 870ce989ddd67ad9af2f9a54883a7398cb946b8f, got 1d1a417fb98cf041c38b776e15875cde7551fe73)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/lib-oggvorbis-dec-arm11-elinux2-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 106423, got 106422)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/libfslcodec-wb-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 153001, got 153004)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/libfslcodec-aac-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 154423, got 154425)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/libfslcodec-nb-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 335260, got 335263)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/libfslcodec-h264-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 145115, got 145117)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/libfslcodec-mp3-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 497617, got 497611)
framebuffer fsl-image-machine-test@imx6slevk (10/19) error:     .../build-framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/libfslcodec-mpeg4asp-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Unexpected size (expected 226341, got 226342)
Comment 2 Jeff Johnson 2014-10-21 19:54:05 UTC
You have a damaged rpmdb (is all that can be told from the reported details).

Running out of diskspace is one common cause of truncated headers,
that is consistent with (failed to download messages unrelated to
rpm itself).

disabling fsync(2) (for performance) and exceptional evens like
reboots or turning off VM's is another cause of truncated I/O.
Comment 3 Jeff Johnson 2014-11-24 21:32:20 UTC
I'm not sure how/why I own this bug ... I need a more complete
log than given on why the database was already damaged when the
jenkins build was started.
Comment 4 Saul Wold 2015-05-07 15:20:50 UTC
Otavio, can you update us on this, are you still seeing this issue?  If not can we close it?
Comment 5 Otavio Salvador 2015-05-07 16:25:18 UTC
framebuffer/tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/lib-peq-arm11-elinux1.fhw-4.0.1-r0.cortexa9hf_vfp_neon_mx6.rpm: Invalid SHA (expected 870ce989ddd67ad9af2f9a54883a7398cb946b8f, got 1d1a417fb98cf041c38b776e15875cde7551fe73)

I get, from time to time for both rpm and opkg backends.
Comment 6 Mark Hatle 2015-05-07 16:32:08 UTC
that message I think is coming from RPM directly..

The only thing I can think of is that you have a race condition and that thing is being rebuilt (replaced?) which the indexing or other install components are running.  Causing the initial hash to be read, and then the file is updated and a subsequent is read that do not match.
Comment 7 Otavio Salvador 2015-05-07 16:39:06 UTC
Yes; I have the very same theory however this is not easy to reproduce.
Comment 8 Jeff Johnson 2015-05-07 19:06:02 UTC
That isn't an RPM message (though is formatted similarly). The digest would be named more specifically than "SHA" if from RPM.
Comment 9 Stephen K Jolley 2015-05-25 19:45:37 UTC
Saul,

It appears the answer has been given.  You can put this back into NEEDINFO if you have another question.
Comment 10 Robert Yang 2015-06-10 08:27:52 UTC
Talked with Paul, assign to me atm.
Comment 11 Robert Yang 2016-04-13 00:22:23 UTC
Does anyone see this recently, please ?
Comment 12 Otavio Salvador 2016-04-13 10:17:01 UTC
(In reply to comment #11)
> Does anyone see this recently, please ?

I did not see this for a while.
Comment 13 Robert Yang 2017-06-02 03:29:07 UTC
Smart is gone, now dnf.