rootstock hangs at "I: Extracting zlib1g..."

Bug #556304 reported by sam tygier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RootStock
Fix Released
Undecided
Unassigned
rootstock (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: rootstock

I am trying to build an ubuntu lucid beagleboard image, using the command:

sudo ../project-rootstock/rootstock --fqdn beagleboard --login sam --password temppwd --imagesize 2G --seed ubuntu-minimal,linux-firmware,wireless-tools,usbutils --dist lucid --serial ttyS2 --script fixup.sh --kernel-image http://rcn-ee.net/deb/kernel/beagle/lucid/v2.6.32.9-l9.1/linux-image-2.6.32.9-l9.1_1.0lucid_armel.deb --copy-package-cache --restore-package-cache

it hangs with the last line of out put being
I: Extracting zlib1g...

if i control+c i get:
I: Extracting zlib1g...
^C../project-rootstock/rootstock: line 204: /tmp/tmp.lCBTeHtqOJ/dbfifo: Interrupted system call
I: Cleaning up...

if i run with "bash -x" i get
+ read line
+ echo I: Extracting zlib1g...
+ '[' '!' '' ']'
+ echo 'I: Extracting zlib1g...'
I: Extracting zlib1g...
+ read line
+ '[' 1 ']'
+ mkdir -p /var/cache/rootstock/archives/dists/lucid
+ cp /tmp/tmp.rcSHHN2BpS/tmpmount/var/lib/apt/lists/debootstrap.invalid_dists_lucid_Release /var/cache/rootstock/archives/dists/lucid/Release
++ which qemu-arm-static
+ '[' '!' ']'
+ SECOND_STAGE='/debootstrap/debootstrap --second-stage'
+ echo 3975
^C../project-rootstock/rootstock: line 204: /tmp/tmp.rcSHHN2BpS/dbfifo: Interrupted system call
++ cleanup
++ echo 'I: Cleaning up...'
I: Cleaning up...
++ echo 'I: Killed ... '
++ '[' -e /tmp/tmp.rcSHHN2BpS/debootstrap.pid ']'
+++ cat /tmp/tmp.rcSHHN2BpS/debootstrap.pid
++ DPID=3975
++ kill -9 3975

i have seen this discussed in IRC, but can't find a resolution or bug report. I am running the latest rootstock via bzr, and up to date lucid on amd64.

Revision history for this message
sam tygier (samtygier) wrote :

i think the following code is responsible:

if [ ! $(which qemu-arm-static) ];then
        SECOND_STAGE="/debootstrap/debootstrap --second-stage"
    else
        mkdir -p $MOUNTPOINT/usr/bin/
        cp $(which qemu-arm-static) $MOUNTPOINT/usr/bin/
        chroot $MOUNTPOINT debootstrap/debootstrap --second-stage >$DBFIFO 2>&1 &
        SECOND_STAGE=""
fi

if i install qemu-kvm-extras-static to have qemu-arm-static, then i can get past the hang. the difference between the 2 paths is that only the second sets something to feed into the FIFO. after the if statement is a loop to read from the FIFO. if the fist path is followed then the read loop waits for ever.

the simplest fix is to move the read loop inside the else block. i shall attach a patch

i am not sure why the FIFO is used instead of tee.

sam tygier (samtygier)
Changed in project-rootstock:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rootstock - 0.1.99.3-0ubuntu1

---------------
rootstock (0.1.99.3-0ubuntu1) lucid; urgency=low

  * upstream bugfix release for lucid
   - fix handling of http_proxy and apt proxy setting (LP: #455622)
   - make qemu image writable if --keepimage is used (LP: #527159)
   - change ownership of the .img file to $SUDO_USER instead of opening
     permissions (LP: #540822)
   - make a note that from ubuntu karmic on the qemu package is called
     qemu-kvm-extras if erroring on missing execute permissions (LP: #538965)
   - merge patch from Sam Tyger <email address hidden> for
     (LP: #556304) (build hangs at Extracting zlib1g in some environments)
   - merge patch from Robert Nelson <email address hidden> to generate
     initramfs from external kernel debs
   - change qemu VM command to use no cache for the emulated harddisk
     which potentially improves the situation with Bug #532733
 -- Oliver Grawert <email address hidden> Fri, 16 Apr 2010 00:11:46 +0200

Changed in rootstock (Ubuntu):
status: New → Fix Released
Revision history for this message
sam tygier (samtygier) wrote :

there is a tarball of 0.1.99 which i believe contains the fix. so marking fix released

Changed in project-rootstock:
status: Fix Committed → Fix Released
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.