Bug 1580984 - xfce-polkit crashes directly
Summary: xfce-polkit crashes directly
Keywords:
Status: CLOSED DUPLICATE of bug 1581495
Alias: None
Product: Fedora
Classification: Fedora
Component: xfce-polkit
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-21 22:33 UTC by ben haubeck
Modified: 2018-05-23 19:05 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-23 19:05:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
strace /usr/libexec/xfce-polkit &>tmp/stace_xfce-polkit (759.20 KB, text/plain)
2018-05-22 01:51 UTC, ben haubeck
no flags Details

Description ben haubeck 2018-05-21 22:33:59 UTC
Description of problem:
whenever I login into my GUI (I am using XFCE), xfce-polkit crashes:

ben@trouble2> /usr/libexec/xfce-polkit                                                                                 

** (xfce-polkit:15774): CRITICAL **: 00:23:47.492: polkit_agent_listener_register_with_options: assertion 'POLKIT_IS_SUBJECT (subject)' failed

(xfce-polkit:15774): GLib-GObject-CRITICAL **: 00:23:50.115: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[1] ben@trouble2>              

polkit daemon looks alright: 
root@trouble2> systemctl status polkit                                                                                                                                       /home/ben/tmp
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: enabled)
   Active: active (running) since Tue 2018-05-22 00:04:54 CEST; 25min ago
     Docs: man:polkit(8)
 Main PID: 1136 (polkitd)
    Tasks: 16 (limit: 4915)
   Memory: 26.2M
   CGroup: /system.slice/polkit.service
           └─1136 /usr/lib/polkit-1/polkitd --no-debug

May 22 00:04:54 trouble2 polkitd[1136]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
May 22 00:04:54 trouble2 systemd[1]: Started Authorization Manager.
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.suspend']
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t>
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.hibernate']
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t>
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny']
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t>
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny']
May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t>
lines 1-20/20 (END)


Version-Release number of selected component (if applicable):

[1] ben@trouble2> rpm -qa |grep polkit                                                                                      
polkit-0.114-1.fc28.x86_64
polkit-libs-0.114-1.fc28.x86_64
polkit-pkla-compat-0.1-12.fc28.x86_64
xfce-polkit-0.2-12.fc28.x86_64
polkit-qt5-1-0.112.0-13.fc28.x86_64
polkit-qt-0.112.0-13.fc28.x86_64
ben@trouble2>          


How reproducible:

everytime



Steps to Reproduce:
1. install xfce4
2. login into XFCE and start  /usr/libexec/xfce-polkit 


Actual results:
** (xfce-polkit:15774): CRITICAL **: 00:23:47.492: polkit_agent_listener_register_with_options: assertion 'POLKIT_IS_SUBJECT (subject)' failed


Expected results:
a working polkit session

Additional info:
i am happy to provide more information

Comment 1 ben haubeck 2018-05-22 01:51:59 UTC
Created attachment 1439786 [details]
strace /usr/libexec/xfce-polkit &>tmp/stace_xfce-polkit

Comment 2 ben haubeck 2018-05-22 02:09:08 UTC
maybe xfce-polkit is only the victim of something else, that went wrong, because this should "just work", right: 

ben@trouble2> systemctl --user                                                                    
Failed to list units: Process org.freedesktop.systemd1 exited with status 1
[1] ben@trouble2>

Comment 3 ben haubeck 2018-05-22 02:33:30 UTC
the cause for failing "systemctl --user" might be 

ben@trouble2> echo $XDG_SESSION_ID                                                                
ben@trouble2>                       


ben@trouble2> rpm -qa |grep systemd                                                               ~
python3-systemd-234-5.fc28.x86_64
systemd-container-238-8.git0e0aa59.fc28.x86_64
fail2ban-systemd-0.10.2-1.fc28.noarch
kcm_systemd-1.2.1-10.fc28.x86_64
systemd-pam-238-8.git0e0aa59.fc28.x86_64
oci-systemd-hook-0.1.16-1.git05bd9a0.fc28.x86_64
systemd-bootchart-233-1.fc28.x86_64
systemd-libs-238-8.git0e0aa59.fc28.x86_64
python-systemd-doc-234-5.fc28.x86_64
rpm-plugin-systemd-inhibit-4.14.1-7.fc28.x86_64
systemd-238-8.git0e0aa59.fc28.x86_64
libreport-plugin-systemd-journal-2.9.5-1.fc28.x86_64
python2-systemd-234-5.fc28.x86_64
systemd-udev-238-8.git0e0aa59.fc28.x86_64

Comment 4 ben haubeck 2018-05-22 06:49:51 UTC
it looks like that the XDG_SESSION_TYPE must be set to (in my case): 

 XDG_SESSION_TYPE="wayland dbus-run-session xfce4-session"

but it was also empty. 
as I have set it manually and started a xfce-session manually afterwards, policykit worked right away without complaining. 

now I only have to carve out, where 

XDG_SESSION_TYPE

is getting set...

Comment 5 Raphael Groner 2018-05-22 18:19:21 UTC
(In reply to ben haubeck from comment #4)
…
> now I only have to carve out, where 
> 
> XDG_SESSION_TYPE
> 
> is getting set...

The XDG environment is usually a job of the display manager. Can you reproduce with gdm as the default of the XFCE spin?
https://www.reddit.com/r/archlinux/comments/4efx1h/how_to_actually_start_gnome_on_wayland_without_a/

(In reply to ben haubeck from comment #1)
> the cause for failing "systemctl --user" might be 
> 
> ben@trouble2> echo $XDG_SESSION_ID                                                                
> ben@trouble2>     

It seems you try to use Wayland. Indeed, systemd has a special handling for Wayland sessions.
https://www.freedesktop.org/software/systemd/man/pam_systemd.html

You could also try the tweaks mentioned for ArchLinux, no guarantee for Fedora:
https://wiki.archlinux.org/index.php/GNOME#Wayland_sessions

Well, I don't have any idea if upstream has any intentions to support wayland.

Comment 6 Raphael Groner 2018-05-22 18:33:10 UTC
Sorry, better try with lightdm instead of gdm or whatever display manager.

Comment 7 Kevin Fenzi 2018-05-23 01:03:05 UTC
so, you aren't supposed to call /usr/libexec/xfce-polkit directly, so thats not expected to work. You can try running something with 'pkexec' to test, ie 'pkexe id' should call pokit, using xfce-polkit and ask you for authentication then run 'id'. 

I'm assuming thats not working anymore, which makes me think this might be a duplicate of bug 1581495

Do you have 'pam-kwallet' installed? If you disable or remove that package and logout/back in does it start working?

Comment 8 Raphael Groner 2018-05-23 05:52:51 UTC
Maybe modify autostart desktop file to properly work with wayland?
But I got information that XFCE in general does not support wayland (yet), officially.

Comment 9 ben haubeck 2018-05-23 18:52:54 UTC
@Kevin, comment7: 

you are great, thx a lot!
after removing pam-kwallet that was just there (I assume), because I tried out KDE years ago, it worked flawlessly again!

thx!

ben

Comment 10 Kevin Fenzi 2018-05-23 19:05:43 UTC
Thank all the folks that tracked down that other bug. ;) It was a weird one... 

Glad it's working for you now.

*** This bug has been marked as a duplicate of bug 1581495 ***


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