Red Hat Bugzilla – Bug 163483
rhnsd spawns children with SIGPIPE set to SIG_IGN
Last modified: 2013-01-10 03:48:16 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513
Description of problem:
one of the first things rhnsd does, is to
signal (SIGPIPE, SIG_IGN);
this is never reverted later. this causes children to be launched with an unexpected environment where SIGPIPE doesn't cause immediate death, but rather a failed write system call.
the effect of this can be quite puzzling. in bug 146849 vixie-cron was restarted in this mode, and after that happens, the nightly makewhatis is prone to emit a lot of "zcat: stdout: Broken pipe". in our case we received 100K of such logs in e-mail from each of about a hundred workstations after the vixie-cron was updated on June 25th.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
I _have_ tried to reproduce it using a minimal spec file containing
cat /bin/login | date
# === end ===
this exonerated rpm itself. unfortunately, I don't have my own up2date repository set up, and since the update has to go through rhnsd, there are a few steps to go through to verify. the source code for rhnsd looks pretty clear to me, though.
Expected Results: the %post scriptlet should give output similar to
trap -- '' SIGPIPE
Mon Jul 18 10:09:29 CEST 2005
cat: write error: Broken pipe
using bash' trap builtin is not reliable.
trap -- '' SIGPIPE
# bash --noprofile -c 'trap' </dev/null
use the test program in bug 163484 instead.
Blocking rhnupr4u4 and rhnupr3u8 to track the progress of the release
Moving bugs to the CanFix List
This bug did not make the code freeze and it will not be fiixed during this
release cycle. Re-aligning bug to the next release
This bug did not make the code freeze. It will not be fixed in this releasee
Reea ligning to the next one.
Created attachment 134646 [details]
The above test program will send the signal handler to syslog.
To test this bug, compile the test program, and copy it to /usr/sbin/rhn_check
With the current rhnsd, SIG_IGN will be printed to /var/log/messages.
With the updated version, SIG_DFL will appear instead.
Fixed in up2date-4.5.0-1
It appears that the test and/or script above is invalid.
* On a system w/ up2date < 4.5.0-1:
[root@fjs-0-17 sbin]# rpm -qa |grep up2date
[root@fjs-0-17 sbin]# /usr/sbin/rhn_check
* On a system w/ up2date >= 4.5.0-1:
[root@rlx-3-08 sbin]# rpm -qa|grep up2date
[root@rlx-3-08 sbin]# /usr/sbin/rhn_check
I am getting 'SIG_DFL' either way, even on the unpatched system. Please advise.
(In reply to comment #13)
> I am getting 'SIG_DFL' either way, even on the unpatched system. Please advise.
Are you checking the results from rhn_checking getting executed by rhnsd (as in
comment #10), or just from running this dummy rhn_check on the command line?
QA Verified on i386 arch, but not yet others. Will mark as verified when this
has been completed.
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 the 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.
May 16 10:32:59 dhcp231-70 rhnsd: Exiting
May 16 10:32:59 dhcp231-70 rhnsd: rhnsd shutdown succeeded
May 16 10:32:59 dhcp231-70 rhnsd: Red Hat Network Services Daemon
May 16 10:33:52 dhcp231-70 sshd(pam_unix): session opened for user root
May 16 10:34:28 dhcp231-70 rhn_check: SIG_DFL