0054.html: Difference between revisions
(Restored content from Wayback Machine) |
(Restored content from Wayback Machine) Tag: Manual revert |
||
| Line 1: | Line 1: | ||
<div class="links"> | <div class="links"> | ||
''' | '''[Vserver] "vserver enter" eating cpu and vkill problem:'''<br /> | ||
<span class="small">vserver development mailing list</span> <br /> | <span class="small">vserver development mailing list</span> <br /> | ||
[<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]] | [<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]] | ||
| Line 8: | Line 8: | ||
<div class="head"> | <div class="head"> | ||
<span id=" | <span id="vserver-vserver-enter-eating-cpu-and-vkill-problem"></span> | ||
= | = [Vserver] "vserver enter" eating cpu and vkill problem = | ||
* <span class="dfn">This message</span>: [ [[#start|Message body]] ] [ [[#options2|More options]] ] | * <span class="dfn">This message</span>: [ [[#start|Message body]] ] [ [[#options2|More options]] ] | ||
* <span class="dfn">Related messages</span>: [ [[0055.html|Next message]] ] [ [[0053.html|Previous message]] ] [ [[ | * <span class="dfn">Related messages</span>: [ [[0055.html|Next message]] ] [ [[0053.html|Previous message]] ] [ [[0055.html|Next in thread]] ] [ [[#replies|Replies]] ] | ||
| Line 18: | Line 18: | ||
<div class="mail"> | <div class="mail"> | ||
<span id="from"> <span class="dfn">From</span>: | <span id="from"> <span class="dfn">From</span>: Philippe Teuwen <[mailto:phil_at_teuwen.org?Subject=Re:%20%5BVserver%5D%20"vserver%20enter"%20eating%20cpu%20and%20vkill%20problem phil_at_teuwen.org]> </span><br /> | ||
<span id="date"><span class="dfn">Date</span>: | <span id="date"><span class="dfn">Date</span>: Fri 12 Jan 2007 - 18:18:42 GMT</span><br /> | ||
<span id="message-id"><span class="dfn">Message-ID</span>: < | <span id="message-id"><span class="dfn">Message-ID</span>: <45A7D102.8030109@teuwen.org> </span><br /> | ||
Hello,<br /> | |||
Here are some problems I have with vserver.<br /> | |||
My environment:<br /> | |||
Kernel: Debian vserver_pre-patched kernel for AMD64:<br /> | |||
Linux version 2.6.17-2-vserver-amd64 (Debian 2.6.17-9) (waldi@debian.org) (gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)) #1 SMP Wed Sep 13 18:02:36 CEST 2006<br /> | |||
According to changelog.Debian, this version is using vserver patch v2.0.2<br /> | |||
util-vserver: 0.30.211-6<br /> | |||
First problem:<br /> | |||
In some situations my CPU was burning like hell for days before I noticed it.<br /> | |||
This was the vcontext/login process, the one running when using the command "vserver XX enter".<br /> | |||
If it happens that the process is disconnected from its terminal it eats all the CPU :-(<br /> | |||
Apparently it happens when the session is not ended properly (disconnections, etc)<br /> | |||
I could reproduce the problem as follow:<br /> | |||
* ssh to the server as normal user<br /> | |||
* sudo su -<br /> | |||
* vserver XX enter<br /> | |||
* now from another term, kill -9 on either of the two su processes ("su -" or "-su")<br /> | |||
At that point the session in the vserver ends but vcontext is still hooked to the<br /> | |||
current terminal so cpu is fine.<br /> | |||
* now quit the current terminal<br /> | |||
At that point vcontext is not hooked to any terminal (vps ax => "?" on the tty column)<br /> | |||
and using top you see it's running 100% cpu, ~ 80% system and 20% user.<br /> | |||
Second problem (cosmetic):<br /> | |||
Depending on the tool, the process I was talking about in the previous problem appears<br /> | |||
as vcontext (top, pgrep,... cat /proc/NNN/status)<br /> | |||
or as login (ps ax, pgrep -f,... cat /proc/NNN/cmdline) or should I say<br /> | |||
"login\0\0\0\0\0\0\0\0\0\0\0..."<br /> | |||
This is quite disturbing using processes mgmt tools like when I wrote a cron<br /> | |||
to detect cpu hangry vcontext processes to be killed :-)<br /> | |||
< | Third problem I discovered when writing that watchdog:<br /> | ||
Processes from guests are not displayed using ps/top/etc in context 0 (ps ax from host)<br /> | |||
but well in context 1 (e.g. vps ax).<br /> | |||
Fine.<br /> | |||
But if I want to kill one of them:<br /> | |||
host:~# vserver devel enter<br /> | |||
devel:~# top<br /> | |||
</ | |||
<span id="received"><span class="dfn">Received on</span> | --- in another host term ---<br /> | ||
host:~# ps -C top<br /> | |||
PID TTY TIME CMD<br /> | |||
host:~# vps -C top<br /> | |||
PID CONTEXT TTY TIME CMD<br /> | |||
17111 31022 devel pts/13 00:00:00 top<br /> | |||
host:~# vkill 17111<br /> | |||
vkill: vc_ctx_kill(): No such process<br /> | |||
host:~# chcontext --ctx 1 ps -C top<br /> | |||
PID TTY TIME CMD<br /> | |||
17111 pts/13 00:00:00 top<br /> | |||
host:~# chcontext --ctx 1 kill 17111<br /> | |||
<no error but nothing happens neither: ><br /> | |||
host:~# vps -C top<br /> | |||
PID CONTEXT TTY TIME CMD<br /> | |||
17111 31022 devel pts/13 00:00:00 top<br /> | |||
host:~# kill 17111<br /> | |||
host:~# vps -C top<br /> | |||
PID CONTEXT TTY TIME CMD<br /> | |||
<worked!!><br /> | |||
This is not the behaviour I expected.<br /> | |||
Apart from that I'm happy running vserver for almost a year with now 6 guests.<br /> | |||
Phil<br /> | |||
PS: nothing particular here when I ran testme.sh<br /> | |||
Linux-VServer Test [V0.17] Copyright (C) 2003-2006 H.Poetzl<br /> | |||
chcontext is working.<br /> | |||
chbind is working.<br /> | |||
Linux 2.6.17-2-vserver-amd64 #1 SMP Wed Sep 13 18:02:36 CEST 2006 x86_64<br /> | |||
Ea 0.30.211 236/glibc (DSa) <compat,v11,fscompat,v13,net,v21,oldproc,olduts><br /> | |||
VCI: 0002:0002 236 03000016 (TbLgnP)<br /> | |||
<pre> | |||
--- | |||
[000]# succeeded. | |||
[001]# succeeded. | |||
[011]# succeeded. | |||
[031]# succeeded. | |||
[101]# succeeded. | |||
[102]# succeeded. | |||
[201]# succeeded. | |||
[202]# succeeded. | |||
_______________________________________________ | |||
Vserver mailing list | |||
Vserver@list.linux-vserver.org | |||
http://list.linux-vserver.org/mailman/listinfo/vserver</pre> | |||
<span id="received"><span class="dfn">Received on</span> Fri Jan 12 18:54:14 2007</span> | |||
</div> | </div> | ||
| Line 65: | Line 134: | ||
* <span class="dfn">This message</span>: [ [[#start|Message body]] ] | * <span class="dfn">This message</span>: [ [[#start|Message body]] ] | ||
* <span class="dfn">Next message</span>: [[0055.html| | * <span class="dfn">Next message</span>: [[0055.html|Peter Mann: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"]] | ||
* <span class="dfn">Previous message</span>: [[0053.html| | * <span class="dfn">Previous message</span>: [[0053.html|Jarek Dylag: "Re: [Vserver] kernel panic patch-2.6.19.1-vs2.1.1.7.diff"]] | ||
* <span class="dfn"> | * <span class="dfn">Next in thread</span>: [[0055.html|Peter Mann: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"]] | ||
* <span id="replies"></span><span class="dfn">Reply</span>: [[0055.html|Peter Mann: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"]] | |||
* <span class="dfn">Reply</span>: [[0062.html|Daniel Hokka Zakrisson: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"]] | |||
* <span id="options2"></span><span class="dfn">Contemporary messages sorted</span>: [ [[date.html#54|By Date]] ] [ [[index.html#54|By Thread]] ] [ [[subject.html#54|By Subject]] ] [ [[author.html#54|By Author]] ] [ [[attachment.html|By messages with attachments]] ] | * <span id="options2"></span><span class="dfn">Contemporary messages sorted</span>: [ [[date.html#54|By Date]] ] [ [[index.html#54|By Thread]] ] [ [[subject.html#54|By Subject]] ] [ [[author.html#54|By Author]] ] [ [[attachment.html|By messages with attachments]] ] | ||
| Line 76: | Line 147: | ||
[<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]]<br /> | [<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]]<br /> | ||
<span class="small">Generated on | <span class="small">Generated on Fri 12 Jan 2007 - 18:54:20 GMT by [http://www.hypermail.org/ hypermail 2.1.8]</span> | ||
</div> | </div> | ||
Revision as of 02:07, 11 November 2025
[Vserver] "vserver enter" eating cpu and vkill problem:
vserver development mailing list
[[[../|Next/Previous Months]]] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
[Vserver] "vserver enter" eating cpu and vkill problem
- This message: [ Message body ] [ More options ]
- Related messages: [ Next message ] [ Previous message ] [ Next in thread ] [ Replies ]
From: Philippe Teuwen <phil_at_teuwen.org>
Date: Fri 12 Jan 2007 - 18:18:42 GMT
Message-ID: <45A7D102.8030109@teuwen.org>
Hello,
Here are some problems I have with vserver.
My environment:
Kernel: Debian vserver_pre-patched kernel for AMD64:
Linux version 2.6.17-2-vserver-amd64 (Debian 2.6.17-9) (waldi@debian.org) (gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)) #1 SMP Wed Sep 13 18:02:36 CEST 2006
According to changelog.Debian, this version is using vserver patch v2.0.2
util-vserver: 0.30.211-6
First problem:
In some situations my CPU was burning like hell for days before I noticed it.
This was the vcontext/login process, the one running when using the command "vserver XX enter".
If it happens that the process is disconnected from its terminal it eats all the CPU :-(
Apparently it happens when the session is not ended properly (disconnections, etc)
I could reproduce the problem as follow:
- ssh to the server as normal user
- sudo su -
- vserver XX enter
- now from another term, kill -9 on either of the two su processes ("su -" or "-su")
At that point the session in the vserver ends but vcontext is still hooked to the
current terminal so cpu is fine.
- now quit the current terminal
At that point vcontext is not hooked to any terminal (vps ax => "?" on the tty column)
and using top you see it's running 100% cpu, ~ 80% system and 20% user.
Second problem (cosmetic):
Depending on the tool, the process I was talking about in the previous problem appears
as vcontext (top, pgrep,... cat /proc/NNN/status)
or as login (ps ax, pgrep -f,... cat /proc/NNN/cmdline) or should I say
"login\0\0\0\0\0\0\0\0\0\0\0..."
This is quite disturbing using processes mgmt tools like when I wrote a cron
to detect cpu hangry vcontext processes to be killed :-)
Third problem I discovered when writing that watchdog:
Processes from guests are not displayed using ps/top/etc in context 0 (ps ax from host)
but well in context 1 (e.g. vps ax).
Fine.
But if I want to kill one of them:
host:~# vserver devel enter
devel:~# top
--- in another host term ---
host:~# ps -C top
PID TTY TIME CMD
host:~# vps -C top
PID CONTEXT TTY TIME CMD
17111 31022 devel pts/13 00:00:00 top
host:~# vkill 17111
vkill: vc_ctx_kill(): No such process
host:~# chcontext --ctx 1 ps -C top
PID TTY TIME CMD
17111 pts/13 00:00:00 top
host:~# chcontext --ctx 1 kill 17111
<no error but nothing happens neither: >
host:~# vps -C top
PID CONTEXT TTY TIME CMD
17111 31022 devel pts/13 00:00:00 top
host:~# kill 17111
host:~# vps -C top
PID CONTEXT TTY TIME CMD
<worked!!>
This is not the behaviour I expected.
Apart from that I'm happy running vserver for almost a year with now 6 guests.
Phil
PS: nothing particular here when I ran testme.sh
Linux-VServer Test [V0.17] Copyright (C) 2003-2006 H.Poetzl
chcontext is working.
chbind is working.
Linux 2.6.17-2-vserver-amd64 #1 SMP Wed Sep 13 18:02:36 CEST 2006 x86_64
Ea 0.30.211 236/glibc (DSa) <compat,v11,fscompat,v13,net,v21,oldproc,olduts>
VCI: 0002:0002 236 03000016 (TbLgnP)
--- [000]# succeeded. [001]# succeeded. [011]# succeeded. [031]# succeeded. [101]# succeeded. [102]# succeeded. [201]# succeeded. [202]# succeeded. _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Jan 12 18:54:14 2007
- This message: [ Message body ]
- Next message: Peter Mann: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"
- Previous message: Jarek Dylag: "Re: [Vserver] kernel panic patch-2.6.19.1-vs2.1.1.7.diff"
- Next in thread: Peter Mann: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"
- Reply: Peter Mann: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"
- Reply: Daniel Hokka Zakrisson: "Re: [Vserver] "vserver enter" eating cpu and vkill problem"
- Contemporary messages sorted: [ By Date ] [ By Thread ] [ By Subject ] [ By Author ] [ By messages with attachments ]
[[[../|Next/Previous Months]]] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 12 Jan 2007 - 18:54:20 GMT by hypermail 2.1.8