linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PTS alocation problem with 2.6.4/2.6.5
@ 2004-04-05 22:53 Andrzej Krzysztofowicz
  2004-04-05 23:59 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Andrzej Krzysztofowicz @ 2004-04-05 22:53 UTC (permalink / raw)
  To: kernel list


I noticed serious problem with PTS alocation on kernels 2.6.4 and 2.6.5:
It seems that once alocated /dev/pts entries are never reused, leading to
pty alocation errors. The testing system is fully compiled with kernel 2.2.x
headers (including glibc), but informations from my coleagues using systems
compiled on 2.4/2.6 headers seems to behave similarily.
The testcase and used kernel configuration are shown below.
Kernel 2.6.3 does not have this problem.
Is it bug or feature (and I am doing sth wrong) ?

NOTE: I realize that my glibc does not support minors > 255, so no more pts-es
      is available, but problem is leakage of _free_ pts-es.

[ankry@green SPECS]$ for a in $(seq 4);do ssh -t remote tty;done
/dev/pts/253
Connection to remote closed.
/dev/pts/254
Connection to remote closed.
/dev/pts/255
Connection to remote closed.
not a tty
         Connection to remote closed.
[ankry@green SPECS]$ ssh remote cat /proc/sys/kernel/pty/{max,nr}
2048
1
$ ssh olimp ls /dev/pts
1

.config tested (selected entries)

CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=2048

or

CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set

(full .config available on request)

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Gdansk University of Technology

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PTS alocation problem with 2.6.4/2.6.5
  2004-04-05 22:53 PTS alocation problem with 2.6.4/2.6.5 Andrzej Krzysztofowicz
@ 2004-04-05 23:59 ` Andrew Morton
  2004-04-06  5:11   ` Andrzej Krzysztofowicz
  2004-04-06 17:55   ` Jamie Lokier
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Morton @ 2004-04-05 23:59 UTC (permalink / raw)
  To: Andrzej Krzysztofowicz; +Cc: linux-kernel

Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> wrote:
>
> I noticed serious problem with PTS alocation on kernels 2.6.4 and 2.6.5:
> It seems that once alocated /dev/pts entries are never reused, leading to
> pty alocation errors. The testing system is fully compiled with kernel 2.2.x
> headers (including glibc), but informations from my coleagues using systems
> compiled on 2.4/2.6 headers seems to behave similarily.
> The testcase and used kernel configuration are shown below.
> Kernel 2.6.3 does not have this problem.
> Is it bug or feature (and I am doing sth wrong) ?

You need a glibc upgrade - we broke things for really old glibc's.  We're
(slowly) working on fixing it up.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PTS alocation problem with 2.6.4/2.6.5
  2004-04-05 23:59 ` Andrew Morton
@ 2004-04-06  5:11   ` Andrzej Krzysztofowicz
  2004-04-06 17:55   ` Jamie Lokier
  1 sibling, 0 replies; 5+ messages in thread
From: Andrzej Krzysztofowicz @ 2004-04-06  5:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andrzej Krzysztofowicz, linux-kernel

Andrew Morton wrote:
> 
> Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> wrote:
> >
> > I noticed serious problem with PTS alocation on kernels 2.6.4 and 2.6.5:
> > It seems that once alocated /dev/pts entries are never reused, leading to
> > pty alocation errors. The testing system is fully compiled with kernel 2.2.x
> > headers (including glibc), but informations from my coleagues using systems
> > compiled on 2.4/2.6 headers seems to behave similarily.
> > The testcase and used kernel configuration are shown below.
> > Kernel 2.6.3 does not have this problem.
> > Is it bug or feature (and I am doing sth wrong) ?
> 
> You need a glibc upgrade - we broke things for really old glibc's.  We're
> (slowly) working on fixing it up.

Hmmm, which version is enough ?

I use glibc-2.2.5, but people using glibc-2.3.3 snapshot, dated 20040101
also have the same problem...

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Gdansk University of Technology

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PTS alocation problem with 2.6.4/2.6.5
  2004-04-05 23:59 ` Andrew Morton
  2004-04-06  5:11   ` Andrzej Krzysztofowicz
@ 2004-04-06 17:55   ` Jamie Lokier
  2004-04-06 18:16     ` Andrew Morton
  1 sibling, 1 reply; 5+ messages in thread
From: Jamie Lokier @ 2004-04-06 17:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andrzej Krzysztofowicz, linux-kernel

Andrew Morton wrote:
> You need a glibc upgrade - we broke things for really old glibc's.  We're
> (slowly) working on fixing it up.

Looking at patch-2.6.4, there are plenty of minor changes to the pty
code but nothing that looks like it would break userspace except for
_very_ old glibcs that don't know about /dev/pts at all and just used
the legacy ones.

I have some _non-glibc_ pty code that I wish to keep working.  Can you
briefly explain how it breaks with moderately old glibcs such as the
glibc-2.3.3 that's said to be inadequate, and therefore what interface
change is needed in non-glibc code?

Thanks,
-- Jamie

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PTS alocation problem with 2.6.4/2.6.5
  2004-04-06 17:55   ` Jamie Lokier
@ 2004-04-06 18:16     ` Andrew Morton
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2004-04-06 18:16 UTC (permalink / raw)
  To: Jamie Lokier; +Cc: ankry, linux-kernel

Jamie Lokier <jamie@shareable.org> wrote:
>
> Andrew Morton wrote:
> > You need a glibc upgrade - we broke things for really old glibc's.  We're
> > (slowly) working on fixing it up.
> 
> Looking at patch-2.6.4, there are plenty of minor changes to the pty
> code but nothing that looks like it would break userspace except for
> _very_ old glibcs that don't know about /dev/pts at all and just used
> the legacy ones.
> 
> I have some _non-glibc_ pty code that I wish to keep working.  Can you
> briefly explain how it breaks with moderately old glibcs such as the
> glibc-2.3.3 that's said to be inadequate, and therefore what interface
> change is needed in non-glibc code?
> 

Andrzej is using a glibc that "does not support minors > 255".

The oldest glibc I have around here is glibc-2.2.5-34 and it passes
Andrzej's `for a in $(seq 4);do ssh -t remote tty;done' test OK.  I do not
know at which version they started to permit larger values for minors, but
it must have been some time ago.

A small number of people are hurting from the removal of first-fit pty
allocation and I do think it needs to be put back.  I have a patch but
neither Peter nor I have actually tested it yet.  I'll aim to get it into
2.6.6.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-06 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-05 22:53 PTS alocation problem with 2.6.4/2.6.5 Andrzej Krzysztofowicz
2004-04-05 23:59 ` Andrew Morton
2004-04-06  5:11   ` Andrzej Krzysztofowicz
2004-04-06 17:55   ` Jamie Lokier
2004-04-06 18:16     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).