Bug 482730 - xdg-desktop-portal-kde coredumps when system boots
Summary: xdg-desktop-portal-kde coredumps when system boots
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-07 15:27 UTC by Koshika
Modified: 2024-03-12 00:03 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: Frameworks 6.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Koshika 2024-03-07 15:27:08 UTC
SUMMARY
looks like systemd is trying to start portal service too early. i dont know if this makes any sense sense in systemd terms, but looks like it fails to start service in system-space and proceeds correctly start and succeed the service in user-space.

error trace in logs read as follows;
systemd[1]: Starting Daemon for power management...                                                                            
systemd[1]: Started Daemon for power management.                                                                               
systemd[1058]: Starting Portal service...                                                                                      
systemd[1058]: Starting flatpak document portal service...                                                                     
systemd[1058]: Starting sandboxed app permission store...                                                                      
systemd[1058]: Started sandboxed app permission store.                                                                         
systemd[1058]: Started flatpak document portal service.                                                                        
xdg-desktop-por[1218]: Choosing gtk.portal for org.freedesktop.impl.portal.Lockdown as a last-resort fallback                  
xdg-desktop-por[1218]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(
systemd[1058]: Starting Portal service (GTK/GNOME implementation)...                                                           
xdg-desktop-por[1239]: cannot open display:                                                                                    
systemd[1058]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE                              
systemd[1058]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.                                                 
systemd[1058]: Failed to start Portal service (GTK/GNOME implementation).                                                      
systemd[1]: Starting RealtimeKit Scheduling Policy Service...                                                                  
systemd[1]: Started RealtimeKit Scheduling Policy Service.                                                                     
rtkit-daemon[1244]: Successfully called chroot.                                                                                
rtkit-daemon[1244]: Successfully dropped privileges.                                                                           
rtkit-daemon[1244]: Successfully limited resources.                                                                            
rtkit-daemon[1244]: Running.                                                                                                   
rtkit-daemon[1244]: Watchdog thread running.                                                                                   
rtkit-daemon[1244]: Canary thread running.                                                                                     
rtkit-daemon[1244]: Supervising 0 threads of 0 processes of 0 users.                                                           
rtkit-daemon[1244]: Supervising 0 threads of 0 processes of 0 users.                                                           
rtkit-daemon[1244]: Supervising 0 threads of 0 processes of 0 users.                                                           
systemd[1058]: Starting Xdg Desktop Portal For KDE...                                                                          
xdg-desktop-portal-kde[1249]: This application failed to start because no Qt platform plugin could be initialized.
                              Available platform plugins are: vkkhrdisplay, wayland-egl, offscreen, wayland, eglfs, minimal, vn│
systemd[1]: Created slice Slice /system/systemd-coredump.                                                                      
systemd[1]: Started Process Core Dump (PID 1254/UID 0).                                                                        
systemd-coredump[1256]: Process 1249 (xdg-desktop-por) of user 968 dumped core.             
           Stack trace of thread 1249:                                                                                                    │
│           #0  0x00007fa77cc1e32c n/a (libc.so.6 + 0x9132c)                                                                               │
│           #1  0x00007fa77cbcd6c8 raise (libc.so.6 + 0x406c8)                                                                             │
│           #2  0x00007fa77cbb54b8 abort (libc.so.6 + 0x284b8)                                                                             │
│           #3  0x00007fa77d078924 n/a (libQt6Core.so.6 + 0x8a924)                                                                         │
│           #4  0x00007fa77d079135 _ZNK14QMessageLogger5fatalEPKcz (libQt6Core.so.6 + 0x8b135)                                             │
│           #5  0x00007fa77d69dbe9 n/a (libQt6Gui.so.6 + 0xd9be9)                                                                          │
│           #6  0x00007fa77d738a18 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt6Gui.so.6 + 0x174a18)                        │
│           #7  0x00007fa77d12bb15 _ZN23QCoreApplicationPrivate4initEv (libQt6Core.so.6 + 0x13db15)                                        │
│           #8  0x00007fa77d738ac1 _ZN22QGuiApplicationPrivate4initEv (libQt6Gui.so.6 + 0x174ac1)                                          │
│           #9  0x00007fa77ded83ee _ZN19QApplicationPrivate4initEv (libQt6Widgets.so.6 + 0xf53ee)                                          │
│           #10 0x0000559faa6238e6 n/a (xdg-desktop-portal-kde + 0x258e6)                                                                  │
│           #11 0x00007fa77cbb6cd0 n/a (libc.so.6 + 0x29cd0)                                                                               │
│           #12 0x00007fa77cbb6d8a __libc_start_main (libc.so.6 + 0x29d8a)                                                                 │
│           #13 0x0000559faa623e65 n/a (xdg-desktop-portal-kde + 0x25e65)                                                                  │
│                                                                                                                                          │
│           Stack trace of thread 1253:                                                                                                    │
│           #0  0x00007fa77cc8c0bf __poll (libc.so.6 + 0xff0bf)                                                                            │
│           #1  0x00007fa77be7a2f6 n/a (libglib-2.0.so.0 + 0xb82f6)                                                                        │
│           #2  0x00007fa77be1a162 g_main_context_iteration (libglib-2.0.so.0 + 0x58162)                                                   │
│           #3  0x00007fa77d3619c4 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0│
│           #4  0x00007fa77d131d6e _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x143d6e)                      │
│           #5  0x00007fa77d20f06f _ZN7QThread4execEv (libQt6Core.so.6 + 0x22106f)                                                         │
│           #6  0x00007fa77e5a39df n/a (libQt6DBus.so.6 + 0x299df)                                                                         │
│           #7  0x00007fa77d28ebd3 n/a (libQt6Core.so.6 + 0x2a0bd3)                                                                        │
│           #8  0x00007fa77cc1c55a n/a (libc.so.6 + 0x8f55a)                                                                               │
│           #9  0x00007fa77cc99a3c n/a (libc.so.6 + 0x10ca3c)                                                                              │
│           ELF object binary architecture: AMD x86-64                                                                                     │
systemd[1]: systemd-coredump@0-1254-0.service: Deactivated successfully.                                                                               │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Main process exited, code=dumped, status=6/ABRT                                                  │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Failed with result 'core-dump'.                                                                  │
systemd[1058]: Failed to start Xdg Desktop Portal For KDE.                                                                                             │
systemd[1058]: Starting Portal service (GTK/GNOME implementation)...                                                                                   │
xdg-desktop-por[1260]: cannot open display:                                                                                                            │
systemd[1058]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE                                                      │
systemd[1058]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.                                                                         │
systemd[1058]: Failed to start Portal service (GTK/GNOME implementation).                                                                              │
systemd[1058]: Starting Xdg Desktop Portal For KDE...                                                                                                  │
xdg-desktop-portal-kde[1266]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix│
                                                                                                                                                       │
                              Available platform plugins are: vkkhrdisplay, wayland-egl, offscreen, wayland, eglfs, minimal, vnc, linuxfb, minimalegl, │
systemd[1]: Started Process Core Dump (PID 1268/UID 0).                                                                                                │
ystemd-coredump[1270]: Process 1266 (xdg-desktop-por) of user 968 dumped core.                                                                        │
                                                                                                                                                       │
                        Stack trace of thread 1266:                                                                                                    │
                        #0  0x00007f32c63ec32c n/a (libc.so.6 + 0x9132c)                                                                               │
                        #1  0x00007f32c639b6c8 raise (libc.so.6 + 0x406c8)                                                                             │
                        #2  0x00007f32c63834b8 abort (libc.so.6 + 0x284b8)                                                                             │
                        #3  0x00007f32c6846924 n/a (libQt6Core.so.6 + 0x8a924)                                                                         │
                        #4  0x00007f32c6847135 _ZNK14QMessageLogger5fatalEPKcz (libQt6Core.so.6 + 0x8b135)                                             │
                        #5  0x00007f32c6e6bbe9 n/a (libQt6Gui.so.6 + 0xd9be9)                                                                          │
                        #6  0x00007f32c6f06a18 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt6Gui.so.6 + 0x174a18)                        │
                        #7  0x00007f32c68f9b15 _ZN23QCoreApplicationPrivate4initEv (libQt6Core.so.6 + 0x13db15)                                        │
                        #8  0x00007f32c6f06ac1 _ZN22QGuiApplicationPrivate4initEv (libQt6Gui.so.6 + 0x174ac1)                                          │
                        #9  0x00007f32c76a63ee _ZN19QApplicationPrivate4initEv (libQt6Widgets.so.6 + 0xf53ee)                                          │
                        #10 0x0000557b20d068e6 n/a (xdg-desktop-portal-kde + 0x258e6)                                                                  │
                        #11 0x00007f32c6384cd0 n/a (libc.so.6 + 0x29cd0)                                                                               │
                        #12 0x00007f32c6384d8a __libc_start_main (libc.so.6 + 0x29d8a)                                                                 │
                        #13 0x0000557b20d06e65 n/a (xdg-desktop-portal-kde + 0x25e65)                                                                  │
                                                                                                                                                       │
                        Stack trace of thread 1267:                                                                                                    │
                        #0  0x00007f32c645a0bf __poll (libc.so.6 + 0xff0bf)                                                                            │
                        #1  0x00007f32c56482f6 n/a (libglib-2.0.so.0 + 0xb82f6)                                                                        │
                        #2  0x00007f32c55e8162 g_main_context_iteration (libglib-2.0.so.0 + 0x58162)                                                   │
                        #3  0x00007f32c6b2f9c4 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt6Core.so.6 + 0│
                        #4  0x00007f32c68ffd6e _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt6Core.so.6 + 0x143d6e)                      │
                        #5  0x00007f32c69dd06f _ZN7QThread4execEv (libQt6Core.so.6 + 0x22106f)                                                         │
                        #6  0x00007f32c7d719df n/a (libQt6DBus.so.6 + 0x299df)                                                                         │
                        #7  0x00007f32c6a5cbd3 n/a (libQt6Core.so.6 + 0x2a0bd3)                                                                        │
                        #8  0x00007f32c63ea55a n/a (libc.so.6 + 0x8f55a)                                                                               │
                        #9  0x00007f32c6467a3c n/a (libc.so.6 + 0x10ca3c)                                                                              │
                        ELF object binary architecture: AMD x86-64                                                                                     │
systemd[1]: systemd-coredump@1-1268-0.service: Deactivated successfully.                                                                               │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Main process exited, code=dumped, status=6/ABRT                                                  │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Failed with result 'core-dump'.                                                                  │
systemd[1058]: Failed to start Xdg Desktop Portal For KDE.



ystemd[1]: systemd-coredump@4-1313-0.service: Deactivated successfully.                                                       │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Main process exited, code=dumped, status=6/ABRT                          │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Failed with result 'core-dump'.                                          │
systemd[1058]: Failed to start Xdg Desktop Portal For KDE.                                                                     │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Start request repeated too quickly.                                      │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Failed with result 'core-dump'.                                          │
systemd[1058]: Failed to start Xdg Desktop Portal For KDE.                                                                     │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Start request repeated too quickly.                                      │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Failed with result 'core-dump'.                                          │
systemd[1058]: Failed to start Xdg Desktop Portal For KDE.                                                                     │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Start request repeated too quickly.                                      │
systemd[1058]: plasma-xdg-desktop-portal-kde.service: Failed with result 'core-dump'.                                          │
systemd[1058]: Failed to start Xdg Desktop Portal For KDE.    



However systemd does start the service successfully in the user-space as follows;
systemd[1361]: Created slice User Background Tasks Slice.                                                                      │
systemd[1361]: Reached target Session services which should run early before the graphical session is brought up.              │
systemd[1361]: Starting KDE Config Module Initialization...                                                                    │
systemd[1361]: Starting KDE Global Shortcuts Server...                                                                         │
systemd[1361]: Starting Baloo File Indexer Daemon...                                                                           │
systemd[1361]: kde-baloo.service: Skipped due to 'exec-condition'.                                                             │
systemd[1361]: Condition check resulted in Baloo File Indexer Daemon being skipped.                                            │
systemd[1361]: Starting Portal service...                                                                                      │
systemd[1361]: Starting flatpak document portal service...                                                                     │
systemd[1361]: Started KDE Global Shortcuts Server.                                                                            │
systemd[1361]: Starting sandboxed app permission store...                                                                      │
systemd[1361]: Started sandboxed app permission store.                                                                         │
systemd[1361]: Started flatpak document portal service.                                                                        │
xdg-desktop-por[1450]: Choosing gtk.portal for org.freedesktop.impl.portal.Lockdown as a last-resort fallback                  │
xdg-desktop-por[1450]: The preferred method to match portal implementations to desktop environments is to use the portals.conf(│
systemd[1361]: Starting Portal service (GTK/GNOME implementation)...                                                           │
systemd[1361]: Starting Virtual filesystem service...                                                                          │
systemd[1361]: Started KDE Config Module Initialization.                                                                       ┤
systemd[1361]: Starting KDE Session Management Server...                                                                       ┤
systemd[1361]: Started Unlock kwallet from pam credentials.                                                                    ┤
systemd[1361]: Starting KDE Daemon 6...                                                                                        ┤
systemd[1361]: Starting KDE Window Manager...                                                                                  ┤
systemd[1361]: Started Virtual filesystem service.                                                                             ┤


systemd[1361]: Started Portal service (GTK/GNOME implementation).                                                              │
rtkit-daemon[1244]: Supervising 4 threads of 2 processes of 1 users.                                                           │
rtkit-daemon[1244]: Supervising 4 threads of 2 processes of 1 users.                                                           │
rtkit-daemon[1244]: Supervising 4 threads of 2 processes of 1 users.                                                           │
systemd[1361]: Started KDE Daemon 6.                                                                                           │
systemd[1361]: Starting KDE Configuration Module Initialization (Phase 1)...                                                   │
systemd[1361]: Starting User preferences database...                                                                           │
systemd[1361]: Started User preferences database.                                                                              │
systemd[1361]: Finished KDE Configuration Module Initialization (Phase 1).                                                     │
systemd[1361]: Started KDE Session Management Server.                                                                          │
systemd[1361]: Starting KDE Plasma Workspace...                                                                                │
NetworkManager[866]: <info>  [1709817023.6739] device (E8:5A:8B:EB:B4:6A): state change: disconnected -> unmanaged (reason 'rem│
systemd[1361]: Started KDE Window Manager.                                                                                     │
systemd[1361]: Starting KActivityManager Activity manager Service...                                                           │
systemd[1361]: Started KDE Plasma Workspace.                                                                                   ┤
systemd[1361]: Reached target KDE Plasma Workspace Core.                                                                       ┤
systemd[1361]: Started Proxies GTK DBus menus to a Plasma readable format.                                                     ┤
systemd[1361]: Starting KDE PolicyKit Authentication Agent...                                                                  ┤
systemd[1361]: Starting Powerdevil...                                                                                          ┤
systemd[1361]: Starting Xdg Desktop Portal For KDE...                                                                          ┤
  
  
  
systemd[1361]: Started Xdg Desktop Portal For KDE.                                                                             │
systemd[1361]: Started PipeWire Multimedia Service.                                                                            │
systemd[1361]: Started Multimedia Service Session Manager.                                                                     │
kded6[1634]: xsettingsd: Loaded 14 settings from /home/koshika/.config/xsettingsd/xsettingsd.conf                              │
kded6[1634]: xsettingsd: Created window 0x2c00001 on screen 0 with timestamp 24137                                             │
kded6[1634]: xsettingsd: Selection _XSETTINGS_S0 is owned by 0x0                                                               │
kded6[1634]: xsettingsd: Took ownership of selection _XSETTINGS_S0                                                             │
rtkit-daemon[1244]: Supervising 4 threads of 2 processes of 1 users.                                                           │
rtkit-daemon[1244]: Supervising 4 threads of 2 processes of 1 users.                                                           │
rtkit-daemon[1244]: Supervising 4 threads of 2 processes of 1 users.                                                           │
systemd[1361]: Starting KScreen...                                                                                             │
systemd[1361]: Started Portal service.                                                                                         │



SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
System:
  Kernel: 5.15.150-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
  Desktop: KDE Plasma v: 6.0.1 tk: Qt v: N/A info: frameworks v: 6.0.0
    wm: kwin_x11 vt: 2 dm: SDDM Distro: Manjaro base: Arch Linux

KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0 
Qt Version: 6.6.2
Comment 1 David Redondo 2024-03-07 16:16:18 UTC
On my system sddm-greeter is the culprit

Mär 06 08:34:05 david-desktop dbus-daemon[1178]: [session uid=116 pid=1178] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.1'(uid=116 pid=1109 comm="/usr/bin/sddm-greeter-qt6 --socket /tmp/sddm-:0-NX" label="unconfined")
Comment 2 Bug Janitor Service 2024-03-08 15:38:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1484
Comment 3 David Redondo 2024-03-11 14:33:04 UTC
Git commit c0450a2c12a9f27adfc8abeb1716e9a3173705a0 by David Redondo.
Committed on 11/03/2024 at 08:59.
Pushed by davidre into branch 'master'.

Respect QT_NO_XDG_DESKTOP_PORTAL

Applications set this when they want to avoid triggering a start
of the portal.

M  +2    -0    src/platform/tabletmodewatcher.cpp

https://invent.kde.org/frameworks/kirigami/-/commit/c0450a2c12a9f27adfc8abeb1716e9a3173705a0
Comment 4 Nate Graham 2024-03-12 00:03:06 UTC
*** Bug 483074 has been marked as a duplicate of this bug. ***