| Summary: | Replace retry logic in useradd with flocks | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Ross Burton <ross.burton> |
| Component: | core | Assignee: | Kai Kang <kai.kang> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | dl9pf, kai.kang, meta.mr.watcher, meta.watcher, randy.macleod |
| Version: | 2.1 | ||
| Target Milestone: | 2.1 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Ross Burton
2016-02-01 16:46:37 UTC
We have a fix in our local branch that doesn't seem to have been sent to the oe-core email list likely since Kai thought it was a work-around. I'm going to assign this to Kai and ask him to send this patch to the list. WR branch: commit dfd6e7a8ec8fe36eb1d96f4127cb5d599ceedacf Author: Kai Kang <kai.kang@windriver.com> 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 <kai.kang@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Oh that's certainly a good start, thanks Randy/Kai. Fixed in oe-core 2ebf697b46c42cee8bfa6d2e6087397f8cce385c. Can this be backported to jethro ? |