Bug 1794 - useradd error "/etc/group" was locked
Summary: useradd error "/etc/group" was locked
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2 M4
Assignee: Scott Garman
QA Contact:
URL:
Whiteboard: (P2) 2012-03-23: Fix in master
Depends on: 2127
Blocks:
  Show dependency tree
 
Reported: 2011-11-30 09:28 UTC by Scott Garman
Modified: 2012-11-06 15:16 UTC (History)
6 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 Scott Garman 2011-11-30 09:28:30 UTC
Ulf Samuelsson reported an issue building console-image for qemuarm:

Host = Ubuntu 11.04 i686.
I used very high BB_NUMBER_THREADS = 24

1.    ERROR: Function 'useradd_sysroot' failed
        Tried to access "/etc/group" but this was locked.
        Problem disappeared the next time I rebuilt.
Comment 1 Richard Purdie 2011-12-13 00:48:20 UTC
Recently seen on the Yocto autobuilder: http://autobuilder.yoctoproject.org:8010/builders/crownbay/builds/29/steps/shell_32/logs/stdio
Comment 2 Scott Garman 2012-03-23 16:48:27 UTC
Fixed in oe-core and poky master as of:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c9537c52f4a7faef9aa2d23b33bc452aa872068d
Comment 3 Jackie Huang 2012-07-13 10:17:29 UTC
The fix of 10 time retry seems not solve the race condition problem completely:

+WARNING: groupadd command did not succeed. Retrying...
+groupadd: cannot lock /etc/group; try again later.
+WARNING: groupadd command did not succeed. Retrying...
+groupadd: cannot lock /etc/group; try again later.
+WARNING: groupadd command did not succeed. Retrying...
+groupadd: cannot lock /etc/group; try again later.
+WARNING: groupadd command did not succeed. Retrying...
+ERROR: tried running groupadd command 10 times without success, giving up
+ERROR: Function failed: useradd_sysroot (see /ba1/yow-blade13.1/builds-2012-07-12-004912/e500-kvm-guest_std/bitbake_build/tmp/work/ppce500v2-wrs-linux-gnuspe/dbus-1.4.16-r3.0/temp/do_install/log.do_install.19378 for further information)

I think we need a better sulotion to avoid tow groupadd commands running at the same time.
Comment 4 Richard Purdie 2012-07-16 11:47:55 UTC
Please open a new bug and lets look at this problem again, documenting its current lockfile approach and how we can change the behaviour to avoid this.
Comment 5 Jackie Huang 2012-07-17 09:55:29 UTC
(In reply to comment #4)
> Please open a new bug and lets look at this problem again, documenting its
> current lockfile approach and how we can change the behaviour to avoid this.

new bug #2779 is opened fot this.
Comment 6 Stoicescu Cornel 2012-11-06 15:16:09 UTC
Verified following bug 2779 .