From: Mark Hatle <mark.hatle@windriver.com>
To: <yocto@yoctoproject.org>
Subject: Re: Race condition when building a recipe and poky-image-minimal-initramfs
Date: Mon, 14 Mar 2011 21:20:58 -0500 [thread overview]
Message-ID: <4D7ECD0A.6020406@windriver.com> (raw)
In-Reply-To: <D5AB6E638E5A3E4B8F4406B113A5A19A336463B0@shsmsx501.ccr.corp.intel.com>
On 3/14/11 8:47 PM, Xu, Dongxiao wrote:
> Hi Richard,
There was already a defect covering this. The bug number is "797".
In order to fix the problem a lock was added to the RPM generation. This lock
should be preventing both RPM package generation and rootfs construction from
running at the same time.
The code was checked into Bernard on 2011-03-10. If your image is from after
that date, please reopen the defect and add the details below.
--Mark
> These days I found a race condition between building a recipe and poky-image-minimal-initramfs, to reproduce it, you can try as:
>
> 1) Run "bitbake poky-image-sato-live". Build the full sato-live image until it is successful.
> 2) Bump connman's PR (or some other sato recipe's PR).
> 3) Rebuild the sato live image by "bitbake poky-image-sato-live".
>
> Sometimes, I meet build error like the following, however it does not happen every time.
>
> -------------------------------------------------------
> Generating solve db for /distro/dongxiao/build-qemux86/tmp/deploy/rpm/qemux86...
> total: 1 0.000000 MB 1.424841 secs
> fingerprint: 1020 0.006796 MB 0.033057 secs
> install: 340 0.000000 MB 0.371773 secs
> dbadd: 340 0.000000 MB 0.362746 secs
> dbget: 2196 0.000000 MB 0.004278 secs
> dbput: 340 1.504908 MB 0.308950 secs
> readhdr: 3401 2.961280 MB 0.005603 secs
> hdrload: 1700 4.389932 MB 0.007001 secs
> hdrget: 57535 0.000000 MB 0.043769 secs
> Generating solve db for /distro/dongxiao/build-qemux86/tmp/deploy/rpm/i586...
> error: open of /distro/dongxiao/build-qemux86/tmp/deploy/rpm/i586/connman-plugin-ethernet-0.65-r4.i586.rpm failed: No such file or directory
> rpm.real: ./rpmio_internal.h:190: fdGetOPath: Assertion `fd != ((void *)0) && fd->magic == 0x04463138' failed.
> /distro/dongxiao/build-qemux86/tmp/work/qemux86-poky-linux/poky-image-minimal-initramfs-1.0-r0/temp/run.do_rootfs.468: line 375: 669 Aborted rpm --dbpath /var/lib/rpm --define='_openall_before_chroot 1' -i --replacepkgs --replacefiles --oldpackage -D "_dbpath $pkgdir/solvedb" --justdb --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats --ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" $pkgdir/solvedb/manifest
> ERROR: Function 'do_rootfs' failed (see /distro/dongxiao/build-qemux86/tmp/work/qemux86-poky-linux/poky-image-minimal-initramfs-1.0-r0/temp/log.do_rootfs.468 for further information)
> -------------------------------------------------------
>
> The root cause for this issue should be, poky-image-minimal-initramfs's do_rootfs task doesn't have dependency on connman, thus their tasks will be run simultaneously. Poky-image-minimal-initramfs's do_rootfs will call "rootfs_rpm_do_rootfs" --> "package_update_index_rpm", where it will update all the packages depsolver db in ${DEPLOY_DIR_RPM}.
>
> When the package_update_index_rpm function is handling connman's rpm package, and at the same time, connman is removing old rpm and trying to generate a new one (e.x, from r4 to r5), then the build error will occur, saying that it could not find r4 version of connman-plugin-ethernet...
>
> One choice may be to force poky-image-minimal-initramfs's do_rootfs to depends on all recipe's do_package to ensure correctness, even though it only depends on some basic recipes.
>
> However I think it is not such elegant.
>
> Do you have ideas on it?
>
> BTW, I will file a bug 867 to track this issue. http://bugzilla.pokylinux.org/show_bug.cgi?id=867
>
> Thanks,
> Dongxiao
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
next prev parent reply other threads:[~2011-03-15 2:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 1:47 Race condition when building a recipe and poky-image-minimal-initramfs Xu, Dongxiao
2011-03-15 2:20 ` Mark Hatle [this message]
2011-03-15 2:33 ` Xu, Dongxiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D7ECD0A.6020406@windriver.com \
--to=mark.hatle@windriver.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.