Bug 1264198 - rpm calls exit() if it receives SIGPIPE executing a scriptlet which kills the thing that was using rpm
rpm calls exit() if it receives SIGPIPE executing a scriptlet which kills the...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
: 1317843 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 16:36 EDT by David Shea
Modified: 2016-03-30 20:02 EDT (History)
17 users (show)

See Also:
Fixed In Version: rpm-4.13.0-0.rc1.6.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1269665 (view as bug list)
Environment:
Last Closed: 2015-11-10 15:21:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
build.log (2.33 KB, text/plain)
2015-09-17 16:37 EDT, David Shea
no flags Details
dnf.log (151.17 KB, text/plain)
2015-09-17 16:38 EDT, David Shea
no flags Details
dnf.rpm.log (57.23 KB, text/plain)
2015-09-17 16:38 EDT, David Shea
no flags Details
dnf.librepo.log (395.02 KB, text/plain)
2015-09-17 16:39 EDT, David Shea
no flags Details
root.log (196.83 KB, text/plain)
2015-09-17 16:53 EDT, David Shea
no flags Details
anaconda-24.3-0.1.20150918122117.fc24.src.rpm (2.81 MB, application/x-rpm)
2015-09-18 08:36 EDT, David Shea
no flags Details
make.log (111.51 KB, text/plain)
2015-09-18 08:38 EDT, David Shea
no flags Details

  None (edit)
Description David Shea 2015-09-17 16:36:29 EDT
Description of problem:
When building anaconda in mock, the dnf builddep step exits with status after installing the packages and before verifying them, with no indication that anything actually went wrong.

Version-Release number of selected component (if applicable):
dnf-1.1.1-2.fc24.noarch

How reproducible:
This has been difficult to pin down. This problem always occurs in anaconda's jenkins jobs, but attempts to run mock outside of jenkins using the same host do not hit the error. I have a rawhide VM that hits the error most of the time, but every in a while succeeds, and I'm not sure what changed.


Additional info:
Attaching logs.
Comment 1 David Shea 2015-09-17 16:37:37 EDT
Created attachment 1074579 [details]
build.log

build.log from mock
Comment 2 David Shea 2015-09-17 16:38:12 EDT
Created attachment 1074580 [details]
dnf.log

/var/log/dnf.log from the mock buildroot
Comment 3 David Shea 2015-09-17 16:38:36 EDT
Created attachment 1074581 [details]
dnf.rpm.log

/var/log/dnf.rpm.log from the mock buildroot
Comment 4 David Shea 2015-09-17 16:39:07 EDT
Created attachment 1074582 [details]
dnf.librepo.log

/var/log/dnf.librepo.log from the mock buildroot
Comment 5 David Shea 2015-09-17 16:40:16 EDT
If there is anything else I can do to provide information, please let me know. This has so far proven impossible to debug and it is preventing us building anaconda packages for rawhide.
Comment 6 Radek Holy 2015-09-17 16:50:15 EDT
I don't see any error in the logs, do you? I think that the root.log contains the output of the "builddep" usage. Can you share it please?

BTW, as a workaround, you should be able to use the Mock's --yum switch (or the corresponding config option).
Comment 7 David Shea 2015-09-17 16:53:41 EDT
Created attachment 1074584 [details]
root.log

root.log from mock that I meant to attach the first time around

Too many logs and I got them confused, I guess. There's a bunch of warnings about desktop schema stuff, and then it sits for a few seconds, and then it exits with status 1. I don't think the warnings are fatal, or at least they aren't supposed to be.
Comment 8 David Shea 2015-09-17 17:32:43 EDT
--yum works, thank you for that. It hadn't even occurred to me.
Comment 9 Radek Holy 2015-09-17 18:12:56 EDT
Right, I cannot reproduce it neither. Could you provide the SRPM as well please?
Comment 10 Radek Holy 2015-09-17 18:19:43 EDT
BTW, I think I can confirm that the warnings are not fatal since I got them as well but builddep have finished successfully.
Comment 11 David Shea 2015-09-18 08:36:34 EDT
Created attachment 1074854 [details]
anaconda-24.3-0.1.20150918122117.fc24.src.rpm

