RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1125954 - Piping ccs --getschema results in IOError: [Errno 32] Broken pipe
Summary: Piping ccs --getschema results in IOError: [Errno 32] Broken pipe
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ricci
Version: 6.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Chris Feist
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-01 12:44 UTC by Radek Steiger
Modified: 2015-07-22 07:33 UTC (History)
2 users (show)

Fixed In Version: ccs-0.16.2-77.el6.x86_64
Doc Type: Bug Fix
Doc Text:
Cause: ccs does not properly ignore SIGPIPE Consequence: When piping the output of ccs into another program a traceback can occur if the other program closes the pipe before ccs finishes. Fix: ccs now properly ignores the SIGPIPE signal Result: ccs no longer issues a traceback when piping its output to other programs which close the pipe before ccs finishes.
Clone Of:
Environment:
Last Closed: 2015-07-22 07:33:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1405 0 normal SHIPPED_LIVE ricci bug fix and enhancement update 2015-07-20 18:07:08 UTC

Description Radek Steiger 2014-08-01 12:44:59 UTC
Description of problem:

Piping ccs --getschema into something, that doesn't wait for the whole output (like /usr/bin/head) results in broken pipe:

[root@virt-102 sbin]# ccs --getschema -h localhost | head -n1
<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rha="http://redhat.com/~pkennedy/annotation_namespace/cluster_conf_annot_namespace">
Traceback (most recent call last):
  File "/usr/sbin/ccs", line 2450, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/ccs", line 334, in main
    if (getclusterschema): get_cluster_schema()
  File "/usr/sbin/ccs", line 859, in get_cluster_schema
    print out
IOError: [Errno 32] Broken pipe


Version-Release number of selected component (if applicable):

ccs-0.16.2-69.el6.x86_64
ccs-0.16.2-75.el6.x86_64

How reproducible:
Always


Steps to Reproduce:
1. ccs --getschema -h localhost | head
2.
3.

Comment 2 Chris Feist 2014-08-05 21:18:51 UTC
This is a common problem for most python programs because it doesn't ignore SIGPIPE (like most programs do).

Fix upstream here:
https://github.com/feist/ccs/commit/c3ce0a072f29ac82e7f9aeb54adb198c943fd976

Comment 3 Chris Feist 2015-03-03 23:21:06 UTC
Before Fix:

[root@ask-03 ~]# rpm -q ccs
ccs-0.16.2-75.el6.x86_64
[root@ask-03 ~]# ccs -h localhost --getschema | head -n0
Traceback (most recent call last):
  File "/usr/sbin/ccs", line 2450, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/ccs", line 334, in main
    if (getclusterschema): get_cluster_schema()
  File "/usr/sbin/ccs", line 859, in get_cluster_schema
    print out
IOError: [Errno 32] Broken pipe

After Fix:

[root@ask-02 ~]# rpm -q ccs
ccs-0.16.2-77.el6.x86_64
[root@ask-02 ~]# ccs -h localhost --getschema | head -n0
[root@ask-02 ~]#

Comment 6 errata-xmlrpc 2015-07-22 07:33:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1405.html


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