This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 784817 - Segfault when moving / removing printer from class
Segfault when moving / removing printer from class
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: system-config-printer (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Zdenek Dohnal
Petr Sklenar
: Patch
Depends On:
Blocks: 1356054 1373253
  Show dependency treegraph
Reported: 2012-01-26 05:52 EST by Petr Sklenar
Modified: 2017-03-21 06:45 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-03-21 06:45:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Sklenar 2012-01-26 05:52:01 EST
Description of problem:
Segfault when move/removing printer from class

Version-Release number of selected component (if applicable):
not a regression, can see the same on system-config-printer-1.1.16-22.el6.i686

How reproducible:

Steps to Reproduce:
1. as a root: open system-config-printer and add new printer, then close s-c-printer
2. as a user:  open system-config-printer add new printer

3, now you have one printer created by user and one created by root

4. create 'new class' and add that printer created by user
4. open properties for previously 'new class'(right click and properties) > members try to add or remove printer created by root
Actual results:
system-config-printer --debug
Authentication pass: 1
Authentication: password callback set
Authentication pass: 1
Authentication: password callback set
PolicyKit call to ClassDeletePrinter did not work: PolicyKit communication issue
Segmentation fault (core dumped)

Expected results:
no segfault, It asks for password or printer is removed from class

Additional info:
Comment 4 Tim Waugh 2012-01-31 11:14:21 EST
See also bug #673468.

Investigating why that happens in the first place.
Comment 5 Tim Waugh 2012-01-31 11:38:57 EST
I can't reproduce this here.  Is it completely repeatable for you?  What does 'rpm -q cups-pk-helper' say?

I don't see the "PolicyKit communication issue" line, and the core dump suggests that the CUPS IPP response contained a member-names attribute but no member-uris attributes -- and I don't see that either.  I tried removing cups-pk-helper to make sure that system-config-printer was using pycups to talk to CUPS directly, as seems to have been the case here.

So I have a work-around, but won't be able to understand what the root cause is until I can reproduce it locally.
Comment 8 Tim Waugh 2012-02-01 07:52:04 EST
Having observed this first-hand on the original machine, I can say that this is really a cups problem of some sort -- however, defensive coding against it would be advisable in pycups, as in bug #673468.

Querying cups for the attributes for the class, there was indeed a member-names attribute but no member-uris attribute.  /etc/cups/classes.conf defined a class with no printers.  lpstat -c showed that it actually had two printers.

Not sure how this situation occurred, but pycups ought not to assume anything at all in its dealings with cups.  In this instance, it was assuming that the presence of a member-names attribute meant there must also be a member-uris attribute.

Upstream commit 4952f2b320c5c64891c5ec4b818ff52eb42bb061 (in pycups) is the patch to handle this more gracefully.
Comment 10 RHEL Product and Program Management 2012-09-07 01:02:46 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 16 Petr Sklenar 2016-09-02 07:37:52 EDT
I was able to reproduce this bug using latest rhel68:

[test@localhost Desktop]$ system-config-printer
Segmentation fault (core dumped)
[test@localhost Desktop]$ rpm -q system-config-printer
[test@localhost Desktop]$ date
Fri Sep  2 07:33:40 EDT 2016

between step 4 and 5:
have a class with two printer (root's one and user's one)
if not segfault:
   close s-c-printer
   like a user: open s-c-printer try to move with root's printer

it asks for root password but I could see segfault
Comment 22 errata-xmlrpc 2017-03-21 06:45:50 EDT
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.

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