Re: [Vserver] How to use the sched_pause flag (Host hangs)

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Wed 29 Mar 2006 - 14:58:47 BST
Message-ID: <20060329135846.GD14522@MAIL.13thfloor.at>

On Wed, Mar 29, 2006 at 01:29:20PM +0200, Andreas Baetz wrote:
> On Tuesday 28 March 2006 15:25, Herbert Poetzl wrote:
> > On Tue, Mar 28, 2006 at 02:48:11PM +0200, Andreas Baetz wrote:
> > > # chcontext --xid 400 --flag 0x00000400 -- ps ax
> > >
> > > hangs forever
> > >
> > > vps on the host shows state H for the PID, the PID cannot be killed.
> > >
> > > # chcontext --xid 400 --flag 0x00000100 -- ps ax
> > > does not unset the sched_pause flag, hangs too
> > >
> > > after a few more tries, the host hangs completely and has to be
> > > rebootet, nothing works except kernel magic sysRq-b
> >
> > If that _really_ happens, you should check for a
> > kernel trace, as this would mean that the kernel
> > had some issues somewhere (well it's an older kernel)
>
> I compiled a new kernel from kernel.org, only patched with patch-2.6.16-vs2.0.2-rc14.diff
>
> host::~# vserver-info
> Versions:
> Kernel: 2.6.16.1.060328
> VS-API: 0x00020001
> util-vserver: 0.30.209; Jan 8 2006, 12:24:41
>
> Features:
> CC: gcc, gcc (GCC) 4.0.3 20051201 (prerelease) (Debian 4.
> 0.2-5)
> CXX: g++, g++ (GCC) 4.0.3 20051201 (prerelease) (Debian 4.
> 0.2-5)
> CPPFLAGS: ''
> CFLAGS: '-Wall -g -O2 -std=c99 -Wall -pedantic -W -funit-at-
> a-time'
> CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W -fmessage-length=0 -
> funit-at-a-time'
> build/host: i486-pc-linux-gnu/i486-pc-linux-gnu
> Use dietlibc: yes
> Build C++ programs: yes
> Build C99 programs: yes
> Available APIs: compat,v11,v13,fscompat,net,oldproc,olduts
> ext2fs Source: e2fsprogs
> syscall(2) invocation: alternative
> vserver(2) syscall#: 273/glibc
>
> Paths:
> prefix: /usr
> sysconf-Directory: /etc
> cfg-Directory: /etc/vservers
> initrd-Directory: $(sysconfdir)/init.d
> pkgstate-Directory: /var/run/vservers
> vserver-Rootdir: /var/lib/vservers
>
> I tried
> # chcontext --xid 4004 --flag 0x400 -- ps ax
>
> It immediately hang the host.
> When it hangs, the host is not pingable from outside, Mouse doesn't work,
> Ctrl-Alt-F1 etc. doesn't work

okay, basically I consider this a bug, although it is
relatively unlikely that somebody will do that combination

a more interesting question is, if that can happen with
a running ps inside the guest, when you enable the pause
so I will investigate this, looks like the userspace
process is holding some lock or whatever (in the kernel)
and doesn't get sheduled (pause) anymore, so the lock
is 'stuck' ...

thanks for testing and the info
I really appreciate it!

> Some log entries:
> Mar 29 12:11:56 host kernel: SysRq : SAK
> Mar 29 12:11:56 host kernel: SAK: killed process 3525 (Xorg): p->signal->session==tty->session
> Mar 29 12:12:04 host kernel: SysRq : SAK
> Mar 29 12:12:04 host kernel: SAK: killed process 3525 (Xorg): p->signal->session==tty->session
> Mar 29 12:12:13 host kernel: SysRq : Emergency Sync
> Mar 29 12:12:13 host kernel: Emergency Sync complete
> Mar 29 12:12:16 host kernel: SysRq : Emergency Remount R/O
> Mar 29 12:12:30 host kernel: SysRq : Terminate All Tasks
> Mar 29 12:12:30 host ntpd[3224]: ntpd exiting on signal 15
> Mar 29 12:12:30 host syslog-ng[2742]: SIGTERM received, terminating;
> - rebootet via sysrq-b --
>
> It seems the problem (host hang) only occurs when using ps on a paused context.
>
> When using
> # chcontext --xid 4004 --flag 0x400 -- bash
> it pauses, and can be unpaused with
> # vattribute --set --xid 4004 --flag ~0x400
>
> BTW: Thanks for the tip with vattribute !

you're welcome!

best,
Herbert

> Andreas
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed Mar 29 14:59:13 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 29 Mar 2006 - 14:59:30 BST by hypermail 2.1.8