Bug 1412658 - Exception raised during srpm import during build using Mock SCM
Summary: Exception raised during srpm import during build using Mock SCM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: clime
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-12 14:09 UTC by Timothy Asir
Modified: 2017-09-15 08:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-15 08:58:23 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1384609 0 unspecified CLOSED RFE: Download/generate the SRPM only once per build request 2021-02-22 00:41:40 UTC

Internal Links: 1384609

Description Timothy Asir 2017-01-12 14:09:30 UTC
Description of problem:
Exception raised during srpm import during build using Mock SCM
Build failed whenever rebuild / resubmit to build using Mock SCM
which fetch the latest source from github master branch and build.

if we execute the build using source rpm it passes.

How reproducible:
Most of the time.
Some time the build passes.

Actual results:
2. Task: 498971-epel7, importing the package: None
Build via Mock
/usr/bin/mock -r fedora-24-x86_64 --uniqueext 498971-epel7 --scm-enable --scm-option method=git --scm-option package=tendrl-commons --scm-option branch=master --scm-option write_tar=True --scm-option spec=tendrl-commons.spec --scm-option git_get=git clone --depth 1 --branch master https://github.com/Tendrl/commons.git tendrl-commons --buildsrpm --resultdir=/tmp/tmpjoFlBv
Running: docker run --cap-add=SYS_ADMIN --name 498971-epel7-d41d8cd98f00b204e9800998ecf8427e -v /tmp/tmpjoFlBv:/tmp/tmpjoFlBv -w /tmp/tmpjoFlBv b2491c2cfd95 /usr/bin/mock -r fedora-24-x86_64 --uniqueext 498971-epel7 --scm-enable --scm-option method=git --scm-option package=tendrl-commons --scm-option branch=master --scm-option write_tar=True --scm-option spec=tendrl-commons.spec --scm-option git_get=git clone --depth 1 --branch master https://github.com/Tendrl/commons.git tendrl-commons --buildsrpm --resultdir=/tmp/tmpjoFlBv
Exception raised during srpm import:
Traceback (most recent call last):
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 565, in do_import
    provider.get_srpm()
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 185, in get_srpm
    self.provider.get_srpm()
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 332, in get_srpm
    VM.run(cmd, dst_dir=self.tmp_dest, cwd=self.tmp_dest, name=self.task.task_id, sys_admin=True)
  File "/usr/share/copr/dist_git/dist_git_importer.py", line 731, in run
    raise SrpmBuilderException(error)
SrpmBuilderException: INFO: mock.py version 1.3.2 starting (python version = 3.5.1)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(/tmp/tmpzbdggvni.mock-scm.tendrl-commons/tendrl-commons/tendrl-commons.spec)  Config(fedora-24-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
Mock Version: 1.3.2
INFO: Mock Version: 1.3.2
Start: dnf install
ERROR: Exception(/tmp/tmpzbdggvni.mock-scm.tendrl-commons/tendrl-commons/tendrl-commons.spec) Config(fedora-24-x86_64) 1 minutes 25 seconds
INFO: Results and/or logs in: /tmp/tmpjoFlBv
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
Finish: clean chroot
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-24-x86_64-498971-epel7/root/ --releasever 24 --disableplugin=local --setopt=deltarpm=false install @buildsys-build

Sending back: 
{"task_id": "498971-epel7", "error": "srpm_build_error"}

Expected results:


Additional info:

SCM configuration:

Source Type:
    Mock build from a SCM repository
SCM type:
    git
SCM URL:
    https://github.com/Tendrl/commons
SCM branch:
    master
Path to .spec file:
    tendrl-commons.spec

Comment 1 clime 2017-01-20 18:37:22 UTC
The reason why this is happening is OOM killer. Quite some memory is consumed during the buildroot install operation and when multiple mock-scm imports run at once, system resources does not seem to comply. This is not a resolution of this bug, just a very, very rough description of what is happening. Thank you for the report.

Comment 2 David Ward 2017-05-01 20:09:09 UTC
I'm having the same issue, except with "copr-cli buildfedpkg". The traceback is identical.

I am attempting to simply re-build the golang package in Fedora 26 dist-git for Fedora 25, by using this command:

copr-cli buildfedpkg --clone-url https://src.fedoraproject.org/git/rpms/golang.git --branch f26 dpward/docker

(The copr project dpward/docker only contains a chroot for Fedora 25.)

Comment 3 clime 2017-08-03 13:10:26 UTC
(In reply to David Ward from comment #2)
> I'm having the same issue, except with "copr-cli buildfedpkg". The traceback
> is identical.
> 
> I am attempting to simply re-build the golang package in Fedora 26 dist-git
> for Fedora 25, by using this command:
> 
> copr-cli buildfedpkg --clone-url
> https://src.fedoraproject.org/git/rpms/golang.git --branch f26 dpward/docker
> 
> (The copr project dpward/docker only contains a chroot for Fedora 25.)

Are the issues still present?

Comment 4 clime 2017-09-15 08:58:23 UTC
This should no longer be a problem as we switched to srpm building in separate COPR builders. Each srpm build is no longer affected by any other.


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