Bug 11801 - rpmbuild fails randomly when try to build a spec file
Summary: rpmbuild fails randomly when try to build a spec file
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 4.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-07-17 20:29 UTC by Aníbal Limón
Modified: 2021-09-23 15:37 UTC (History)
7 users (show)

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


Attachments
rpmbuild (15.20 KB, application/octet-stream)
2017-07-17 20:29 UTC, Aníbal Limón
no flags Details
oe-selftest run 8 threads (1.69 MB, text/plain)
2017-07-18 15:33 UTC, Aníbal Limón
no flags Details
oe-selftest run 4 threads (79.28 KB, text/plain)
2017-07-18 17:24 UTC, Aníbal Limón
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aníbal Limón 2017-07-17 20:29:20 UTC
Created attachment 3874 [details]
rpmbuild

I found that in some cases rpmbuild fails trying to build a SPEC file, see attached log.

I was running oe-selftest,

$ oe-selftest -r  buildoptions.ArchiverTest.test_arch_work_dir_and_export_source

And causes the test to fail, i suspect that is some kind of race because if i modified package_rpm.bbclass adding verbosity -vv to the rpmbuild command and the test passes.
Comment 1 Aníbal Limón 2017-07-18 15:32:33 UTC
I'm using a modified version of oe-selftest that allows to use more than 1 thread to execute unittests, this consume a lot of cpu/memory and may be the error is shown because that.

Using 8 threads for execute unittests other packages starts to fail building rpm,

ERROR: nativesdk-patchelf-0.9-r0 do_package_write_rpm: Function failed: BUILDSPEC
ERROR: libtool-2.4.6-r0 do_package_write_rpm: Function failed: BUILDSPEC 

Search for that in the attached log.
Comment 2 Aníbal Limón 2017-07-18 15:33:18 UTC
Created attachment 3878 [details]
oe-selftest run 8 threads
Comment 3 Aníbal Limón 2017-07-18 17:21:59 UTC
(In reply to comment #1)
> I'm using a modified version of oe-selftest that allows to use more than 1
> thread to execute unittests, this consume a lot of cpu/memory and may be the
> error is shown because that.
> 
> Using 8 threads for execute unittests other packages starts to fail building
> rpm,
> 
> ERROR: nativesdk-patchelf-0.9-r0 do_package_write_rpm: Function failed:
> BUILDSPEC
> ERROR: libtool-2.4.6-r0 do_package_write_rpm: Function failed: BUILDSPEC 
> 
> Search for that in the attached log.

My theory seems to be true using 4 pythreads for unittest execution the failures building the RPM's didn't happen.
Comment 4 Aníbal Limón 2017-07-18 17:24:05 UTC
Created attachment 3879 [details]
oe-selftest run 4 threads
Comment 5 Richard Purdie 2021-09-23 15:37:46 UTC
This is with a modified oe-selftest using threading and is likely an issue in that threading code. We now have parallelism in ie-selftest with the -j option and don't see this issue.