build failure caused by apt-get/dpkg calls

Bug #952403 reported by Fathi Boudra
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro CI
Confirmed
Undecided
Riku Voipio

Bug Description

Often, we get build failures caused by apt-get/dpkg calls:

+ sudo apt-get build-dep --assume-yes qemu
Reading package lists...
Building dependency tree...
Reading state information...
E: You must put some 'source' URIs in your sources.list

+ dpkg -i live-build_3.0~a45-1_all.deb qemu-user-static_1.0+dfsg-3_amd64.deb
dpkg: error: dpkg status database is locked by another process

while a work around to check if we can call apt-get/dpkg safely in the job itself can be done, it will be nice to fix it properly (without user intervention).

Danilo suggested that the images have auto-updates on. It could be also caused by the init script which install commonly used packages with apt-get. Could you investigate on the real cause and propose a fix?

Otherwise, the hack to work around the known issue should be documented in the wiki.

Revision history for this message
Fathi Boudra (fboudra) wrote :

work around the issue by moving apt-get/dpkg call into the instance init script to avoid concurrent package installation in the jobs.

I'm looking into using schroot (or aptdaemon) with jenkins for a long term fix.

Fathi Boudra (fboudra)
Changed in linaro-ci:
status: New → Confirmed
Revision history for this message
Riku Voipio (riku-voipio) wrote :

Looking at package-and-publish-linux-linaro-test configuration, this looks still racy. The job runs dpkg outside chroot a few times, which could collide with other jobs.

Revision history for this message
Wookey (wookey) wrote : Re: [Bug 952403] Re: build failure caused by apt-get/dpkg calls

+++ Riku Voipio [2013-07-19 06:58 -0000]:
> Looking at package-and-publish-linux-linaro-test configuration, this
> looks still racy. The job runs dpkg outside chroot a few times, which
> could collide with other jobs.

I presume you mean this bit:
----
wget http://repo.linaro.org/ubuntu/linaro-tools/pool/main/r/raring-crosschroot/${chrootpackage}
sudo dpkg -i ${chrootpackage}
dpkg -l raring-crosschroot

wget http://ppa.launchpad.net/linaro-maintainers/tools/ubuntu/pool/main/s/sbuild/libsbuild-perl_0.64.0+repack1-1wook1_all.deb
wget http://ppa.launchpad.net/linaro-maintainers/tools/ubuntu/pool/main/s/sbuild/sbuild_0.64.0+repack1-1wook1_all.deb
sudo dpkg -i libsbuild-perl_0.64.0+repack1-1wook1_all.deb sbuild_0.64.0+repack1-1wook1_all.deb
dpkg -l sbuild libsbuild-perl
----

This just temporary code to test the chroot and latest sbuild. As soon
as those packages are installed in the standard image then that code
should be removed and all the (locking) dpkgness should happen inside the chroot

Wookey
--
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/

Revision history for this message
Riku Voipio (riku-voipio) wrote :

We already build qemu mainline in the qemu-mainline job that uses ubuntu-builder to build in schroot. I'll change qemu-ltp job use the build artifacts from the qemu-mainline job.

Fathi Boudra (fboudra)
Changed in linaro-ci:
milestone: none → 2013.12
assignee: nobody → Riku Voipio (riku-voipio)
Revision history for this message
Riku Voipio (riku-voipio) wrote :

Here's the experimental job that is built from the existing prebuild qemu-mainline packages from repo.linaro.org. There is a remote trigger launched from repo.linaro.org whenever a new qemu-user-static package is uploaded.

https://ci.linaro.org/jenkins/job/qemu-ltp-new/

Revision history for this message
Fathi Boudra (fboudra) wrote :

you don't need a remote trigger. everything can be done in jenkins and copy artifacts between jobs using a downstream job.

Fathi Boudra (fboudra)
Changed in linaro-ci:
milestone: 2013.12 → 2014.01
Fathi Boudra (fboudra)
Changed in linaro-ci:
milestone: 2014.01 → 2014.03
Fathi Boudra (fboudra)
Changed in linaro-ci:
milestone: 2014.03 → 2014.04
Revision history for this message
Chase Qi (chase-qi) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.