Bug 450810 - [cgroup] is not to set correctly when launching applications from taskmanager for apps that fork on launch
Summary: [cgroup] is not to set correctly when launching applications from taskmanager...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager widgets (show other bugs)
Version: 5.24.5
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 486106 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-24 17:21 UTC by Riccardo Robecchi
Modified: 2024-09-19 15:41 UTC (History)
6 users (show)

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


Attachments
systemd-cgls output (15.75 KB, text/plain)
2022-02-24 17:21 UTC, Riccardo Robecchi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2022-02-24 17:21:02 UTC
Created attachment 147103 [details]
systemd-cgls output

SUMMARY
Latte appears not to set the correct cgroup when launching applications, so these appear as being part of Latte itself in System Monitor.


STEPS TO REPRODUCE
1. Launch an application like Skype
2. Open System Monitor

OBSERVED RESULT
The application launched is not displayed as separate from Latte.

EXPECTED RESULT
The application launched is displayed as separate from Latte.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
According to discussion in bug 433328, this behaviour is not due to System Monitor, but to the application responsible for launching the new process, which in this case is Latte.
Comment 1 Michail Vourlakos 2022-02-24 17:51:13 UTC
Dont you have the same issue with plasma taskmanagers?
Comment 2 Nicolas Fella 2022-02-25 00:40:40 UTC
I can't reproduce this with stock taskmanager or kickoff, but I can with Latte
Comment 3 Michail Vourlakos 2022-03-20 15:55:52 UTC
no idea what Latte can do for this.

Latte is just using Plasma.TasksModel.requestActivate() function. It should be enough.
Comment 4 Michail Vourlakos 2022-03-25 07:38:57 UTC
if you add a plasma taskmanager inside Latte do you have the same issue?
Comment 5 Riccardo Robecchi 2022-03-25 08:58:59 UTC
(In reply to Michail Vourlakos from comment #4)
> if you add a plasma taskmanager inside Latte do you have the same issue?

Yes, I can reproduce the issue by using the Plasma task manager on Latte.
Comment 6 Michail Vourlakos 2022-03-25 09:32:44 UTC
(In reply to Riccardo Robecchi from comment #5)
> (In reply to Michail Vourlakos from comment #4)
> > if you add a plasma taskmanager inside Latte do you have the same issue?
> 
> Yes, I can reproduce the issue by using the Plasma task manager on Latte.

just guessing, maybe Latte has been built in Debug mode instead of Release mode?
Comment 7 Riccardo Robecchi 2022-03-25 10:11:13 UTC
I can actually reproduce when starting from the application launcher, if I do it e.g. Skype is grouped under plasmashell. So I would say it's not about Latte, after all.
Comment 8 David Edmundson 2022-06-17 07:59:33 UTC
I know skype forks on startup, so it's possibly a race.

1 we start skype's launcher
2 we put that in it's own cgroup after the fact
3 skype's launcher forks into real skype

if 2 and 3 occur the wrong way round as it's in parallel it would explain what we're seeing. We do have a code path that makes it race-free but it required users to have a modernish systemd.

I'll try to reproduce, otherwise I'll ask you to test something.
Comment 9 pqwoerituytrueiwoq 2022-06-21 03:39:28 UTC
I am able to get libreoffice calc to open under this cgroup by opening it via Application Menu 2.0 (not kicker) and Application Launcher 2.0 (kicker)

this does NOT happen when opening via file in dolphin or using alt+F2/Alt+space

is this related or a separate issue?
Comment 10 Nate Graham 2024-08-16 15:46:50 UTC
*** Bug 486106 has been marked as a duplicate of this bug. ***