Created attachment 323585 [details] source of an rpm package that exhibits the problem Description of problem: Using a program that forks/pipe in %post can break all echo commands from the %post install scriptlet. Version-Release number of selected component (if applicable): rpm-4.4.2.3-7.el5 How reproducible: 100% with attached reproducer Steps to Reproduce: 1. Download and build attached reproducer 2. install with rpm -ivh test-rh-1.0.0-1.ia64.rpm Actual results: # rpm -ivh test-rh-1.0.0-1.ia64.rpm Preparing... ########################################### [100%] 1:test-rh ########################################### [100%] # /etc/init.d/functions: line 398: echo: write error: Broken pipe /etc/init.d/functions: line 400: echo: write error: Broken pipe /etc/init.d/functions: line 402: echo: write error: Broken pipe /etc/init.d/functions: line 403: echo: write error: Broken pipe /etc/init.d/snmpd: line 34: echo: write error: Broken pipe Expected results: # rpm -ivh test-rh-1.0.0-1.ia64.rpm Preparing... ########################################### [100%] 1:test-rh ########################################### [100%] Additional info: The %post calls a script that run a program that runs "/sbin/service snmpd start" in the background with a pipe. But the program does not wait for child completion, so when the service script does its echo, the parent is gone and the pipe with it, leading to the "broken pipe" error. While the problem can be fixed in the program by either handling SIGPIPE or waiting for the child completion with wait(), the customer sees this as a regression because previous versions of rpm would handle this silently.
Thanks for the reproducer. This is an unwanted side-effect from switching to NSS for crypto. NSPR (which NSS uses underneath) quietly sets SIG_IGN on SIGPIPE for whatever reason. Another similar case is bug 444389 (which is relevant for RHEL 5.3 too) Fixing is just a matter of flipping SIGPIPE back to default handler for execution of scriptlets and such.
Fix built into rpm-4.4.2.3-8.el5
From Fujitsu: --- We confirmed that the fix is included in RHEL5.3 beta snapshot 4. Thank you very much! --- So PartnerVerified! Thanks! This event sent from IssueTracker by moshiro issue 234705
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0079.html