Bug 435097 - 30s Frozen Start (timeout) of Dolphin, Gwenview, etc. caused by kactivitymanagerd
Summary: 30s Frozen Start (timeout) of Dolphin, Gwenview, etc. caused by kactivitymana...
Status: RESOLVED WORKSFORME
Alias: None
Product: kactivitymanagerd
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.3
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-29 09:01 UTC by raven2cz
Modified: 2021-04-28 04:33 UTC (History)
3 users (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 raven2cz 2021-03-29 09:01:34 UTC
SUMMARY
After last update of arch to 5.21.3 there is a problem with starting of KDE applications like Dolphin, Gwenview, System Settings etc. The problem happens that the KDE apps are called in Gnome, Awesome or other environments/WMs. Directly the bug is not visible in KDE env.

I spent 2 days on the analysis this bug. To compare all processes which are started or not. The problem is in coop with process:

/usr/lib/kactivitymanagerd 

If this process is not started, or it is partial started, the 30s timeout on start apps happen. 
This is critical bug which cause bigger problems in other env/WMs.

STEPS TO REPRODUCE
1. use KDE apps Dolphi, Gwenview, System Settings etc. in any other env/window managers.
2. the application is not started, wait 30-35s
3. the application is shown.

OBSERVED RESULT
Problem is that the /usr/lib/kactivitymanagerd is not normally started in any other envs. This is bigger change and dependency on internal deps in KDE. This doesn't belong to KDE API apps.

EXPECTED RESULT
Remove this dependency and timeout on /usr/lib/kactivitymanagerd. The cooperation has to be handle by different way.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.21.3
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2
Kernel Version: 5.11.10-arch1-1
OS Type: 64-bit
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: GeForce GTX 1050 Ti/PCIe/SSE2

ADDITIONAL INFORMATION
None
Comment 1 David Edmundson 2021-03-29 09:07:28 UTC
25s.

kactivitymanagerd should be DBus activated, if we're timing out that means we're failing to start which implies a setup issue.

Can you run qdbus org.kde.ActivityManager   with 
/usr/lib/kactivitymanagerd  not running and show me the error message that you get.
Comment 2 Bharadwaj Raju 2021-03-29 09:10:38 UTC
Running Dolphin with debug logs (QT_LOGGING_RULES="*=true"), relevant logs:

kf.activities: Creating ResourceInstance:  QUrl("file:///home/bharadwaj")
kf.activities: Should we start the daemon?
kf.activities: Starting the activity manager daemon

Then 30s wait.

This issue can also be reproduced in KDE environment by moving kactivitymanagerd binary somewhere else.
Comment 3 Bharadwaj Raju 2021-03-29 09:12:20 UTC
(In reply to David Edmundson from comment #1)
> 25s.
> 
> kactivitymanagerd should be DBus activated, if we're timing out that means
> we're failing to start which implies a setup issue.
> 
> Can you run qdbus org.kde.ActivityManager   with 
> /usr/lib/kactivitymanagerd  not running and show me the error message that
> you get.

(after 30s)
Error: org.freedesktop.DBus.Error.NoReply
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Comment 4 David Edmundson 2021-03-29 09:14:59 UTC
journalctl --user -u plasma-kactivitymanagerd     

I suspect we're starting kactivitymanagerd, but it'll be quitting (typically because of the env being out of sync) before we register the busname.
Comment 5 raven2cz 2021-03-29 09:26:05 UTC
Yes, right 25s.

qdbus org.kde.ActivityManager outputs:

This is if the kactivitymanagerd is NOT running.
❯ qdbus org.kde.ActivityManager
Message shown after 25s:
Error: org.freedesktop.DBus.Error.NoReply
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.


This is if the kactivitymanagerd is running.
/
/ActivityManager
/ActivityManager/Activities
/ActivityManager/Features
/ActivityManager/Resources
/ActivityManager/Resources/Linking
/ActivityManager/Resources/Scoring
/MainApplication
/SLC
/Templates
/org
/org/kde
/org/kde/ActivityManager
Comment 6 Bharadwaj Raju 2021-03-29 09:27:03 UTC
This seems to have been fixed by commit 3a8cfecd ("Activate activity manager asynchronously") in frameworks/kactivities.

https://invent.kde.org/frameworks/kactivities/-/commit/3a8cfecdfb263f5354008a9fd54270270d6e56d3

OP can you confirm?
Comment 7 David Edmundson 2021-03-29 09:50:35 UTC
It might hide the issue. Doesn't change the fact that a DBus activated app is failing, which is 90% likely to be a setup issue.
Comment 8 Bug Janitor Service 2021-04-13 04:33:18 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2021-04-28 04:33:46 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!