Subject: Re: [vserver] problem with devpts
From: Deniss <dg@sad.lv>
Date: Mon, 17 May 2010 17:36:17 +0300



Herbert Poetzl wrote:
> On Fri, May 07, 2010 at 03:17:04PM +0300, Deniss wrote:
>> yeh, looks like the problem is in vprocunhide - when problem arise in
>> already open session to guest `ps` stop working
> 
>> www ~ # ps -efH
>> Error, do this: mount -t proc proc /proc
> 
>> when i enter to guset using 'vserver enter' the problem disappears - 
>> proc is mounted and ssh working
> 
> util-vserver version?
zavarka ~ # vserver-info
Versions:
                    Kernel: 2.6.32.12-vs2.3.0.36.29.4-vserver-intel
                    VS-API: 0x00020305
              util-vserver: 0.30.216-pre2883; Apr 15 2010, 14:13:08

Features:
                        CC: i686-pc-linux-gnu-gcc, i686-pc-linux-gnu-gcc 
(Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
                       CXX: i686-pc-linux-gnu-g++, i686-pc-linux-gnu-g++ 
(Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
                  CPPFLAGS: ''
                    CFLAGS: '-O2 -mtune=native -march=native -pipe 
-fomit-frame-pointer -std=c99 -Wall -pedantic -W -funit-at-a-time'
                  CXXFLAGS: '-O2 -mtune=native -march=native -pipe 
-fomit-frame-pointer -ansi -Wall -pedantic -W -fmessage-length=0 
-funit-at-a-time'
                build/host: i686-pc-linux-gnu/i686-pc-linux-gnu
              Use dietlibc: yes
        Build C++ programs: yes
        Build C99 programs: yes
            Available APIs: v13,net,v21,v22,v23,netv2
             ext2fs Source: e2fsprogs
     syscall(2) invocation: alternative
       vserver(2) syscall#: 273/glibc
                crypto api: beecrypt
           python bindings: yes
    use library versioning: yes

Paths:
                    prefix: /usr
         sysconf-Directory: /etc
             cfg-Directory: /etc/vservers
          initrd-Directory: $(sysconfdir)/init.d
        pkgstate-Directory: /var/run/vservers
           vserver-Rootdir: /vservers


> 
>> Deniss wrote:
>>> hello !
> 
>>> i have a problem with devpts on 2.6.32.12-vs2.3.0.36.29.4:
>>> sometimes sshd stop allowing to log in with errors:
> 
> does it happen on a more recent kernel/patch too?

I running 
http://people.linux-vserver.org/~harry/patch-2.6.32.12-vs2.3.0.36.29.4-grsec2.1.14-20100503.diff

that is the latest one patch


Note that the problem happens after some time after guest start, and it 
is enough to run "vprocunhide" again to fix it

> 
> TIA,
> Herbert
> 
>>> May  7 11:01:28 www sshd[1520]: fatal: openpty returns device for which 
>>> ttyname fails.
>>> May  7 11:01:28 www sshd[1520]: error: chown  0 0 failed: No such file 
>>> or directory
>>> May  7 11:01:28 www sshd[1520]: error: chmod  0666 failed: No such file 
>>> or directory
> 
>>> restarting sshd helps
> 
>>> i think the problem may be in context leak between host and guest cos 
>>> they share /dev/pts as i understand
> 
>>> probably the solution may be to use "newinstance" feature of devpts but 
>>> i cant manage to get it working.