<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 23 February 2016 at 02:45, <span dir="ltr"><<a href="mailto:kai.kang@windriver.com" target="_blank">kai.kang@windriver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":2zg" class="" style="overflow:hidden">When perform useradd during populate sysroot, it locks files passwd.lock<br>
and group.lock at same time. And then it meets a dead lock issue<br>
randomly.<br>
<br>
Use flock to reslove it by using an universal lock file for all the<br>
user and group related operations.</div></blockquote></div><div class="gmail_extra"><br></div>I got an error when openssh's do_install was running useradds to the sysroot:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">| DEBUG: Executing shell function useradd_sysroot</div><div class="gmail_extra">| Running useradd commands...</div><div class="gmail_extra">| /data/poky-master/tmp-glibc/work/core2-32-poky-linux/openssh/7.1p2-r0/temp/run.useradd_sysroot.13825: 264: local: /data/poky-master/tmp-glibc/sysroots/intel-core2-32: bad variable name</div><div class="gmail_extra">| WARNING: exit code 2 from a shell command.</div><div class="gmail_extra">| ERROR: Function failed: useradd_sysroot (log file is located at /data/poky-master/tmp-glibc/work/core2-32-poky-linux/openssh/7.1p2-r0/temp/log.do_install.13825)</div><div class="gmail_extra">ERROR: Task 2939 (/home/ross/Yocto/poky/meta/recipes-connectivity/openssh/<a href="http://openssh_7.1p2.bb">openssh_7.1p2.bb</a>, do_install) failed with exit code '1'</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"> 262 perform_useradd() {</div><div class="gmail_extra"> 263 local rootdir="$1"</div><div class="gmail_extra"> 264 local opts=`echo $2 | sed s/\'/\"/g`</div><div class="gmail_extra"> 265 bbnote "openssh: Performing useradd with [$opts]"</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ross</div></div></div></div>