Bug 12605 - likely race in gcc-runtime's do_package_write_rpm
Summary: likely race in gcc-runtime's do_package_write_rpm
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M4
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-03-14 14:46 UTC by California Sullivan
Modified: 2018-04-10 06:35 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
gcc-runtime do_package_write_rpm (13.96 KB, text/plain)
2018-03-14 14:46 UTC, California Sullivan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description California Sullivan 2018-03-14 14:46:44 UTC
Created attachment 4236 [details]
gcc-runtime do_package_write_rpm

During an AB run the following error occurred:

| DEBUG: Python function write_specfile finished
| DEBUG: PKGWRITEDIR: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/core2-64-poky-linux/gcc-runtime/7.3.0-r0/deploy-rpms/core2_64
| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']
| DEBUG: Executing shell function BUILDSPEC
| error: failed to create directory %{_builddir}: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work-shared/gcc-7.3.0-r0/gcc-7.3.0: File exists
| Building target platforms: core2_64-poky-linux
| Building for target core2_64-poky-linux

It appears that rpmbuild is attempting to create a directory that already exists and doesn't handle it well.

Link: https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/908/steps/Running%20oe-selftest/logs/stdio

This occurred in a mut build but I don't see anything in the branch immediately related to this.
Comment 1 Richard Purdie 2018-03-14 15:38:48 UTC
Note that this is in shared-workdir and I doubt rpms should be touching a path in work-shared as the _builddir for rpm. This could be gcc-runtime racing against libgcc for packaging.

Looking at the logs, "NOTE: recipe libgcc-7.3.0-r0: task do_package_write_rpm: Succeeded" is after the failure so this is very likely the case.
Comment 2 Richard Purdie 2018-03-14 15:42:14 UTC
May be worth trying changing the definition of _builddir in package_rpm.bbclass from S to B...
Comment 3 California Sullivan 2018-03-14 17:53:40 UTC
I tried it locally and core-image-sato was able to build and boot, but more testing should probably be done.
Comment 4 Ross Burton 2018-04-10 06:35:38 UTC
Merged in oe-core d6c13a5ff441f7076eb327c0d0b747bd7603db0f.