Bug 717062

Summary: system-config-printer: TypeError: iter must be a GtkTreeIter
Product: [Fedora] Fedora Reporter: John Florian <john>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: system-config-printer-1.2.9-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-12 10:57:42 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:
Attachments:
Description Flags
before pressing Adjust Firewall
none
after pressing Adjust Firewall
none
Output of system-config-printer --debug (run as root)
none
audit.log entries upon pressing Adjust Firewall button none

Description John Florian 2011-06-27 20:24:11 UTC
Description of problem:
Cannot create any print queues.  Program hangs.

Version-Release number of selected component (if applicable):
system-config-printer-1.3.3-1.fc15.x86_64

How reproducible:
always

Steps to Reproduce:
1. Run system-config-printer as root.
2. Click to add a new printer.
  
Actual results:
Program freezes, "busy" spinner included.  When run from a shell, the following is dumped to stdout/err:

Traceback (most recent call last):
  File "/usr/share/system-config-printer/asyncipp.py", line 197, in send_reply
    handler (self._conn, result)
  File "/usr/share/system-config-printer/asyncconn.py", line 93, in reply_handler
    self._reply_handler (self, self._reply_data, *args)
  File "/usr/share/system-config-printer/asyncconn.py", line 204, in _subst_reply_handler
    reply_handler (self, *args)
  File "/usr/lib/python2.7/site-packages/cupshelpers/cupshelpers.py", line 602, in _reply_handler
    self._client_reply_handler (connection, devices)
  File "/usr/share/system-config-printer/newprinter.py", line 1371, in <lambda>
    current_uri))
  File "/usr/share/system-config-printer/newprinter.py", line 1401, in local_devices_reply
    self.add_devices (result, current_uri)
  File "/usr/share/system-config-printer/newprinter.py", line 1802, in add_devices
    physdev = model.get_value (iter, 1)
TypeError: iter must be a GtkTreeIter

Comment 1 John Florian 2011-06-27 20:25:45 UTC
To work around this problem, I found it necessary to use the web interface for CUPS administration at https://localhost:631/

Comment 2 Jiri Popelka 2011-06-28 08:40:57 UTC
I haven't been able to reproduce it here.
Do you see the problem if you run system-config-printer as regular user ?

Comment 3 Tim Waugh 2011-06-28 08:58:45 UTC
Would be great to see a screenshot of the window at the point that you get the traceback, too.

Comment 4 John Florian 2011-06-28 12:34:58 UTC
(In reply to comment #2)
> I haven't been able to reproduce it here.
> Do you see the problem if you run system-config-printer as regular user ?

No, I don't.  I did not go all the way through the process of adding a printer (as a regular user), but I was able to click the add button and the spinner continued spinning.  We have a ton of shared printers so discovery takes quite awhile.  (So many, in fact, that the discovery process is of little help since only the make/model is presented and without useful bits like description/location it's practically impossible to know what printer you're selecting, but that's another problem.)

Back on track, I ran this three ways:
 * via sudo
 * directly as root
 * directly as non-root

Only the last way did not reproduce the problem.

Comment 5 John Florian 2011-06-28 12:43:23 UTC
(In reply to comment #3)
> Would be great to see a screenshot of the window at the point that you get the
> traceback, too.

Sure.  Attaching two scrapes:
 * system-config-printer-before.png is just prior to pressing the Adjust Firewall button.
 * system-config-printer-after.png is just after pressing the Adjust Firewall button.

Once I press that button the dialog window for adjusting the firewall disappears and the first two windows ('Printing - localhost' and 'New Printer') completely freeze and no longer redraw themselves as other windows temporarily obscure them.

Comment 6 John Florian 2011-06-28 12:43:53 UTC
Created attachment 510263 [details]
before pressing Adjust Firewall

Comment 7 John Florian 2011-06-28 12:44:25 UTC
Created attachment 510264 [details]
after pressing Adjust Firewall

Comment 8 John Florian 2011-06-28 12:57:02 UTC
I have what may be another clue.  When I run as regular user, I don't see the dialog about adjusting the firewall.  I thought I did before when running as a regular user, but won't swear to it.  I always see it when run as root, regardless of how many times I've hit the Adjust Firewall button.  I'm assuming that the firewall never gets adjusted because the program hangs before any adjustments are made.  I haven't looked at the source to see what adjustment specifically is needed, but I can say that port 631 is already open in my rules.  Also, once this crash happens the iptables service is stopped and my system is wide open.  (I saw that it was stopped yesterday to my surprise and now I know why.)  To be clear, I did make sure that iptables was running when doing the above tests.

Comment 9 Tim Waugh 2011-06-28 14:07:43 UTC
Would be great to see the full output of running

system-config-printer --debug

as root.  I can't reproduce this either.

Comment 10 John Florian 2011-06-28 14:59:07 UTC
Created attachment 510300 [details]
Output of system-config-printer --debug (run as root)

Captured via system-config-printer --debug &> /tmp/system-config-printer-debug.

Comment 11 John Florian 2011-06-28 15:12:10 UTC
Created attachment 510306 [details]
audit.log entries upon pressing Adjust Firewall button

Maybe this a SEL policy at fault.  My SEL alert widget in the KDE system tray kept appearing with:

Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/bin/sealert", line 692, in <module>
    run_as_dbus_service(username)
  File "/usr/bin/sealert", line 112, in run_as_dbus_service
    app = SEAlert(user, dbus_service.presentation_manager, watch_setroubleshootd=True)
  File "/usr/bin/sealert", line 326, in __init__
    from setroubleshoot.browser import BrowserApplet
  File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 46, in <module>
    import report.io.GTKIO
ImportError: No module named GTKIO


That looks like another problem altogether, but it caused me to investigate what the audit.log was showing and if there was any relationship to the system-config-printer problems I've been seeing.  Indeed there's correlation as can be seen in the attachment.

Comment 12 Jiri Popelka 2011-06-28 15:19:05 UTC
(In reply to comment #11)
>   File "/usr/lib64/python2.7/site-packages/setroubleshoot/browser.py", line 46,
> in <module>
>     import report.io.GTKIO
> ImportError: No module named GTKIO

That's another problem. I see it too today. There's a problem that latest libreport-gtk wrongly obsoletes report-gtk package which setroubleshoot needs.

Comment 13 Tim Waugh 2011-07-06 12:42:06 UTC
Fixed upstream in 60efcbb.

Comment 14 Fedora Update System 2011-07-18 11:34:21 UTC
system-config-printer-1.3.4-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/system-config-printer-1.3.4-1.fc15

Comment 15 Fedora Update System 2011-07-18 22:26:14 UTC
Package system-config-printer-1.3.4-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.3.4-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/system-config-printer-1.3.4-1.fc15
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2011-07-31 03:49:04 UTC
Package system-config-printer-1.3.5-1.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.3.5-1.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/system-config-printer-1.3.5-1.fc15
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2011-08-02 02:01:42 UTC
Package system-config-printer-1.3.5-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.3.5-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/system-config-printer-1.3.5-2.fc15
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2011-08-03 02:30:38 UTC
Package system-config-printer-1.3.5-3.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing system-config-printer-1.3.5-3.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/system-config-printer-1.3.5-3.fc15
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2011-08-12 10:56:39 UTC
system-config-printer-1.3.5-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2011-08-12 18:17:59 UTC
system-config-printer-1.3.5-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2011-10-25 14:17:04 UTC
system-config-printer-1.2.9-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/system-config-printer-1.2.9-1.fc14

Comment 22 Fedora Update System 2011-11-04 20:29:19 UTC
system-config-printer-1.2.9-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.