The error happens during anaconda's rc-release make target, which edits a new version into the spec file, runs make dist to generate the source tarball, and then runs:

mock -r fedora-rawhide-x86_64 --scrub all
mock -r fedora-rawhide-x86_64 --buildsrpm --spec ./anaconda.spec --sources . --resultdir .
mock -r fedora-rawhide-x86_64 --rebuild *src.rpm --resultdir .

Building the srpm seems to go fine, but the rpm fails. Attaching the srpm from the second mock command.
Comment 12 David Shea 2015-09-18 08:38:10 EDT
Created attachment 1074855 [details]
make.log

This is the output from 'make rc-release' in case there's something in there I missed.
Comment 13 David Shea 2015-10-07 16:36:34 EDT
I've narrowed the problem down somewhat. The exit is happening in rpm, in rpmdbCheckSignals. I still don't know why it's failing, but maybe don't call exit() in a library?
Comment 14 David Shea 2015-10-07 17:25:22 EDT
The signal is SIGPIPE, and the cause is the fwrite call in runExtScript, at line 376 of lib/rpmscript.c. It happens while executing "/usr/bin/mandb -q\n\n# update cache" as part of the trigger for man-db.
Comment 15 Ľuboš Kardoš 2015-10-30 10:28:56 EDT
It should be fixed in rpm-4.13.0-0.rc1.9.fc24
Comment 16 Lukas Slebodnik 2015-11-02 05:22:43 EST
Thank you very much.
It works for me and finally I can use mock with dnf on rawhide.
Comment 17 Kevin Fenzi 2015-11-08 15:39:24 EST
Could we get a build/update for f23 for this issue? 

We are trying to move the builders over to f23 and I think we are hitting this with some builds. 

See: 
http://koji.fedoraproject.org/koji/taskinfo?taskID=11749874
and
https://lists.fedoraproject.org/pipermail/devel/2015-November/216592.html
Comment 18 Ľuboš Kardoš 2015-11-09 03:53:11 EST
I open the bug for f23.
Comment 19 Fedora Update System 2015-11-09 03:55:02 EST
rpm-4.13.0-0.rc1.6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-5d1b3d3854
Comment 20 Kevin Fenzi 2015-11-09 14:25:31 EST
Thanks!
Comment 21 Fedora Update System 2015-11-09 22:22:57 EST
rpm-4.13.0-0.rc1.6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update rpm'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-5d1b3d3854
Comment 22 Fedora Update System 2015-11-10 15:21:20 EST
rpm-4.13.0-0.rc1.6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 23 Richard W.M. Jones 2016-03-29 18:13:28 EDT
*** Bug 1317843 has been marked as a duplicate of this bug. ***
Comment 24 Adam Williamson 2016-03-30 20:01:22 EDT
So I tried turning image generation back on for openQA, and it looks like x86_64 images built OK, but i686 failed. Did you forget to refresh the i686 base image as well as the x86_64 one?
Comment 25 Adam Williamson 2016-03-30 20:02:26 EDT
yes...that seems to be the case:

[   ] fedora-23-aarch64-nvram.xz 12-Nov-2015 13:11   10K  
[   ] fedora-23-aarch64.xz       12-Nov-2015 13:09  206M  
[   ] fedora-23-armv7l.xz        02-Mar-2016 11:03  231M  
[   ] fedora-23-i686.xz          05-Dec-2015 18:30  247M  
[   ] fedora-23-ppc64.xz         19-Dec-2015 08:31  268M  
[   ] fedora-23-ppc64le.xz       19-Dec-2015 16:31  265M  
[   ] fedora-23.xz               30-Mar-2016 06:25  303M  

so 'fedora-23.xz' (presumably the x86_64 base image) was rebuilt today, but none of the other arches was.

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