Bug 4745 - automount failed occasionally at system coldplug time
Summary: automount failed occasionally at system coldplug time
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5 M2
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-06-18 10:18 UTC by Hongxu Jia
Modified: 2013-06-29 05:30 UTC (History)
12 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2013-06-18 10:18:10 UTC
*env
Build Configuration:
BB_VERSION        = "1.19.1"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-13.04"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "emenlow-noemgd"
DISTRO            = "poky"
DISTRO_VERSION    = "1.4+snapshot-20130618"
TUNE_FEATURES     = "m32 core2"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "hongxu-0618-coldplug:1dd643b142c69ac9035e29bff11d02201638dc65"
meta-intel        
meta-emenlow      = "master:c8856e41a418da8080a515c6fbcf4c46765301e3"

vim conf/local.conf
252 DISTRO_FEATURES_append = " systemd"
253 VIRTUAL-RUNTIME_init_manager = "systemd"
254 MACHINE ?= "emenlow-noemgd"

vim conf/bblayers.conf
  8 BBLAYERS ?= " \
  9   /home/jiahongxu/yocto/poky/meta \
 10   /home/jiahongxu/yocto/poky/meta-yocto \
 11   /home/jiahongxu/yocto/poky/meta-yocto-bsp \
 12   /home/jiahongxu/yocto/poky/meta-intel \
 13   /home/jiahongxu/yocto/poky/meta-intel/meta-emenlow \

Machine has internal SSD with sda1/sda2/sda3 partitions.
There are also 3 usb sticks,
NO.1 with partition sdb which is used to boot.
NO.2 with partitions sdc1/sdc2/sdc3/sdc4
NO.3 with partition sdd

*problem
Reboot system repeatedly, occasionally found usb automount failed, a
low probability but it happens.

$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
none                   1024972         4   1024968   0% /dev
/dev/sda3              7689384   3540940   3757840  49% /media/sda3
/dev/sda2            146127424   1238432 137466120   1% /media/sda2
/dev/sda1                17845     14570      2354  86% /media/sda1
/dev/sdb                293400    288560      4840  98% /media/sdb
/dev/sdc4               457632        32    457600   0% /media/sdc4
/dev/sdc1               475018      2321    447749   1% /media/sdc1
/dev/sdd               1382298   1382298         0 100% /media/sdd
/dev/sdc2               475694      2320    448374   1% /media/sdc2
/dev/loop0              270649    181249     75644  71% /
df: /media/sdc3: No such file or directory
tmpfs                  1029352         0   1029352   0% /dev/shm
tmpfs                  1029352      2816   1026536   0% /run
tmpfs                  1029352         0   1029352   0% /sys/fs/cgroup
tmpfs                  1029352         4   1029348   0% /tmp
tmpfs                  1029352         0   1029352   0% /media/ram
tmpfs                  1029352       116   1029236   0% /var/volatile

*analysis
During early boot before switch_root in initramfs, when boot media
has been found, udev will be killed and then all medias will be
moved to the new root filesystem.

If udev is busy to mount other medias at the killing time (especially
medias is many), the above issue will occur occasionally.

*solution
Invoke `udevadm settle' before killing udev will resolve this
issue, it watches the udev event queue, and exits if all current
events are handled.