Bug 30004 - msec-gui crashes at launch
Summary: msec-gui crashes at launch
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2022-02-05 17:34 CET by Yann Ciret
Modified: 2022-05-15 12:07 CEST (History)
10 users (show)

See Also:
Source RPM: msec-2.9-2.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Yann Ciret 2022-02-05 17:34:47 CET
Description of problem:
From MCC or CLI, msec-gui crashes at launch

Version-Release number of selected component (if applicable):
2.9-2.mga9

How reproducible:
From a terminal in Plasma session, launch msecgui command.

# LC_ALL=C msecgui
/usr/share/msec/msecgui.py:22: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkPixbuf
libEGL warning: DRI2: failed to authenticate
/usr/share/msec/msecgui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
INFO: Starting gui..
INFO: Chargement du fichier d’exceptions /etc/security/msec/exceptions : [Errno 2] No such file or directory: '/etc/security/msec/exceptions'
INFO: Pas d'exceptions chargées
INFO: Niveau msec de base détecté 'none'
Traceback (most recent call last):
  File "/usr/share/msec/msecgui.py", line 1789, in <module>
    gui = MsecGui(log, msec, perms, msec_config, perm_conf, exceptions, embed=PlugWindowID)
  File "/usr/share/msec/msecgui.py", line 182, in __init__
    self.window.connect('delete-event', self.quit)
TypeError: <Gtk.Window object at 0x7effb0532380 (GtkWindow at 0x26fe290)>: unknown signal name: delete-event
Comment 1 Lewis Smith 2022-02-06 21:23:19 CET
Thank you for the report.

For the record, 'msecgui' on Mageia 8 does work, although with a raft of console warning messages which I refrain from posting.

Having to assign this globally, no individual looks after 'msec'.

Assignee: bugsquad => pkg-bugs

Comment 2 Ben McMonagle 2022-04-12 09:35:41 CEST
confirming report

CC: (none) => westel

Comment 3 papoteur 2022-04-13 08:01:26 CEST
msec is a Mageia tools.
Assignee should be set accordingly.
Papoteur

CC: (none) => yves.brungard_mageia
Assignee: pkg-bugs => mageiatools

Comment 4 papoteur 2022-04-13 09:46:25 CEST
I don't reproduce this bug in the actual cauldron.
Is this bug still valid with an updated machine?
Comment 5 Ben McMonagle 2022-04-13 10:09:28 CEST
just updated (from Princeton.edu mirror).
my system is x86_64.mga9 (all DE).

issue is still evident, both from plasma and xfce DE.

failure from konsole is as first post.
attempt from MCC => "This program has exited abnormally"
Comment 6 papoteur 2022-04-19 19:23:04 CEST
> /usr/share/msec/msecgui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0')

It could be that the program uses GTK4 instead of GTK 3. Release 2.11 should fix it.
Comment 7 Ben McMonagle 2022-04-22 07:01:23 CEST
info:

new cauldron ldxe install today.

