Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#42650 - [system-config-printer] fails when attempting to add a new printer

Attached to Project: Arch Linux
Opened by Paul Marwick (toothandnail) - Saturday, 01 November 2014, 19:49 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 16 February 2015, 20:14 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Eric Belanger (Snowman)
Andreas Radke (AndyRTR)
Andrea Scarpino (BaSh)
Ionut Biru (wonder)
Sven-Hendrik Haase (Svenstaro)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Using Xfce, attempting to add a printer requires authentication. When the prompt to authenticate is clicked ok, the application fails. Started from a terminal, the error is as below:

/usr/share/system-config-printer/gui.py:43: Warning: The property GtkContainer:resize-mode is deprecated and shouldn't be used anymore. It will be removed in a future version.
bld.add_from_file (os.path.join (ui_dir, xmlfile + ".ui"))
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

[1]+ Segmentation fault (core dumped) system-config-printer

If the application is started from the command line using gksu to authenticate before starting, it will run without errors.

Additional info:
* package version(s) 1.5.3-3
* config and/or log files etc.


Steps to reproduce: Start system-config-printer, click "+ ADD". When prompted for username and password, enter either root and root password, or user and user password. In either instance, the application closes and a segmentation fault is reported.

This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 16 February 2015, 20:14 GMT
Reason for closing:  Not a bug
Comment by Jan Alexander Steffens (heftig) - Sunday, 02 November 2014, 11:38 GMT
Cannot reproduce. When run as root, Add works. When run as user, Add cannot be clicked until Unlock has been used, after which it works.
Comment by Jan Alexander Steffens (heftig) - Sunday, 02 November 2014, 11:39 GMT
Perhaps the no-polkit path is buggy. Is polkit installed?
Comment by Paul Marwick (toothandnail) - Sunday, 02 November 2014, 19:10 GMT
If I start the application using gksu in a terminal, it runs fine. If I start it from the menu, I do not have an Unlock button under Arch (I have a Debian testing install on my laptop which does have the unlock button - thought the difference might be due to version numbers, since the Debian version is older, but sounds as though it is not). When it is started from the menu, Add can be clicked, which results in an authentication box (don't recognise the source, sorry), but as soon as I enter a user name and password and click ok, the application segfaults.

I do have polkit installed. Is there anything I can do to check it for function, or anything I can do to check why the unlock button does not appear.

I should mention that this behaviour is repeated on 3 different installs of Arch (two on my laptop and one on a desktop machine), so whatever error I have, I've made it more than once.
Comment by Andreas Radke (AndyRTR) - Thursday, 06 November 2014, 19:35 GMT Comment by Paul Marwick (toothandnail) - Friday, 07 November 2014, 14:30 GMT
Tried the new version - behaviour is just the same, I'm afraid. No lock/unlock box, and add is not greyed out.

After reading the early mention of polkit, I tired looking a bit at that. No idea whether it has any bearing or not, since I'm not sure if it could hid the lock/unlock option, but I have some errors showing up during boot regarding polkit:

Nov 07 14:16:12 altair polkitd[407]: Started polkitd version 0.112
Nov 07 14:16:12 altair polkitd[407]: Loading rules from directory /etc/polkit-1/rules.d
Nov 07 14:16:12 altair polkitd[407]: Error opening rules directory: Error opening directory '/etc/polkit-1/rules.d': Permission denied (g-file-error-quark, 2)
Nov 07 14:16:12 altair polkitd[407]: Loading rules from directory /usr/share/polkit-1/rules.d
Nov 07 14:16:12 altair polkitd[407]: Finished loading, compiling and executing 0 rules
Nov 07 14:16:12 altair dbus[318]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Nov 07 14:16:12 altair polkitd[407]: Acquired the name org.freedesktop.PolicyKit1 on the system bus

I've done a bit of hunting for the g-file-error-quark, 2, but not found anything very useful. I did wonder if the failure to load rules might be what is upsetting system-config-printer, though I've not seen any other untoward behaviour.

Comment by Chris Olin (AWildColin) - Tuesday, 11 November 2014, 18:32 GMT
I'm also encountering this issue.

[12062.792827] system-config-p[25742]: segfault at 0 ip 00007fa9e02a7c9a sp 00007fa9c14d9bd8 error 4 in libc-2.20.so[7fa9e0226000+199000]
[12085.558626] system-config-p[25959]: segfault at 0 ip 00007f70f7304c9a sp 00007f70d3ff5bd8 error 4 in libc-2.20.so[7f70f7283000+199000]
[12153.190239] system-config-p[26497]: segfault at 0 ip 00007fe2cbd9bc9a sp 00007fe2a7ff5bd8 error 4 in libc-2.20.so[7fe2cbd1a000+199000]
[12309.579240] system-config-p[27656]: segfault at 0 ip 00007fb4ceb82c9a sp 00007fb4aaff3bd8 error 4 in libc-2.20.so[7fb4ceb01000+199000]
[13425.956952] system-config-p[3716]: segfault at 0 ip 00007f08d1fa0c9a sp 00007f08ae8efbd8 error 4 in libc-2.20.so[7f08d1f1f000+199000]
[13575.333913] system-config-p[4890]: segfault at 0 ip 00007f9c7066dc9a sp 00007f9c4d7bbbd8 error 4 in libc-2.20.so[7f9c705ec000+199000]
[13906.848646] system-config-p[7383]: segfault at 0 ip 00007f3c35484c9a sp 00007f3c11dc7bd8 error 4 in libc-2.20.so[7f3c35403000+199000]

I was able to reproduce this in gdb, sans the opcode for obvious reasons:

~ ยป gdb --args python /usr/share/system-config-printer/system-config-printer.py colin@gallifrey [pts/2]
GNU gdb (GDB) 7.8.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python /usr/share/system-config-printer/system-config-printer.py
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe9e5a700 (LWP 10022)]
/usr/share/system-config-printer/system-config-printer.py:323: Warning: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
newprinteritem = action.create_menu_item ()
/usr/share/system-config-printer/gui.py:43: Warning: The property GtkButton:xalign is deprecated and shouldn't be used anymore. It will be removed in a future version.
bld.add_from_file (os.path.join (ui_dir, xmlfile + ".ui"))
[New Thread 0x7fffd4f69700 (LWP 10030)]
[New Thread 0x7fffcffff700 (LWP 10032)]
[New Thread 0x7fffcf7fe700 (LWP 10033)]
[Thread 0x7fffcffff700 (LWP 10032) exited]
[New Thread 0x7fffcffff700 (LWP 10058)]
/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py:567: Warning: The property GtkButton:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version.
self.add_button(text, response)
/usr/lib/python3.4/site-packages/gi/overrides/Gtk.py:567: Warning: The property GtkSettings:gtk-button-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
self.add_button(text, response)
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffcffff700 (LWP 10058)]
0x00007ffff7406c9a in strlen () from /usr/lib/libc.so.6
(gdb) bt full
#0 0x00007ffff7406c9a in strlen () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007ffff74069be in strdup () from /usr/lib/libc.so.6
No symbol table info available.
#2 0x00007fffe93f7dd1 in ?? () from /usr/lib/python3.4/site-packages/cups.cpython-34m.so
No symbol table info available.
#3 0x00007fffe919149b in cupsDoAuthentication () from /usr/lib/libcups.so.2
No symbol table info available.
#4 0x00007fffe91c21d9 in cupsGetResponse () from /usr/lib/libcups.so.2
No symbol table info available.
#5 0x00007fffe91c2de9 in cupsDoIORequest () from /usr/lib/libcups.so.2
No symbol table info available.
#6 0x00007fffe9400412 in ?? () from /usr/lib/python3.4/site-packages/cups.cpython-34m.so
No symbol table info available.
#7 0x00007ffff79a6ff8 in PyObject_Call (func=func@entry=0x7fffd40366c8, arg=arg@entry=0x7ffff6c39048, kw=0x7fffd404ce48) at Objects/abstract.c:2067
result = <optimized out>
call = 0x7ffff79e84b0 <PyCFunction_Call>
#8 0x00007ffff7a54937 in PyEval_CallObjectWithKeywords (func=func@entry=0x7fffd40366c8, arg=arg@entry=0x7ffff6c39048, kw=kw@entry=0x7fffd404ce48)
at Python/ceval.c:4111
result = <optimized out>
#9 0x00007ffff79c01e8 in methoddescr_call (descr=<optimized out>, args=0x7ffff6c39048, kwds=0x7fffd404ce48) at Objects/descrobject.c:250
argc = 1
self = 0x7fffd50538d0
func = 0x7fffd40366c8
result = <optimized out>
#10 0x00007ffff79a6ff8 in PyObject_Call (func=func@entry=0x7fffebb03948, arg=arg@entry=0x7fffd5807748, kw=kw@entry=0x7fffd404ce48) at Objects/abstract.c:2067
result = <optimized out>
call = 0x7ffff79c0170 <methoddescr_call>
#11 0x00007ffff7a55d25 in ext_do_call (nk=<optimized out>, na=1, flags=<optimized out>, pp_stack=0x7fffcfffea28, func=0x7fffebb03948) at Python/ceval.c:4558
kwdict = 0x7fffd404ce48
nstar = <optimized out>
callargs = <optimized out>
stararg = 0x7ffff6c39048
result = 0x0
#12 PyEval_EvalFrameEx (f=f@entry=0x7fffc8003338, throwflag=throwflag@entry=0) at Python/ceval.c:2876
flags = <optimized out>
func = 0x7fffebb03948
na = 1
nk = -713001144
n = <optimized out>
pfunc = 0x7fffc8003508
sp = 0x7fffc8003510
stack_pointer = <optimized out>
next_instr = <optimized out>
opcode = <optimized out>
oparg = <optimized out>
why = <optimized out>
fastlocals = 0x7fffc80034b0
freevars = 0x7fffc8003508
---Type <return> to continue, or q <return> to quit---
retval = 0x0
tstate = <optimized out>
co = 0x7fffd4037e40
instr_ub = -1
instr_lb = 0
instr_prev = -1
first_instr = 0x1580ab0 "|"
names = 0x7fffd58052c8
consts = 0x7fffd55931b8
#13 0x00007ffff7a5c2b2 in fast_function (nk=<optimized out>, na=<optimized out>, n=1, pp_stack=0x7fffcfffeb40, func=<optimized out>) at Python/ceval.c:4331
retval = 0x0
fastlocals = 0x7fffc80034b0
i = <optimized out>
f = 0x7fffc8003338
tstate = 0x1585f50
stack = <optimized out>
co = <optimized out>
kwdefs = <optimized out>
nd = 0
globals = 0x7fffd403b0c8
argdefs = <optimized out>
d = 0x0
#14 call_function (oparg=<optimized out>, pp_stack=0x7fffcfffeb40) at Python/ceval.c:4259
func = <optimized out>
w = <optimized out>
na = <optimized out>
nk = <optimized out>
n = 1
pfunc = 0x7fffc8000a70
x = <optimized out>
#15 PyEval_EvalFrameEx (f=f@entry=0x7fffc80008d8, throwflag=throwflag@entry=0) at Python/ceval.c:2836
sp = 0x7fffc8000a78
res = 0xe4
stack_pointer = <optimized out>
next_instr = <optimized out>
opcode = 131
oparg = <optimized out>
why = <optimized out>
fastlocals = 0x7fffc8000a50
freevars = 0x7fffc8000a70
retval = 0x0
tstate = <optimized out>
co = 0x7ffff6884c90
instr_ub = -1
instr_lb = 0
instr_prev = -1
first_instr = 0x7ffff6aff9b0 "z\214\001|"
names = 0x7ffff67f8278
consts = 0x7ffff6a28048
#16 0x00007ffff7a5c2b2 in fast_function (nk=<optimized out>, na=<optimized out>, n=1, pp_stack=0x7fffcfffec60, func=<optimized out>) at Python/ceval.c:4331
retval = 0x0
fastlocals = 0x7fffc8000a50
i = <optimized out>
f = 0x7fffc80008d8
tstate = 0x1585f50
stack = <optimized out>
co = <optimized out>
kwdefs = <optimized out>
nd = 0
globals = 0x7ffff6869948
argdefs = <optimized out>
---Type <return> to continue, or q <return> to quit---
d = 0x0
#17 call_function (oparg=<optimized out>, pp_stack=0x7fffcfffec60) at Python/ceval.c:4259
func = <optimized out>
w = <optimized out>
na = <optimized out>
nk = <optimized out>
n = 1
pfunc = 0x7fffd404f1c8
x = <optimized out>
#18 PyEval_EvalFrameEx (f=0x7fffd404f048, throwflag=<optimized out>) at Python/ceval.c:2836
sp = 0x7fffd404f1d0
res = 0xe4
stack_pointer = <optimized out>
next_instr = <optimized out>
opcode = 131
oparg = <optimized out>
why = <optimized out>
fastlocals = 0x7fffd404f1c0
freevars = 0x7fffd404f1c8
retval = 0x0
tstate = <optimized out>
co = 0x7ffff6884ae0
instr_ub = -1
instr_lb = 0
instr_prev = -1
first_instr = 0x7ffff6868e90 "y\016"
names = 0x7ffff6881ea0
consts = 0x7ffff68875f8
#19 0x00007ffff7a5d859 in PyEval_EvalCodeEx (_co=0x0, globals=0x1, locals=0x7fffd404f1c0, args=0x7fffd504dcd8, argcount=3, kws=0x7fffd5593860, kws@entry=0x0,
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3585
retval = 0x0
fastlocals = 0x7fffd404f1c0
u = 0x0
#20 0x00007ffff79cf2f9 in function_call (func=0x7ffff6a321e0, arg=0x7fffd504dcc0, kw=0x0) at Objects/funcobject.c:632
result = <optimized out>
argdefs = <optimized out>
kwtuple = 0x0
d = 0x0
k = 0x0
nk = 0
nd = 0
#21 0x00007ffff79a6ff8 in PyObject_Call (func=func@entry=0x7ffff6a321e0, arg=arg@entry=0x7fffd504dcc0, kw=kw@entry=0x0) at Objects/abstract.c:2067
result = <optimized out>
call = 0x7ffff79cf260 <function_call>
#22 0x00007ffff79bc28d in method_call (func=0x7ffff6a321e0, arg=0x7fffd504dcc0, kw=0x0) at Objects/classobject.c:347
self = 0x7fffd4032780
result = <optimized out>
#23 0x00007ffff79a6ff8 in PyObject_Call (func=func@entry=0x7ffff6bf0e08, arg=arg@entry=0x7ffff6c39048, kw=0x0) at Objects/abstract.c:2067
result = <optimized out>
call = 0x7ffff79bc200 <method_call>
#24 0x00007ffff7a54937 in PyEval_CallObjectWithKeywords (func=0x7ffff6bf0e08, arg=0x7ffff6c39048, kw=<optimized out>) at Python/ceval.c:4111
result = <optimized out>
#25 0x00007ffff7a94fe2 in t_bootstrap (boot_raw=0x1581e20) at ./Modules/_threadmodule.c:999
boot = 0x1581e20
tstate = 0x1585f50
---Type <return> to continue, or q <return> to quit---
res = <optimized out>
#26 0x00007ffff772f314 in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#27 0x00007ffff746d3ed in clone () from /usr/lib/libc.so.6
No symbol table info available.
Comment by Matthias Dienstbier (fs4000) - Sunday, 21 December 2014, 14:47 GMT
system-config-printer should depend on cups-pk-helper. Installing it fixes the problem.
Comment by Andreas Radke (AndyRTR) - Sunday, 21 December 2014, 18:48 GMT
Added cups-pk-helper to the optional deps. Does this solve all errors that have been reported here? Check the pkg in testing.
Comment by Paul Marwick (toothandnail) - Monday, 22 December 2014, 16:59 GMT
After installing cups-pk-helper the "unlock" button is visible, but clicking on it does nothing at all. I've also just installed the new version of system-config-printer from testing, same result. The "unlock" button is now visible, but does not respond in any way.

I've got polkit-gnome installed, but it does not seem to be running. If I manually start /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1, the unlock button becomes active and the application then works as expected. I will have to check to see why the authentication agent is not starting automatically - from my reading, thought it would do so.

Looks as though the addition of cups-pk-helper and the new version fix the problem, so long as the authentication agent is available.
Comment by Matthias Dienstbier (fs4000) - Tuesday, 23 December 2014, 13:16 GMT
AFAIK only KDE, GNOME, Cinnamon, MATE and LXDE autostart a polkit-agent. Xfce and most other desktops do not include a polkit-agent.
Comment by Paul Marwick (toothandnail) - Tuesday, 23 December 2014, 20:11 GMT
I've managed to get polkit-gnome or lxpolkit to start, which solves the final problem with sysem-config-printer. It took a bit of work to get either polkit-agent to start. I had to copy the .desktop file to ~/.config/autostart and then tick activate it through Settings > Sessions & Startup > Application Autostart. For some reason, having the .desktop file in /etc/xdg/autostart does nothing under Xfce.

Still, that appears to fix the bug I reported originally. I now have system-config-printer working as designed. Thanks.

Loading...