Bug 29182 - mgaapplet-upgrade-helper crashed under Wayland session
Summary: mgaapplet-upgrade-helper crashed under Wayland session
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: High critical
Target Milestone: Mageia 10
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: IN_ERRATA8, IN_ERRATA9, IN_RELEASENOTES8, IN_RELEASENOTES9
: 29741 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-27 08:16 CEST by Daniel Kjellin
Modified: 2023-12-13 15:38 CET (History)
4 users (show)

See Also:
Source RPM: mgaonline
CVE:
Status comment: works ok under X session, not under a Wayland session.


Attachments

Description Daniel Kjellin 2021-06-27 08:16:13 CEST
The "mgaapplet-upgrade-helper" program crashed. Drakbug-18.21 caught it.

Ran "su -c 'mgaapplet-upgrade-helper --new_distro_version=8' " in a console, typed in root passwd and the applet crashed with the below trace. Tried running "xhost +si:localuser:root" before calling it, but problem persists. Upgrade does not start.

Can't locate object method "get_xid" via package "Glib::Object::_Unregistered::GdkWaylandWindow" at /usr/libexec/mgaapplet-upgrade-helper line 209.
Perl's trace:
drakbug::bug_handler() called from /usr/libexec/mgaapplet-upgrade-helper:209
main::upgrade() called from /usr/libexec/mgaapplet-upgrade-helper:78

Theme name: Adwaita
Kernel version = 5.10.45-desktop-2.mga7
Distribution=Mageia release 8 (Cauldron) for x86_64
CPU=Intel(R) Core(TM) i7-8086K CPU @ 4.00GHz
Dave Hodgins 2021-06-27 08:54:58 CEST

CC: (none) => davidwhodgins
Severity: major => critical
Priority: Normal => High
Assignee: bugsquad => mageiatools

