Dne 22. 12. 20 v 16:45 Michael Catanzaro napsal(a):
On Tue, Dec 22, 2020 at 10:45 am, Vít Ondruch
<vondruch(a)redhat.com>
wrote:
> And I wonder what will be the behavior for applications, which I
> start from my terminal? The most typical example for me is running
> GVim from gnome-terminal.
>
Each gnome-terminal tab runs in its own cgroup:
│ │ │ ├─app-org.gnome.Terminal.slice
│ │ │ │ ├─vte-spawn-1d1d5519-71d2-4035-929a-8a9ae5bc3822.scope
│ │ │ │ │ ├─7848 bash
│ │ │ │ │ └─7889 less /etc/hosts
│ │ │ │ ├─vte-spawn-03fe4cc9-0400-4723-ac9b-e929b850ca02.scope
│ │ │ │ │ ├─7892 bash
│ │ │ │ │ ├─7927 systemd-cgls
│ │ │ │ │ └─7928 less
│ │ │ │ └─gnome-terminal-server.service
│ │ │ │ └─7843 /usr/libexec/gnome-terminal-server
Firefox does this too. WebKit doesn't, but it won't be hard to fix.
Not sure about Chrome. Point is, apps have all the tools they need to
use cgroups to ensure out-of-control subprocesses don't cause the main
process to be killed, and our important default apps (Firefox and
gnome-terminal) actually do this.
But I am worried about this scenario:
│ │ │ ├─app-org.gnome.Terminal.slice
│ │ │ │ ├─vte-spawn-10bea11a-51c3-4bf7-a3a1-8556d7bf35a6.scope
│ │ │ │ │ ├─ 2444 bash
│ │ │ │ │ ├─2863977 gvim /home/vondruch/scripts/ruby-devel-srpm.rb
│ │ │ │ │ ├─3687301 gvim ruby.spec
│ │ │ │ │ ├─3733657 /usr/bin/python3 -tt /usr/libexec/mock/mock -r
ruby ruby-3.0.0-0.1.20201223git684649ea05.fc34.src.rpm -n
│ │ │ │ │ └─3733903 /usr/bin/systemd-nspawn -q -M
31d5751c88234fe284db838faf24cba3 -D /var/lib/mock/ruby/root -a -u
mockbuild --capability=cap_ipc_lock
--bind=/tmp/mock-resolv.q2hfy7am:/etc/resolv.conf --bind>
│ │ │ │ ├─vte-spawn-c37b3930-5585-4417-8948-eeaa497a595e.scope
│ │ │ │ │ ├─3742577 bash
│ │ │ │ │ ├─3759605 systemd-cgls
│ │ │ │ │ └─3759606 less
│ │ │ │ ├─vte-spawn-b02099b6-6f18-49c2-b8a8-47d484f18663.scope
│ │ │ │ │ └─3706817 bash
│ │ │ │ ├─vte-spawn-5c35e1e8-1227-4717-8c4f-a8698bf3918f.scope
│ │ │ │ │ ├─3757639 bash
│ │ │ │ │ ├─3759184 /usr/lib64/firefox/firefox
│ │ │ │ │ ├─3759273 /usr/lib64/firefox/firefox -contentproc -childID 1
-isForBrowser -prefsLen 1 -prefMapSize 312094 -parentBuildID
20201106142436 -appdir /usr/lib64/firefox/browser 3759184 tab
│ │ │ │ │ ├─3759355 /usr/lib64/firefox/firefox -contentproc -childID 2
-isForBrowser -prefsLen 6262 -prefMapSize 312094 -parentBuildID
20201106142436 -appdir /usr/lib64/firefox/browser 3759184 tab
│ │ │ │ │ ├─3759427 /usr/bin/python3 /usr/bin/chrome-gnome-shell
/usr/lib64/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json
chrome-gnome-shell(a)gnome.org
│ │ │ │ │ └─3759459 /usr/lib64/firefox/firefox -contentproc -childID 3
-isForBrowser -prefsLen 7194 -prefMapSize 312094 -parentBuildID
20201106142436 -appdir /usr/lib64/firefox/browser 3759184 tab
You see that I have executed FF from terminal. But I think that if any
other process running in the app-org.gnome.Terminal.slice starts to grow
memory usage, the whole tree will be killed.
Vít
Michael
_______________________________________________
devel mailing list -- devel(a)lists.fedoraproject.org
To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org