Bug 1264198 - rpm calls exit() if it receives SIGPIPE executing a scriptlet which kills the thing that was using rpm
Summary: rpm calls exit() if it receives SIGPIPE executing a scriptlet which kills the...
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
: 1317843 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2015-09-17 20:36 UTC by David Shea
Modified: 2016-03-31 00:02 UTC (History)
17 users (show)

Fixed In Version: rpm-4.13.0-0.rc1.6.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1269665 (view as bug list)
Last Closed: 2015-11-10 20:21:26 UTC

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

Description David Shea 2015-09-17 20:36:29 UTC
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):

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 20:37:37 UTC
Created attachment 1074579 [details]

build.log from mock

Comment 2 David Shea 2015-09-17 20:38:12 UTC
Created attachment 1074580 [details]

/var/log/dnf.log from the mock buildroot

Comment 3 David Shea 2015-09-17 20:38:36 UTC
Created attachment 1074581 [details]

/var/log/dnf.rpm.log from the mock buildroot

Comment 4 David Shea 2015-09-17 20:39:07 UTC
Created attachment 1074582 [details]

/var/log/dnf.librepo.log from the mock buildroot

Comment 5 David Shea 2015-09-17 20:40:16 UTC
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 20:50:15 UTC
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 20:53:41 UTC
Created attachment 1074584 [details]

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 21:32:43 UTC
--yum works, thank you for that. It hadn't even occurred to me.

Comment 9 Radek Holy 2015-09-17 22:12:56 UTC
Right, I cannot reproduce it neither. Could you provide the SRPM as well please?

Comment 10 Radek Holy 2015-09-17 22:19:43 UTC
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 12:36:34 UTC
Created attachment 1074854 [details]

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 12:38:10 UTC
Created attachment 1074855 [details]

This is the output from 'make rc-release' in case there's something in there I missed.

Comment 13 David Shea 2015-10-07 20:36:34 UTC
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 21:25:22 UTC
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 14:28:56 UTC
It should be fixed in rpm-4.13.0-0.rc1.9.fc24

Comment 16 Lukas Slebodnik 2015-11-02 10:22:43 UTC
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 20:39:24 UTC
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. 


Comment 18 Ľuboš Kardoš 2015-11-09 08:53:11 UTC
I open the bug for f23.

Comment 19 Fedora Update System 2015-11-09 08:55:02 UTC
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 19:25:31 UTC

Comment 21 Fedora Update System 2015-11-10 03:22:57 UTC
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 20:21:20 UTC
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 22:13:28 UTC
*** Bug 1317843 has been marked as a duplicate of this bug. ***

Comment 24 Adam Williamson 2016-03-31 00:01:22 UTC
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-31 00:02:26 UTC
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.