Comment 1 Daniel Kjellin 2021-06-27 09:12:41 CEST
My system runs Wayland, I logged out and logged in again under Xorg and issued "su -c 'mgaapplet-upgrade-helper --new_distro_version=8'" the upgrade started and completed without issue. After reboot I logged in again using Wayland and everything seems to work.
Comment 2 Aurelien Oudelet 2021-06-27 09:44:43 CEST
(In reply to Daniel Kjellin from comment #1)
> My system runs Wayland, I logged out and logged in again under Xorg and
> issued "su -c 'mgaapplet-upgrade-helper --new_distro_version=8'" the upgrade
> started and completed without issue. After reboot I logged in again using
> Wayland and everything seems to work.

I was wondering this.

Such application must be run as root and, at the moment, running root owned GUI apps under Wayland is not supported.

This bug report should be a reminder for our devs to take a look at this future feature.

Thanks again reporting this.
As Mageia 7 will EOL near couple of days, assigning against Cauldron version with Mageia 9 milestone.

Target Milestone: --- => Mageia 9
Hardware: x86_64 => All
CC: (none) => ouaurelien
Status comment: (none) => works ok under X session, not under a Wayland session.
Source RPM: mgaonline-3.30-1.mga7 => mgaonline
Version: 7 => Cauldron
Summary: mgaapplet-upgrade-helper crashed => mgaapplet-upgrade-helper crashed under Wayland session

Comment 3 Daniel Kjellin 2021-06-27 13:54:44 CEST
>Such application must be run as root and, at the moment, running root owned GUI
> apps under Wayland is not supported.

I understand, maybe we should add a note to the errata? Like you say Mageia 7 is EOL in a couple of days, and there are bound to be a few more people like me that are a bit behind our upgrades. I did open the errata but felt uncertain where to best put this note? Maybe even under the upgrade guide? Something like "Note that, at present you cannot upgrade using the GUI if you run Wayland, either use an X session for the upgrade or use a CMD line upgrade option"
Comment 4 Dave Hodgins 2021-06-27 18:49:21 CEST
I'm concerned about upgrades being done using mgaapplet, which runs
 $mdv_update_pid = fork_exec('mgaapplet-upgrade-helper', "--new_distro_version=$new_distro->{version}",

A yet to be tested fix would be to change it to
 $mdv_update_pid = fork_exec('XDG_SESSION_TYPE=x11 mgaapplet-upgrade-helper', "--new_distro_version=$new_distro->{version}",

or 
 $mdv_update_pid = fork_exec('XDG_SESSION_TYPE=x11 dbus-run-session mgaapplet-upgrade-helper', "--new_distro_version=$new_distro->{version}",

If either of those changes work, then the fix could be rolled out for m7
quickly.

We make exceptions to allow updates for otherwise end of support releases for
fixes to fix problems upgrading.
Comment 5 Lewis Smith 2021-12-08 20:40:10 CET
*** Bug 29741 has been marked as a duplicate of this bug. ***

CC: (none) => flink

Comment 6 Franz Holzinger 2021-12-08 21:22:08 CET
I confirm this bug.
What should I do now to get the "mgaapplet-upgrade-helper" started?
Comment 7 sturmvogel 2021-12-08 23:22:58 CET
See Comment 1. Log out, login in under Xorg, run the upgrade...
Comment 8 Morgan Leijström 2021-12-09 19:02:17 CET
In https://wiki.mageia.org/en/Mageia_8_Errata#Plasma, 
... bug 28365 "- Control Center does not start in Plasma Wayland - Temporary fix: as normal user, first issue xhost +si:localuser:root"

Does that tip work in this case?

---

Noting for later action: Yes this should be in errata.
Maybe it is but there should be more prominently a Wayland section maybe, and mgaapplet-upgrade-helper mentioned.

Keywords: (none) => FOR_ERRATA8
CC: (none) => fri

Comment 9 Morgan Leijström 2021-12-14 18:46:31 CET
Unfortunately not yet a reponse to question in comment 9.


Entered top in
https://wiki.mageia.org/en/Mageia_8_Errata#Various_upgrade_issues

And as first point in
https://wiki.mageia.org/en/Mageia_8_Release_Notes#Upgrading_online.2C_using_mgaonline_.28GUI.29


Apparently the problem is in Mageia 7 which it fail upgrading from, but as mga 7 is EOL, I keep this set to mga8 as we believe the problem is still here unless we fix it before mga9.

Version: Cauldron => 8
Keywords: FOR_ERRATA8 => IN_ERRATA8, IN_RELEASENOTES8

Comment 10 Morgan Leijström 2023-03-11 11:57:05 CET
This bug have target mageia 9 and is not marked fixed.  Is it still valid?

  If valid:

Should be noted like for mga8, see comment 9

And maybe also
https://wiki.mageia.org/en/How_to_choose_the_right_Mageia_upgrade_method

  If not:

Mark this bug fixed.
(it is already set to mga8 which is correct, where the upgrade start)
Comment 11 Morgan Leijström 2023-06-01 11:43:22 CEST
This is actually still in in errata 9 (which was copied from 8), but is removed from release notes.

So I set this "for errata"  *so we do not forget to check it*

- If valid: enter it in release notes, like for mga8
- If not valid: remove from errata 9.

Keywords: (none) => FOR_ERRATA9

Comment 12 Daniel Kjellin 2023-12-13 13:04:25 CET
I have tested it trying to upgrade a clean fully updated Mageia 8 system and I get the same error.

As I noted in the initial report I did try setting 
"xhost +si:localuser:root" before calling it, but problem persists."
This is true under Mageia 8 as well.
Comment 13 Morgan Leijström 2023-12-13 15:38:37 CET
Thank you Daniel

MGA8 EOL, still valid in MGA9.
Was already in 9 errata, added to 9 release notes.

@Developers:
If not fixable then instead maybe make the online tool warn.

Keywords: FOR_ERRATA9 => IN_ERRATA9, IN_RELEASENOTES9
Version: 8 => 9
Target Milestone: Mageia 9 => Mageia 10


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