Fixed
Created: Nov 3, 2013
Updated: Mar 5, 2016
Resolved Date: Dec 4, 2013
Previous ID: LIN5-3597, LIN6-2767
Found In Version: 6.0
Fix Version: 6.0
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Build & Config
Running the following command will sometimes encounter problems
make usb-image-loop IMGARGS=--fat16-mb=512 < /dev/null
This is an intermittent race condition and when it fails the failure will look like:
----
mount /dev/loop0 /tmp/tmp.oydcXotddV
./scripts/fakestart.sh tar -C export/dist -cSpf - . | (cd /tmp/tmp.oydcXotddV && tar -xSvf -)
#==Copying files to media, each . == 1000 files copied, this may take a while==
#.............................
#==Unmounting and syncing, may take some time...==
umount /tmp/tmp.oydcXotddV
# OUTPUT: umount: /tmp/tmp.oydcXotddV: device is busy.
# OUTPUT: (In some cases useful info about processes that use
# OUTPUT: the device is found by lsof(8) or fuser(1))
sync
# Copy complete
rmdir /tmp/tmp.oydcXotddV
# OUTPUT: rmdir: failed to remove `/tmp/tmp.oydcXotddV': Device or resource busy
chown -R 5002 host-cross/var/pseudo
When the problem happens, manually shutdown the loop back device and umount.
EXAMPLE:
sudo umount /dev/loop0
sudo losetup -d /dev/loop0
configure --enable-rootfs=glibc_std --enable-board=qemu86-64
make fs
Try 5 times in a row on ubuntu 12.04, and there is no gaurantee that it will even happen.
make usb-image-loop IMGARGS=--fat16-mb=512 < /dev/null