then added task-xfce and check mscgui - ok
added task-mate and check mscgui - ok
added task-cinnamon and check mscgui - ok
added task-lxqt and check mscgui - ok
added task-plasma5 and check mscgui - ok
added task-gnome and check mscgui - failure
Comment 8 Ben McMonagle 2022-04-22 09:16:53 CEST
(In reply to Ben McMonagle from comment #7)
> info:
> 
> new cauldron ldxe install today.
> 
> then added task-xfce and check mscgui - ok
> added task-mate and check mscgui - ok
> added task-cinnamon and check mscgui - ok
> added task-lxqt and check mscgui - ok
> added task-plasma5 and check mscgui - ok
> added task-gnome and check mscgui - failure

typo:  mscgui => msecgui
Comment 9 Ben McMonagle 2022-04-22 09:18:32 CEST
(In reply to Ben McMonagle from comment #7)
> info:
> 
> new cauldron ldxe install today.
> 

> added task-gnome and check msecgui - failure


will investigate task-gnome to isolate package(s)
Comment 10 papoteur 2022-04-23 11:20:31 CEST
Hi Ben. What you can try is to modifiy
/usr/share/msec/msecgui.py
with the version from 
http://gitweb.mageia.org/software/msec/tree/src/msec/msecgui.py
(needs root privileges)
Comment 11 Ben McMonagle 2022-04-24 04:43:10 CEST
(In reply to papoteur from comment #10)
> Hi Ben. What you can try is to modifiy
> /usr/share/msec/msecgui.py
> with the version from 
> http://gitweb.mageia.org/software/msec/tree/src/msec/msecgui.py
> (needs root privileges)

as root saved as /usr/share/msec/msecgui-old.py
as root kwrite /usr/share/msec/msecgui.py
deleted contents of /usr/share/msec/msecgui.py
copied http://gitweb.mageia.org/software/msec/tree/src/msec/msecgui.py text into krite /usr/share/msec/msecgui.py and saved
exit kwrite .

invoked msecgui from root terminal -success.

will try the "new install" from 22/04- unavailable until 26/04, and report.
Comment 12 Ben McMonagle 2022-04-25 23:54:54 CEST
that makes 2 from 2 -ok, both 64bit

if  Yann Ciret (mageia@zamiz.fr) OP can also confirm, this can be closed
Comment 13 papoteur 2022-04-26 11:56:37 CEST
I think that this bug can also occurs in Mageia 8. An update should be ported to Mageia 8, thus.

Whiteboard: (none) => MGA8TOO

Comment 14 Thierry Vignaud 2022-04-29 17:04:52 CEST
2.11 failed to build.
You need more consistency in Makefile rules I guess
https://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20220429150032.tv.duvel.1805456/log/msec-2.11-1.mga9/build.x86_64.0.20220429150107.log

CC: (none) => thierry.vignaud

Comment 15 Thierry Vignaud 2022-04-29 17:07:36 CEST
When workarounding that, it fails later:
https://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20220429150541.tv.duvel.1822044/log/msec-2.11-1.mga9/build.x86_64.0.20220429150606.log

Please test the build locally next time
Comment 16 papoteur 2022-05-03 09:32:25 CEST
There is now:
msec-2.11-1.mga9
msec-2.11-1.mga8

Assignee: mageiatools => qa-bugs

Thomas Backlund 2022-05-03 16:04:00 CEST

Whiteboard: MGA8TOO => (none)
Version: Cauldron => 8

Comment 17 Herman Viaene 2022-05-03 16:16:57 CEST
MGA8-64 Plasma on Lenovo B50 in Dutch.
No installation issues, jut remarked that the msecgui package is not upgraded.
Run from CLI as root, works OK, but loads of feedback at the CLI:
/usr/share/msec/msecgui.py:22: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkPixbuf
/usr/share/msec/msecgui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
INFO: Starting gui..
INFO: uitzonderingenbestand /etc/security/msec/exceptions: [Errno 2] No such file or directory: '/etc/security/msec/exceptions' laden
INFO: Geen uitzonderingen geladen
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.8/logging/__init__.py", line 1088, in emit
    stream.write(msg + self.terminator)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in position 47: ordinal not in range(256)
Call stack:
  File "/usr/share/msec/msecgui.py", line 1789, in <module>
    gui = MsecGui(log, msec, perms, msec_config, perm_conf, exceptions, embed=PlugWindowID)
  File "/usr/share/msec/msecgui.py", line 173, in __init__
    self.reload_config()
  File "/usr/share/msec/msecgui.py", line 473, in reload_config
    self.log.info(_("Detected base msec level '%s'") % level)
  File "/usr/share/msec/libmsec.py", line 165, in info
    self.logger.info(message)
Message: 'Msec-basisniveau \u2018standard\u2019 gevonden'

Not sure whether this is significant in some way, I would not object the OK.

CC: (none) => herman.viaene

Comment 18 Dave Hodgins 2022-05-03 19:49:37 CEST
(In reply to Herman Viaene from comment #17)
> MGA8-64 Plasma on Lenovo B50 in Dutch.
> --- Logging error ---
> Traceback (most recent call last):
>   File "/usr/lib64/python3.8/logging/__init__.py", line 1088, in emit
>     stream.write(msg + self.terminator)
> UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in
> position 47: ordinal not in range(256)
> Call stack:
>   File "/usr/share/msec/msecgui.py", line 1789, in <module>
>     gui = MsecGui(log, msec, perms, msec_config, perm_conf, exceptions,
> embed=PlugWindowID)
>   File "/usr/share/msec/msecgui.py", line 173, in __init__
>     self.reload_config()
>   File "/usr/share/msec/msecgui.py", line 473, in reload_config
>     self.log.info(_("Detected base msec level '%s'") % level)
>   File "/usr/share/msec/libmsec.py", line 165, in info
>     self.logger.info(message)
> Message: 'Msec-basisniveau \u2018standard\u2019 gevonden'
> 
> Not sure whether this is significant in some way, I would not object the OK.

I think that indicates the Dutch translation has utf-8 open/close quotes where
it should have ascii ' or ". That's not ok and needs to be fixed, assuming the
old version didn't have the same problem.

CC: (none) => davidwhodgins

Comment 19 Dave Hodgins 2022-05-03 20:00:08 CEST
u2018 is ‘ and u2019 is ’. They should be replaced by the ascii ' (hex 27).
Adding the internationalization team to the cc list.

CC: (none) => i18n-bugs

Comment 20 Morgan Leijström 2022-05-04 08:41:05 CEST
mga8-64, plasma, Swedish
This system did not show the original problem.
Updated and launced it, looks OK, dont show the problem of u2018 / u2019.

CC: (none) => fri

Comment 21 Thomas Andrews 2022-05-04 16:57:30 CEST
mga8-64, Plasma, US English.

When run from the CLI, this system showed lots of verbiage, but launched and looked OK. No installation issues with the update. Launching again shows this in the terminal, different from the messages Herman saw:

/usr/share/msec/msecgui.py:22: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkPixbuf
/usr/share/msec/msecgui.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
INFO: Starting gui..
INFO: loading exceptions file /etc/security/msec/exceptions: [Errno 2] No such file or directory: '/etc/security/msec/exceptions'
INFO: No exceptions loaded
INFO: Detected base msec level 'standard'
/usr/share/msec/msecgui.py:236: DeprecationWarning: Gtk.Widget.modify_font is deprecated
  label.modify_font(Pango.FontDescription("13"))
/usr/lib/python3.8/site-packages/gi/overrides/Gtk.py:1533: DeprecationWarning: Gtk.Table.attach is deprecated
  Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
ERROR: Unable to parse firewall configuration: 'int' object is not subscriptable
/usr/share/msec/msecgui.py:833: DeprecationWarning: Gtk.TreeView.set_rules_hint is deprecated
  treeview.set_rules_hint(True)

Lots of notices about depreciated Gtk stuff there, don't know if it is significant.

CC: (none) => andrewsfarm

Comment 22 papoteur 2022-05-04 18:10:11 CEST
> ERROR: Unable to parse firewall configuration: 'int' object is not subscriptable

This is a problem.
You should see that Firewall is seen as disabled. But this is false.

Release 2.12 is on the way.

> /usr/share/msec/msecgui.py:22: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.

This says that msec-gui 2.11 is not installed.
Comment 23 Thomas Andrews 2022-05-04 18:24:30 CEST
(In reply to papoteur from comment #22)
 > /usr/share/msec/msecgui.py:22: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded.
> 
> This says that msec-gui 2.11 is not installed.

I didn't reboot before testing the update. Should I?
Comment 24 Thomas Andrews 2022-05-04 18:28:56 CEST
OK, I see now. I used the package names in Comment 16 in qarepo. That list did not include msec-gui, so it wasn't updated.
Comment 25 Thomas Andrews 2022-05-04 18:34:29 CEST
With msec-gui finally updated, terminal messages are fewer, but the firewall message is still there:

INFO: Starting gui..
INFO: loading exceptions file /etc/security/msec/exceptions: [Errno 2] No such file or directory: '/etc/security/msec/exceptions'
INFO: No exceptions loaded
INFO: Detected base msec level 'standard'
/usr/share/msec/msecgui.py:239: DeprecationWarning: Gtk.Widget.modify_font is deprecated
  label.modify_font(Pango.FontDescription("13"))
/usr/lib/python3.8/site-packages/gi/overrides/Gtk.py:1533: DeprecationWarning: Gtk.Table.attach is deprecated
  Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
ERROR: Unable to parse firewall configuration: 'int' object is not subscriptable
/usr/share/msec/msecgui.py:494: DeprecationWarning: Gtk.TreeView.set_rules_hint is deprecated
  treeview.set_rules_hint(True)
Comment 26 Dave Hodgins 2022-05-04 20:07:47 CEST
The Dutch translation is the only one with the wrong quotes, typically caused
by using oowriter or similar as an editor ...
# grep '‘' /usr/share/locale/*/LC_MESSAGES/msec.mo
grep: /usr/share/locale/nl/LC_MESSAGES/msec.mo: binary file matches
The comments in the .mo file show Marcel was the last translator for that
file. Adding Marcel to the cc list. Marcel, please see Comment 18 and 19.

CC: (none) => marcel

Comment 27 Dave Hodgins 2022-05-04 20:21:13 CEST
I just checked, and the problem with the Dutch translation is not a regression,
so that will not hold the update, though it would be nice to get it fixed if
another build is needed for this update.

ERROR: Unable to parse firewall configuration: 'int' object is not subscriptable
is a regression, so this update cannot proceed till it's fixed.

Adding the feedback marker until then.

Keywords: (none) => feedback

Comment 28 Dave Hodgins 2022-05-04 21:04:22 CEST
Bug 30376 opened for the Dutch translations having utf-8 open/close quotes
instead of ascii quotes. It affects many other packages, not just msec.
Comment 29 papoteur 2022-05-13 15:42:55 CEST
New release :
msec-gui-2.12-1.mga8
msec-2.12-1.mga8
papoteur 2022-05-13 15:43:39 CEST

Keywords: feedback => (none)

Comment 30 Thomas Andrews 2022-05-13 16:00:43 CEST
No installation issues with the new packages. Ran msecgui from the terminal, and the gui came up looking as I believe it should. Messages in the terminal are now as follows:

# msecgui
INFO: Starting gui..
INFO: loading exceptions file /etc/security/msec/exceptions: [Errno 2] No such file or directory: '/etc/security/msec/exceptions'
INFO: No exceptions loaded
INFO: Detected base msec level 'standard'
/usr/share/msec/msecgui.py:239: DeprecationWarning: Gtk.Widget.modify_font is deprecated
  label.modify_font(Pango.FontDescription("13"))
/usr/lib/python3.8/site-packages/gi/overrides/Gtk.py:1533: DeprecationWarning: Gtk.Table.attach is deprecated
  Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
/usr/share/msec/msecgui.py:494: DeprecationWarning: Gtk.TreeView.set_rules_hint is deprecated
  treeview.set_rules_hint(True)


Nothing about the firewall this time. Unknown if the original problem is still fixed, as I never did replicate it.
Comment 31 papoteur 2022-05-13 16:04:55 CEST
Source:
msec-2.12-1.mga8.src.rpm
Comment 32 Herman Viaene 2022-05-14 11:01:50 CEST
Feedback on this installation for msecgui:
# msecgui 
INFO: Starting gui..
INFO: uitzonderingenbestand /etc/security/msec/exceptions: [Errno 2] No such file or directory: '/etc/security/msec/exceptions' laden
INFO: Geen uitzonderingen geladen
INFO: Msec-basisniveau 'standard' gevonden
/usr/share/msec/msecgui.py:239: DeprecationWarning: Gtk.Widget.modify_font is deprecated
  label.modify_font(Pango.FontDescription("13"))
/usr/lib/python3.8/site-packages/gi/overrides/Gtk.py:1533: DeprecationWarning: Gtk.Table.attach is deprecated
  Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
/usr/share/msec/msecgui.py:494: DeprecationWarning: Gtk.TreeView.set_rules_hint is deprecated
  treeview.set_rules_hint(True)
Went thru the configuration ofthe firewall, was no active, set some rules and activate it. Remark that the status of the firewall remains "disabled" in the main window. Closing and opening msecgui againnow revealsthe correct enabled status.
I vaguely seem to remember such status issues before, and the issue with Dutch seems to be gone, so I will OK it, unless someone elsehas other issues.

Whiteboard: (none) => MGA8-64-OK

Comment 33 Thomas Andrews 2022-05-15 03:45:37 CEST
Validating.

CC: (none) => sysadmin-bugs
Keywords: (none) => validated_update

Dave Hodgins 2022-05-15 04:34:50 CEST

Keywords: (none) => advisory

Comment 34 Mageia Robot 2022-05-15 12:07:42 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2022-0068.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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