Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1688788 - rpmbuild is order of magnitude slower than the version provides in centos to build SCL
Summary: rpmbuild is order of magnitude slower than the version provides in centos to ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: scl-utils
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-14 12:56 UTC by MERCIER Jonathan
Modified: 2019-04-05 03:06 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)
src rpm in order to reproduce the bug (deleted)
2019-03-14 12:56 UTC, MERCIER Jonathan
no flags Details

Description MERCIER Jonathan 2019-03-14 12:56:25 UTC
Created attachment 1544046 [details]
src rpm in order to reproduce the bug

Dear,

I build Software collection on both centos 7 and fedora 29 and the same build is at least 10 minutes much longer than one run on centos 7.

In order to provide a lead I put below a part of strace which produce the same trace thousand of times. I noticed that only the xxx-runtime part has this behavior other part is done quickly.


To reproduce this issue, download the srpms and rebuild it directly or use the spec file as below:

rpmbuild -ba rpmbuild/SPECS/bowtie2343.spec


-------------------------------------------------------

--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8724, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
read(8, "", 8192)                       = 0
close(8)                                = 0
wait4(8724, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 8724
pipe([6, 7])                            = 0
pipe([8, 9])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f115c005b90) = 8732
close(6)                                = 0
close(9)                                = 0
select(9, [8], [7], NULL, NULL)         = 1 (out [7])
write(7, "/home/jmercier/test_scl/rpmbuild"..., 136) = 136
close(7)                                = 0
select(9, [8], [], NULL, NULL)          = 1 (in [8])
read(8, "cnrgh-bowtie2343-runtime\n", 8192) = 25
select(9, [8], [], NULL, NULL)          = 1 (in [8])
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8732, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
read(8, "", 8192)                       = 0
close(8)                                = 0
wait4(8732, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 8732
pipe([6, 7])                            = 0
pipe([8, 9])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f115c005b90) = 8740
close(6)                                = 0
close(9)                                = 0
select(9, [8], [7], NULL, NULL)         = 1 (out [7])
write(7, "/home/jmercier/test_scl/rpmbuild"..., 135) = 135
close(7)                                = 0
select(9, [8], [], NULL, NULL)          = 1 (in [8])
read(8, "scl-package(cnrgh-bowtie2343)", 8192) = 29
select(9, [8], [], NULL, NULL)          = 1 (in [8])
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8740, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
read(8, "", 8192)                       = 0
close(8)                                = 0
wait4(8740, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 8740
pipe([6, 7])                            = 0
pipe([8, 9])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f115c005b90) = 8748
close(6)                                = 0
close(9)                                = 0
select(9, [8], [7], NULL, NULL)         = 1 (out [7])
write(7, "/home/jmercier/test_scl/rpmbuild"..., 135) = 135
close(7)                                = 0
select(9, [8], [], NULL, NULL)          = 1 (in [8])

Comment 1 Panu Matilainen 2019-03-18 12:14:13 UTC
Easily reproduced, looks like an scl-utils issue to me.

Comment 2 Vít Ondruch 2019-03-18 12:52:33 UTC
Unfortunately, the strace output leaves out the interesting bits, e.g. the full path from "write(7, "/home/jmercier/test_scl/rpmbuild"..., 136) = 136". Nevertheless, if I should guess, I think it will have something to do with the %scl_files macro. The (whole) "filesystem" structure is somehow replicated during the build and the directories are owned by the -runtime subpackage. Unfortunately, I don't think there is anybody, who would really know what the macro really does and what it should actually do.

The main problem is RPM with its directory ownership model. If RPM autoremoved empty directories, unless they are explicitly preserved, it would allow removing this ugly macro.

Actually, comparing to a situation, when scl-utils were introduced, there is nowadays filesystem-content package, which lists all the directories owned by the filesystem package, but anyway:

1) I am not really sure how to make use of it.
2) It is definitely not backward compatible (it is not available on RHEL6 and it is available just since RHEL 7.5).


Note You need to log in before you can comment on or make changes to this bug.