https://bugs.kde.org/show_bug.cgi?id=521080
Bug ID: 521080
Summary: Konsole unexpectedly reassigns the cgroup of processes
in my child process tree, after my process already
move itself into my cgroup (cgroup2)
Classification: Applications
Product: konsole
Version First 26.04.0
Reported In:
Platform: openSUSE
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
DESCRIPTION
I have a Python script that creates container using user namespaces.
Recently after updating system, including KDE suite , I started encountering
this bug.
My Python script at startup creates my cgroup and moves itself into it. All
descendant processes in child process tree should remain in my cgroup. However,
I found that after about 0.5s, newly spawned processes in that process tree are
moved back into the cgroup managed by Konsole.
Seems that Konsole is overriding the cgroup of processes inside my container.
I do not observe this issue when using another terminal emulator.
STEPS TO REPRODUCE
1.
The konsole process is in:
0::/user.slice/user-1000.slice/[email protected]/app.slice/app-org.kde.konsole-11423.scope/main.scope
2.
The bash process running inside Konsole is in:
0::/user.slice/user-1000.slice/[email protected]/app.slice/app-org.kde.konsole-11423.scope/tab(11441).scope
3.
I launch my script from that bash shell. My script creates and moves itself
into:
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/mygroup.slice/myinstance1
OBSERVED RESULT
My child process tree will have about 15 processes in total. Starting from
around the 10th process, newly spawned processes are unexpectedly moved back
into:
0::/user.slice/user-1000.slice/[email protected]/app.slice/app-org.kde.konsole-11423.scope/tab(11441).scope
EXPECTED RESULT
All processes in the child process tree should remain in my own cgroup
SOFTWARE/OS VERSIONS
Konsole 26.04.0
Operating System: openSUSE Leap 15.6
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.25.0
Qt Version: 6.11.0
Kernel Version: 6.4.0-150600.23.103-default (64-bit)
Graphics Platform: X11
ADDITIONAL INFORMATION
I updated the system about two weeks ago.
I tested another terminal emulator, bug not occur there.
My Python script performs operations such as:
- fork
- unshare
- libc.prctl(PR_SET_NAME, ...)
- libc.prctl(PR_SET_PDEATHSIG, sig)
- libc.mount(...)
- libc.pivot_root(...)
- libc.prctl(PR_SET_NO_NEW_PRIVS, ...) and other permission or capability
related operations
- libc.capset(...)
- exec
Its child processes also perform similar above operations ( nesting child
containers).
--
You are receiving this mail because:
You are watching all bug changes.