<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9022</bug_id>
          
          <creation_ts>2016-02-01 16:46:37 +0000</creation_ts>
          <short_desc>Replace retry logic in useradd with flocks</short_desc>
          <delta_ts>2016-07-11 07:56:27 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Kai Kang">kai.kang</assigned_to>
          <cc>dl9pf</cc>
    
    <cc>kai.kang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>58393</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-01 16:46:37 +0000</bug_when>
    <thetext>Instead of spinning on useradd, checking that it actually did what we asked it to do, we could just flock $syscconfdir before running the commands.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58590</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2016-02-04 16:24:12 +0000</bug_when>
    <thetext>We have a fix in our local branch that doesn&apos;t seem to  have been sent to the oe-core email list likely since Kai thought it was a work-around. I&apos;m going to assign this to Kai and ask him to send this patch to the list.

WR branch:
commit dfd6e7a8ec8fe36eb1d96f4127cb5d599ceedacf
Author: Kai Kang &lt;kai.kang@windriver.com&gt;
Date:   Wed Aug 5 10:33:11 2015 +0800

    useradd_base.bbclass: fix simultaneous with flock
    
    Issue: LIN8-643
    
    When perform useradd during populate sysroot, it locks files passwd.lock
    and group.lock at same time. And then it meets a dead lock issue.
    
    Use flock to reslove it by using an universal lock file for all the
    user and group related operations. The lock file is put in image dir
    /tmp. /tmp will be mounted as a tmpfs, so the lock file will not be
    visible when boot the target.
    
    (LOCAL REV: NOT UPSTREAM) -- Workaround
    
    Signed-off-by: Kai Kang &lt;kai.kang@windriver.com&gt;
    Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58593</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-04 16:37:07 +0000</bug_when>
    <thetext>Oh that&apos;s certainly a good start, thanks Randy/Kai.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61252</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-04-14 20:01:27 +0000</bug_when>
    <thetext>Fixed in oe-core 2ebf697b46c42cee8bfa6d2e6087397f8cce385c.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63782</commentid>
    <comment_count>4</comment_count>
    <who name="Jan-Simon Moeller">dl9pf</who>
    <bug_when>2016-07-11 07:56:27 +0000</bug_when>
    <thetext>Can this be backported to jethro ?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>