Bug 7573 - Wic hangs creating an SD card image
Summary: Wic hangs creating an SD card image
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.9 M1
Assignee: Ed Bartosh
QA Contact: Daniel Istrate
URL:
Whiteboard:
Depends on:
Blocks: 8309
  Show dependency tree
 
Reported: 2015-04-07 14:26 UTC by Phlip Balister
Modified: 2015-09-16 09:40 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phlip Balister 2015-04-07 14:26:46 UTC
Rerunning wic to build a new image (after making one already) hangs unless you manually remove the wic build directory. It appears that mcopy is left running at 100% cpu.

Reverting 2d3c9f89852bd009fc7accee495ede2fbcadc3bb 
 wic: bootimg-partition: Stop removing whole workdir

Resolves the problem. Alexandre discussed this briefly on the list, but it appears the resolution was dropped.
Comment 1 Ed Bartosh 2015-04-15 21:09:44 UTC
Can you show me wic commandline? I can't reproduce this with "wic create directdisk -e core-image-minimal"
Comment 2 Phlip Balister 2015-04-15 21:42:16 UTC
wic create ../meta-sdr/contrib/wks/sdimage-8G.wks  -e gnuradio-demo-image -o images/$MACHINE

Something like that. Also check with A Belloni, I'm pretty sure he has an idea. His contact info should be i the commit log.
Comment 3 Ed Bartosh 2015-04-16 22:08:07 UTC
Works just fine for me:

$ time wic create ../../meta-sdr/contrib/wks/sdimage-8G.wks  -e gnuradio-demo-image -o images/$MACHINE
Checking basic build environment...
Done.

Creating image(s)...

Info: The new image(s) can be found here:
  images/build/sdimage-8G-201504170100-mmcblk.direct

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /home/ed/git/yocto/poky/build-gnuradio-demo-image/tmp/work/qemux86-poky-linux/gnuradio-demo-image/1.0-r0/rootfs
  BOOTIMG_DIR:
  KERNEL_DIR:                   /home/ed/git/yocto/poky/build-gnuradio-demo-image/tmp/deploy/images/qemux86
  NATIVE_SYSROOT:               /home/ed/git/yocto/poky/build-gnuradio-demo-image/tmp/sysroots/x86_64-linux


The image(s) were created using OE kickstart file:
  ../../meta-sdr/contrib/wks/sdimage-8G.wks

real    1m22.049s
user    0m16.440s
sys     0m40.332s

$ ls -lh images/build/sdimage-8G-201504170100-mmcblk.direct
-rw-r--r-- 1 ed users 7.0G Apr 17 01:01 images/build/sdimage-8G-201504170100-mmcblk.direct


Please, provide more info.

Wild guess: the reason could be caused by mcopy from your distro and was fixed by fa263f238bbddb00c9953994fb69cc358170e2ec
    wic: don't use host paths when looking for native tools

Can you try if it's still reproduceable with current master?
Comment 4 Phlip Balister 2015-04-16 22:11:02 UTC
Current master fails to run at all. I filed a bug for this.

Did you run the command twice?
Comment 5 Ed Bartosh 2015-04-17 08:17:13 UTC
current master worked for me.

yes, I run wic twice.
Comment 6 Ed Bartosh 2015-04-17 13:26:11 UTC
you should be able to run wic after applying this fix: http://lists.openembedded.org/pipermail/openembedded-core/2015-April/103837.html
Comment 7 Ed Bartosh 2015-04-23 19:05:54 UTC
Any news? Is it still reproducible?
Comment 8 Alexandre Belloni 2015-04-27 23:38:33 UTC
This should be fixed with:
http://lists.openembedded.org/pipermail/openembedded-core/2015-April/104199.html
Comment 9 Phlip Balister 2015-04-28 21:11:14 UTC
OK, finally got a master build to where I could check. master looks OK now. I need to double check, but I think I need to make a backport request for fido to fix the issue there.
Comment 10 Alexandre Belloni 2015-04-29 17:22:03 UTC
Did you need my patch or just plain master is enough?
Comment 11 Ed Bartosh 2015-04-29 20:18:26 UTC
Alexandre, there was a suggestion from Adrian to use API calls instead of shelling out "rm -f". Would you be willing to follow it?

http://lists.openembedded.org/pipermail/openembedded-core/2015-April/104230.html
Comment 12 Phlip Balister 2015-04-29 20:27:32 UTC
It looks like plain master is enough.
Comment 13 Stephen K Jolley 2015-05-18 19:25:05 UTC
Ed,

Does this still needinfo?  It looks like Phlip answered.
Comment 14 Ed Bartosh 2015-05-18 22:39:28 UTC
Fixed in master.
Comment 15 Daniel Istrate 2015-09-16 09:40:32 UTC
Failed to verify because of bug 8309