Bug 509973 - Logout leaves stale akonadi processes on wayland
Summary: Logout leaves stale akonadi processes on wayland
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (other bugs)
Version First Reported In: 6.5.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-26 17:59 UTC by András Manţia
Modified: 2025-09-26 18:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description András Manţia 2025-09-26 17:59:31 UTC
SUMMARY
With a Plasma Wayland session logout leaves akonadi in a half running state and after login PIM applications are unusable. So actually I think it is not an akonadi problem by itself, probably more a plasma wayland issue.

STEPS TO REPRODUCE
1.  Login, make sure at least some email accounts are set up
2.  Logout
3.  Login

OBSERVED RESULT
Lots of crashes from akonadi processes, KMail/Kontact doesn't work, akonadi cannot be restarted.

Processes still alive after logout:

ps uax | grep akonadi
andris     13992  0.0  0.0 238888  8092 ?        Sl   Sep24   0:31 /usr/bin/akonadi_birthdays_resource --identifier akonadi_birthdays_resource
andris     13993  0.0  0.0 237148  8064 ?        Sl   Sep24   0:31 /usr/bin/akonadi_contacts_resource --identifier akonadi_contacts_resource_0
andris     13994  0.0  0.0 261768 17176 ?        Sl   Sep24   0:36 /usr/bin/akonadi_davgroupware_resource --identifier akonadi_davgroupware_resource_0
andris     14000  0.2  0.0 343064 30316 ?        SNl  Sep24   5:34 /usr/bin/akonadi_indexing_agent --identifier akonadi_indexing_agent
andris     14001  0.1  0.0 348988 43264 ?        Sl   Sep24   3:44 /usr/bin/akonadi_maildir_resource --identifier akonadi_maildir_resource_14
andris   1388097  0.0  0.1 762764 90460 ?        Sl   20:38   0:00 /usr/bin/akonadi_control
andris   1388258  0.0  0.0 697540 55168 ?        Sl   20:38   0:00 /usr/bin/akonadiserver
andris   1388323  0.6  0.3 1923976 207884 ?      Sl   20:38   0:03 /usr/sbin/mariadbd --defaults-file=/home/andris/.local/share/akonadi/mysql.conf --datadir=/home/andris/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid
andris   1388521  0.0  0.2 1093904 147720 ?      Sl   20:38   0:00 /usr/bin/akonadi_archivemail_agent --identifier akonadi_archivemail_agent
andris   1388525  0.0  0.1 705660 96016 ?        Sl   20:38   0:00 /usr/bin/akonadi_followupreminder_agent --identifier akonadi_followupreminder_agent
andris   1388526  0.0  0.2 1531136 158524 ?      Sl   20:38   0:00 /usr/bin/akonadi_google_resource --identifier akonadi_google_resource_5
andris   1388527  0.0  0.1 859736 116604 ?       Sl   20:38   0:00 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_1
andris   1388528  0.0  0.1 1083452 118228 ?      Sl   20:38   0:00 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_2
andris   1388529  0.0  0.1 859732 116404 ?       Sl   20:38   0:00 /usr/bin/akonadi_imap_resource --identifier akonadi_imap_resource_4
andris   1388530  0.0  0.0 259228 48500 ?        SNl  20:38   0:00 /usr/bin/akonadi_indexing_agent --identifier akonadi_indexing_agent
andris   1388539  0.0  0.1 704532 95836 ?        Sl   20:38   0:00 /usr/bin/akonadi_maildispatcher_agent --identifier akonadi_maildispatcher_agent
andris   1388540  0.0  0.2 1094140 147608 ?      Sl   20:38   0:00 /usr/bin/akonadi_mailfilter_agent --identifier akonadi_mailfilter_agent
andris   1388541  0.0  0.1 716164 101256 ?       Sl   20:38   0:00 /usr/bin/akonadi_mailmerge_agent --identifier akonadi_mailmerge_agent
andris   1388543  0.0  0.1 705524 95124 ?        Sl   20:38   0:00 /usr/bin/akonadi_migration_agent --identifier akonadi_migration_agent
andris   1388545  0.0  0.1 718352 101724 ?       Sl   20:38   0:00 /usr/bin/akonadi_newmailnotifier_agent --identifier akonadi_newmailnotifier_agent
andris   1388547  0.0  0.2 1024848 144568 ?      Sl   20:38   0:00 /usr/bin/akonadi_sendlater_agent --identifier akonadi_sendlater_agent
andris   1388549  0.0  0.2 1028464 146492 ?      Sl   20:38   0:00 /usr/bin/akonadi_unifiedmailbox_agent --identifier akonadi_unifiedmailbox_agent
andris   1395750  0.0  0.0 376644 41124 ?        Sl   20:43   0:00 /usr/libexec/kf6/kioworker /usr/lib64/qt6/plugins/kf6/kio/kio_http.so https  local:/run/user/1000/akonadi_davgroupware_resource_0GNmoyD.134.kioworker.socket
andris   1396144  0.0  0.0   6664  2224 pts/2    S+   20:45   0:00 grep --color=auto akonadi
```

EXPECTED RESULT
Logout kills all user processes.

SOFTWARE/OS VERSIONS
akonadictl 6.5.1 (25.08.1)
plasmashell 6.4.5
Qt version 6.9.2 

ADDITIONAL INFORMATION

The state of akonadi after login:
> akonadictl stop
Akonadi is not running.
> akonadictl start
Akonadi is already running.
> akonadictl restart
Akonadi is not running.
> killall -9 akonadiserver
> akonadictl start
org.kde.pim.akonadictl: Starting Akonadi Server...
org.kde.pim.akonadicontrol: Service org.freedesktop.Akonadi.Control.lock already registered, terminating now.
Error: akonadi_control was started but didn't register at D-Bus session bus.
Make sure your system is set up correctly!

After killing *all* akonadi processes, akonadictl start works again and the system is usable.
Comment 1 András Manţia 2025-09-26 18:08:32 UTC
Workaround is to add a logout script with "akonadictl stop", but that should not be the user's task.