Bug 199203

Summary: 00-makewhatis.cron zcat: stdout: Broken pipe
Product: Red Hat Enterprise Linux 4 Reporter: rambler8
Component: manAssignee: Ivana Varekova <varekova>
Status: CLOSED DUPLICATE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: jvdias
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-18 07:29:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rambler8 2006-07-17 22:15:07 UTC
After upgrading to vixie-cron-4.1-44.EL4 an error occurs 
when /etc/cron.weekly/00-makewhatis.cron is run. When the error occurs and an 
email is sent to the root user.

The contents of the email are:

"/etc/cron.weekly/00-makewhatis.cron:

zcat: stdout: Broken pipe"

With the "zcat: stdout: Broken pipe" line repeated many times.



This was previously a bug in Fedora, but it was resolved in Fedora quite a few 
months ago.

Comment 1 Jason Vas Dias 2006-07-17 23:22:01 UTC
This appears to be the same issue as in bug 146849 / bug 163484 / 170402 .

It all stems from the RHEL-4 version of rpm setting SIGPIPE to be ignored;
then when crond is restarted during the RPM upgrade, the makewhatis script
also inherits this handler, and its write() calls can get interrupted by 
SIGPIPE and restarted (instead of terminating the process as they should).

Simply restarting the crond process from outside rpm should fix the problem:
  # service crond restart

This isn't really a crond problem; I think users should be enabled to set
an SIGPIPE handler that is inherited by crond if they so desire; I don't
think crond should explicitly set a SIGPIPE handler, as it can mask other
problems (eg. with nss_ldap authentication, another old hobbyhorse), or
users may have valid reasons for wanting to set a specific SIGPIPE handler
for cron.
  
This issue can be simply fixed in the makewhatis script by adding a 
'trap PIPE' line. I think it should either be fixed there, or in rpm .

It looks like it was fixed for bug 170402 in man-1.5p, but never got
into the latest man release.

I will consider adding a 'trap PIPE' line to the vixie-cron initscript in
the next release, that could be disabled by a 'NO_TRAP_PIPE' setting in
/etc/sysconfig/crond . 

Meanwhile we should try to fix this in the man package's makewhatis script -
all that is needed there would be a 'trap PIPE' line.

If this problem is not fixed by simply restarting cron, then please append
details of how to reproduce it to this bug and reassign back to vixie-cron
- thanks.

Comment 2 Ivana Varekova 2006-07-18 07:29:26 UTC

*** This bug has been marked as a duplicate of 170402 ***