Subject: Re: ptm
To: Denis Lagno <dlagno@smtp.ru>
From: Love <lha@stacken.kth.se>
List: netbsd-bugs
Date: 06/04/2004 21:24:35
--=-=-=
"Denis Lagno" <dlagno@smtp.ru> writes:
> Recently pseudo-device ptm appeared uncommented in GENERIC.
> What is it?
> It is broken (on i386). It causes reproducible panics.
> If I open more than ~16 pseudoterminals via screen or xterm
> kernel panics like this:
>
> panic: kernel debugging assertion "(fdp->fd_lomap[off] & (1
> << (fd & NDENTRYMASK))) != 0" failed:
> file
> "/var/worksrc/netbsd-current/src/sys/kern/kern_descrip.c",
> line 190
> stopped in pid 345.1 (screen-4.0.1) at
> netbsd:breakpoint+0x4: popl %ebp
I can't try this since I'm updating my system. Can you get a backtrace
when this is happning ?
It look like there is a problem with ptmioctl/TIOCPTMGET case when
pty_alloc_master() is failing. pty_alloc_master cleans up cfd just fine
itself on failure.
I have no idea why pty_alloc_master would fail.
Love
Index: tty_pty.c
===================================================================
RCS file: /sources/netbsd/NetBSD-cvs/src/sys/kern/tty_pty.c,v
retrieving revision 1.78
diff -u -u -w -r1.78 tty_pty.c
--- tty_pty.c 27 May 2004 03:56:49 -0000 1.78
+++ tty_pty.c 4 Jun 2004 19:21:15 -0000
@@ -1512,7 +1512,7 @@
switch (cmd) {
case TIOCPTMGET:
if ((error = pty_alloc_master(p, &cfd, &newdev)) != 0)
- goto bad;
+ return error;
if ((error = pty_grant_slave(p, newdev)) != 0)
goto bad;
--=-=-=
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iQEVAwUAQMDMd3W+NPVfDpmCAQLOuggAqMaozOEuiDx7d8ooXb6f6evgtEE+rPgS
rc0UGrhQDcvpLxsZkuFnF3e0ZxFLH5dKUhPgWo+jKBJQNytLVB41cxkI06cz7ktj
78ZNmVbBEwCkArWK3CwFD4+eUhNYBOW/nXc5bgeBhJ6vBlqRSC1+82HhceznYkaP
Wbm8jC/WdHr1StFE4QIA4u5hbiNGrSnTs0OTDCZ7JiZ65tcYtdnqtqi14PhrKRtn
DKt+cwZndbyqv1dbhSIkoCrkfeQXW42Fu7tSCgKIDn8azlipgmPiPzOWNL7oMMZG
n9YNwvRI/FrUfNZNbPO0eGvV31IQZrT/fA+zji16L15myqypAVl7Bg==
=lW1J
-----END PGP SIGNATURE-----
--=-=-=--