FS#52599 - [gufw] does not start

Attached to Project: Community Packages
Opened by Marcelo Segura (LordTiva) - Tuesday, 17 January 2017, 15:57 GMT
Last edited by Levente Polyak (anthraxx) - Sunday, 23 September 2018, 16:34 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:


Additional info:
* package version(s)

gufw 17.04.1-3


* config and/or log files etc.

[usuario@Usuario-Linux ~]$ gufw
Unable to init server: Could not connect: Connection refused
Unable to init server: No se pudo conectar: Connection refused

(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_modifier_mask: assertion 'GDK_IS_KEYMAP (keymap)' failed
(gufw.py:4711): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:4711): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
/usr/sbin/gufw-pkexec: línea 13: 4711 Violación de segmento (`core' generado) python3 ${LOCATIONS[${i}]} $1


Steps to reproduce:

run gufw
This task depends upon

Closed by  Levente Polyak (anthraxx)
Sunday, 23 September 2018, 16:34 GMT
Reason for closing:  Upstream
Additional comments about closing:  https://bugs.launchpad.net/gui-ufw/+bug/ 1652857
https://bugs.launchpad.net/ubuntu/+sourc e/gui-ufw/+bug/1592380
Comment by fuan_k (fuan_k) - Tuesday, 17 January 2017, 16:31 GMT
It always irks me when someone doesn't at least translate the error output he gets and expects things to be fixed... Why bother reporting then? Anyway...
version: gufw 17.04.1-3 (community repo)
I get the same problem. Python segfaults:

/usr/sbin/gufw-pkexec: line 13: 20361 Segmentation fault (core dumped) python3 ${LOCATIONS[${i}]} $1

nupupun@P5E> journalctl -e
Jan 17 17:19:03 P5E polkitd[463]: Operator of unix-session:c25 successfully authenticated as unix-user:nupupun to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:20350:180741530 [/bin/sh /usr/sbin/gufw] (owned by unix-user:nupupun)
Jan 17 17:19:03 P5E pkexec[20352]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jan 17 17:19:03 P5E pkexec[20352]: nupupun: Executing command [USER=root] [TTY=/dev/pts/1] [CWD=/home/nupupun] [COMMAND=/usr/sbin/gufw-pkexec nupupun]
Jan 17 17:19:03 P5E kernel: python3[20361]: segfault at 0 ip 00007f784e39dc79 sp 00007ffce5159820 error 4 in libgtk-3.so.0.2200.7[7f784e0bb000+6fa000]
Jan 17 17:19:03 P5E systemd[1]: Started Process Core Dump (PID 20374/UID 0).
Jan 17 17:19:03 P5E systemd-coredump[20375]: Process 20361 (python3) of user 0 dumped core.

Stack trace of thread 20361:
#0 0x00007f784e39dc79 n/a (libgtk-3.so.0)
#1 0x00007f784e2399b8 n/a (libgtk-3.so.0)
#2 0x00007f784e24eaa4 n/a (libgtk-3.so.0)
#3 0x00007f784e23acec n/a (libgtk-3.so.0)
#4 0x00007f784e24e9cc n/a (libgtk-3.so.0)
#5 0x00007f784e24ea25 n/a (libgtk-3.so.0)
#6 0x00007f784e23b652 n/a (libgtk-3.so.0)
#7 0x00007f785635230f g_type_create_instance (libgobject-2.0.so.0)
#8 0x00007f78563341fb n/a (libgobject-2.0.so.0)
#9 0x00007f7856335c0d g_object_newv (libgobject-2.0.so.0)
#10 0x00007f78563363c4 g_object_new (libgobject-2.0.so.0)
#11 0x00007f784e256f0a n/a (libgtk-3.so.0)
#12 0x00007f784e434c67 n/a (libgtk-3.so.0)
#13 0x00007f785635230f g_type_create_instance (libgobject-2.0.so.0)
#14 0x00007f78563341fb n/a (libgobject-2.0.so.0)
#15 0x00007f7856335c0d g_object_newv (libgobject-2.0.so.0)
#16 0x00007f784e1e130a n/a (libgtk-3.so.0)
#17 0x00007f784e1e2965 n/a (libgtk-3.so.0)
#18 0x00007f784e1e4411 n/a (libgtk-3.so.0)
#19 0x00007f7856059b37 n/a (libglib-2.0.so.0)
#20 0x00007f785605a963 g_markup_parse_context_parse (libglib-2.0.so.0)
#21 0x00007f784e1e4846 n/a (libgtk-3.so.0)
#22 0x00007f784e1de4a1 gtk_builder_add_from_file (libgtk-3.so.0)
#23 0x00007f7855e091c8 ffi_call_unix64 (libffi.so.6)
#24 0x00007f7855e08c2a ffi_call (libffi.so.6)
#25 0x00007f78567d197c n/a (_gi.cpython-36m-x86_64-linux-gnu.so)
#26 0x00007f78567d3428 n/a (_gi.cpython-36m-x86_64-linux-gnu.so)
#27 0x00007f78567c71b9 n/a (_gi.cpython-36m-x86_64-linux-gnu.so)
#28 0x00007f7858b3a84c _PyObject_FastCallDict (libpython3.6m.so.1.0)
#29 0x00007f7858ae5b86 n/a (libpython3.6m.so.1.0)
#30 0x00007f7858aa1d77 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
#31 0x00007f7858ae4f9a _PyFunction_FastCallDict (libpython3.6m.so.1.0)
#32 0x00007f7858b3aa4e _PyObject_FastCallDict (libpython3.6m.so.1.0)
#33 0x00007f7858b3b852 _PyObject_Call_Prepend (libpython3.6m.so.1.0)
#34 0x00007f7858b3b91b PyObject_Call (libpython3.6m.so.1.0)
#35 0x00007f7858ace790 n/a (libpython3.6m.so.1.0)
#36 0x00007f7858b325ee n/a (libpython3.6m.so.1.0)
#37 0x00007f7858b3a84c _PyObject_FastCallDict (libpython3.6m.so.1.0)
#38 0x00007f7858ae5b86 n/a (libpython3.6m.so.1.0)
#39 0x00007f7858aa1d77 _PyEval_EvalFrameDefault (libpython3.6m.so.1.0)
#40 0x00007f7858ae5f47 PyEval_EvalCodeEx (libpython3.6m.so.1.0)
#41 0x00007f7858aa1a5b PyEval_EvalCode (libpython3.6m.so.1.0)
#42 0x00007f7858b6adc2 n/a (libpython3.6m.so.1.0)
#43 0x00007f7858b6d62d PyRun_FileExFlags (libpython3.6m.so.1.0)
#44 0x00007f7858b6d817 PyRun_SimpleFileExFlags (libpython3.6m.so.1.0)
#45 0x00007f7858b626f1 Py_Main (libpython3.6m.so.1.0)
#46 0x0000000000400a5d main (python3.6)
#47 0x00007f7858efd291 __libc_start_main (libc.so.6)
#48 0x0000000000400b9a _start (python3.6)

Comment by Levente Polyak (anthraxx) - Tuesday, 17 January 2017, 16:56 GMT
can't reproduce. Are you running x11 or wayland?
Can you try using a a default theme like Adwaita?
If that doesn't help, please report this issue upstream and add a reference over here :)
Comment by fuan_k (fuan_k) - Tuesday, 17 January 2017, 17:01 GMT
Using x11, same result using Adwaita.

Using i3wm, with XFCE's xfsettingsd running. Same problem under XFCE.

Edit: tested with another install running KDE, it works fine there. Very strange.
Comment by Levente Polyak (anthraxx) - Tuesday, 17 January 2017, 17:24 GMT
Can't get it to reproduce anywhere on multiple environments... please really report this upstream :/

can you also dump your exact package versions of:
python
python-gobject
gdk-pixbuf2
gtk3
Comment by fuan_k (fuan_k) - Tuesday, 17 January 2017, 17:52 GMT
Reported in an already existing bug report at gufw.

nupupun@P5E> expac -s "%-30n %v" 'python|gtk3|gdk|python-gobject|gdk-pixbuf2'
adwaita-x-dark-and-light-theme 1.3-2
cython 0.25.2-2
gdk-pixbuf2 2.36.4-1
gtk3 3.22.7-1
gtk3-print-backends 3.22.7-1
gtkmm3 3.22.0-1
lib32-gdk-pixbuf2 2.36.2-2
pamac 4.1.8-1
pygtk 2.24.0-6
python 3.6.0-2
python-appdirs 1.4.0-5
python-cairo 1.10.0-7
python-cchardet 1.1.2-1
python-chardet 2.3.0-3
python-dbus 1.2.4-2
python-dbus-common 1.2.4-2
python-gobject 3.22.0-2
python-packaging 16.8-2
python-pexpect 4.2.1-2
python-psutil 5.0.1-2
python-ptyprocess 0.5.1-2
python-pycups 1.9.73-3
python-pycurl 7.43.0-2
python-pyparsing 2.1.10-2
python-pysmbc 1.0.15.6-2
python-requests 2.12.4-2
python-setuptools 1:33.1.1-1
python-simplejson 3.10.0-2
python-six 1.10.0-3
python-termcolor 1.1.0-5
python-urllib3 1.19.1-2
python-xdg 0.25-4
python-yaml 3.12-2
python2 2.7.13-1
python2-appdirs 1.4.0-5
python2-cairo 1.10.0-2
python2-dbus 1.2.4-2
python2-gobject 3.22.0-2
python2-gobject2 2.28.6-13
python2-olefile 0.43-2
python2-packaging 16.8-2
python2-pillow 4.0.0-2
python2-pyparsing 2.1.10-2
python2-setuptools 1:33.1.1-1
python2-six 1.10.0-3
re2 20160901-1
vte3 0.46.1-1
webkitgtk 2.4.11-3
wxpython 3.0.2.0-2

It works fine in another install using KDE.
[nupupun@clevo ~]$ expac -s "%-30n %v" 'python|gtk3|gdk|python-gobject|gdk-pixbuf2'
gdk-pixbuf2 2.36.4-1
gtk3 3.22.7-1
gtkmm3 3.22.0-1
lib32-gdk-pixbuf2 2.36.2-2
pamac 4.1.8-1
python 3.6.0-2
python-cairo 1.10.0-7
python-chardet 2.3.0-3
python-dbus 1.2.4-2
python-dbus-common 1.2.4-2
python-gobject 3.22.0-2
python-psutil 5.0.1-2
python-pycups 1.9.73-3
python-pycurl 7.43.0-2
python-pysmbc 1.0.15.6-2
python-requests 2.12.4-2
python-simplejson 3.10.0-2
python-termcolor 1.1.0-5
python-urllib3 1.19.1-2
python2 2.7.13-1
re2 20160901-1
vte3 0.46.1-1
webkitgtk 2.4.11-3
wxpython 3.0.2.0-2
Comment by Marcelo Segura (LordTiva) - Tuesday, 17 January 2017, 17:55 GMT
Using x11 and Adwaita

python 3.6.0-2
python-gobject 3.22.0-2
gdk-pixbuf2 2.36.4-1
gtk3 3.22.7-1

Running 'gksudo gufw-pkexec' works without problems.
Comment by fuan_k (fuan_k) - Tuesday, 17 January 2017, 17:59 GMT
Alright, I think it's clear that it's a python2/3 issue.

I ran
sudo python3 /usr/lib/python3.6/site-packages/gufw/gufw.py

And it started fine. Clearly a problem with my default python environment.
gksudo gufw-pkexec does work indeed.

nupupun@P5E> cat $(which gufw-pkexec)
#!/bin/bash
LOCATIONS=(
"/usr/lib/python3.6/site-packages/gufw/gufw.py"
"/usr/lib/python3.6/dist-packages/gufw/gufw.py"
"/usr/share/gufw/gufw/gufw.py"
)

for ((i = 0; i < ${#LOCATIONS[@]}; i++))
do
if [[ -e "${LOCATIONS[${i}]}" ]]; then
python3 ${LOCATIONS[${i}]} $1
fi
done
Comment by Levente Polyak (anthraxx) - Tuesday, 17 January 2017, 18:27 GMT
@jk: can you post the reference to the ticket? so it will be easier to follow
Comment by fuan_k (fuan_k) - Tuesday, 17 January 2017, 19:23 GMT Comment by Jan Alexander Steffens (heftig) - Sunday, 29 January 2017, 20:23 GMT
Try running with GDK_BACKEND=x11 .
Comment by Liam JACK (ljack) - Sunday, 05 February 2017, 13:40 GMT
I've changed my theme to Adwaita, and executed "export GDK_BACKEND=x11", but I still get the same segfault error:

$ gufw
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Impossible de se connecter : Connection refused
[Various GTK errors]
(gufw.py:2920): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(gufw.py:2920): Gtk-CRITICAL **: _gtk_replace_virtual_modifiers: assertion 'GDK_IS_KEYMAP (keymap)' failed
[End of various GTK errors]
/usr/bin/gufw-pkexec : line 13 : 2920 Segmentation fault (core dumped)python3 ${LOCATIONS[${i}]} $1
Comment by Balló György (City-busz) - Sunday, 05 February 2017, 14:30 GMT
The problem is that gufw requires to run as root, but root applications don't have access to the Wayland compositor for security reasons. This affects all GUI applications that run with 'sudo' or 'pkexec'.

See more details:
https://bugzilla.redhat.com/show_bug.cgi?id=1274451
https://fedoraproject.org/wiki/Common_F25_bugs#Running_graphical_apps_with_root_privileges_.28e.g._gparted.29_does_not_work_on_Wayland

Upstream bug report:
https://bugs.launchpad.net/gui-ufw/+bug/1652857

Related bug report:
https://bugs.archlinux.org/task/51421
Comment by Levente Polyak (anthraxx) - Sunday, 05 February 2017, 14:36 GMT
^ thats why my first question was if its wayland or x11, but fuan_k seems to use x11
Comment by Polo (powlow) - Tuesday, 14 February 2017, 14:37 GMT
As a temporary workaround I just edited the /bin/gufw file:

````
#!/bin/bash
#c_user=$(whoami)
#pkexec gufw-pkexec $c_user
gksudo "python3 /usr/lib/python3.6/site-packages/gufw/gufw.py"
````
Comment by Ralph de Boom (PhoenixtheII) - Thursday, 30 March 2017, 15:40 GMT
Getting stacktrace here:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/gufw/gufw.py", line 30, in <module>
gufw = Gufw(controler.get_frontend())
File "/usr/lib/python3.6/site-packages/gufw/gufw/view/gufw.py", line 81, in __init__
self.winadd = Add(self)
File "/usr/lib/python3.6/site-packages/gufw/gufw/view/add.py", line 36, in __init__
self.apps = AppProfiles()
File "/usr/lib/python3.6/site-packages/gufw/gufw/view/add.py", line 492, in __init__
self.all_apps = self._load_from_files()
File "/usr/lib/python3.6/site-packages/gufw/gufw/view/add.py", line 499, in _load_from_files
cfg.read(glob.glob('*.*'))
File "/usr/lib/python3.6/configparser.py", line 696, in read
self._read(fp, filename)
File "/usr/lib/python3.6/configparser.py", line 1012, in _read
for lineno, line in enumerate(fp, start=1):
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 333: ordinal not in range(128)
Comment by 林卓 (36310285) - Saturday, 02 June 2018, 15:38 GMT
有人更新这个问题吗
Comment by Eli Schwartz (eschwartz) - Wednesday, 13 June 2018, 22:04 GMT
Could you try again with English? Most of the people on this bugtracker and all of the people in this ticket (including the package maintainer) aren't chinese and English is the accepted standard for communicating in international fora...

Loading...