| Summary: | recentlyused worker hangs | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-activities-stats | Reporter: | Nicolas Fella <nicolas.fella> |
| Component: | general | Assignee: | Ivan Čukić <ivan.cukic> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugseforuns, caceko8579, fernandommuniz, kde, kdedev, nai.xia, piotrekd, plasma-bugs-null, qydwhotmail |
| Priority: | VHI | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/plasma-activities-stats/-/commit/1ddf939b53f883d0bae1e1e01c44eac2c0af8ef5 | Version Fixed/Implemented In: | 6.3.0 |
| Sentry Crash Report: | |||
| Attachments: | Hotspot analysis | ||
|
Description
Nicolas Fella
2024-11-08 15:29:34 UTC
Created attachment 175652 [details]
Hotspot analysis
Seems to be caused by https://invent.kde.org/plasma/plasma-activities/-/merge_requests/52 *** Bug 497271 has been marked as a duplicate of this bug. *** Can confirm with KDE Frameworks 6.8.0 and Qt 6.8.1. Appeared on Reddit today: https://www.reddit.com/r/kde/comments/1hb0ech/does_any_of_you_guys_have_this_recent_files_bug/ *** Bug 495239 has been marked as a duplicate of this bug. *** *** Bug 497970 has been marked as a duplicate of this bug. *** Git commit 8a4731b811f322e93c3c6e3e15ceda7214184620 by Fushan Wen, on behalf of David Edmundson.
Committed on 09/01/2025 at 13:04.
Pushed by fusionfuture into branch 'master'.
Avoid nested event processing waiting for DBus queries.
If a plasma-activity-stats queries can reference the current activity
which involves loading from the running daemon. This is typically async
and cached.
If the daemon has not yet loaded or no event loop is running the current
code blocks to wait for a response.
The current code could work processEvents only handles the main thread
not the DBus thread. If we need to wait for a DBus result the right
action in this situation is a blocking DBus call.
Nested event processing is always a terrible anti-pattern and even if it
did work properly can lead to all sorts of issues elsewhere.
To avoid blocking calls in long-running applications which will re-run
queries when the activity changes anyway, it is guarded to only make
blocking calls for headless apps.
M +25 -8 src/activitiessync_p.cpp
https://invent.kde.org/plasma/plasma-activities-stats/-/commit/8a4731b811f322e93c3c6e3e15ceda7214184620
Git commit 1ddf939b53f883d0bae1e1e01c44eac2c0af8ef5 by Fushan Wen.
Committed on 09/01/2025 at 13:05.
Pushed by fusionfuture into branch 'Plasma/6.3'.
Avoid nested event processing waiting for DBus queries.
If a plasma-activity-stats queries can reference the current activity
which involves loading from the running daemon. This is typically async
and cached.
If the daemon has not yet loaded or no event loop is running the current
code blocks to wait for a response.
The current code could work processEvents only handles the main thread
not the DBus thread. If we need to wait for a DBus result the right
action in this situation is a blocking DBus call.
Nested event processing is always a terrible anti-pattern and even if it
did work properly can lead to all sorts of issues elsewhere.
To avoid blocking calls in long-running applications which will re-run
queries when the activity changes anyway, it is guarded to only make
blocking calls for headless apps.
(cherry picked from commit 8a4731b811f322e93c3c6e3e15ceda7214184620)
b251ac83 Avoid nested event processing waiting for DBus queries.
Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>
M +25 -8 src/activitiessync_p.cpp
https://invent.kde.org/plasma/plasma-activities-stats/-/commit/1ddf939b53f883d0bae1e1e01c44eac2c0af8ef5
*** Bug 498139 has been marked as a duplicate of this bug. *** |