Subject: Re: kernel crash with 1.5 RELEASE apparently related to xdm/xconsole/etc.
To: Greg Troxel <gdt@ir.bbn.com>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 02/05/2001 11:30:32
> xdm="YES" in rc.conf. /usr/X11R6/lib/X11/xdm files all
> have mtime Nov 28th 2045Z, so I'm pretty sure they are from the release.
>
> vague symptoms:
>
> several cases of 'machine panics and reboots when logging out on the
> console'
Restarting getty(8) while xconsole is running exposed a `dangling pointer'
bug in the kernel: the controlling terminal (in this case xconsole's
pseudo terminal) would reference a session after it was freed (these sessions
come and go with each getty instance).
The patch I applied to -current appears below. This bug appears to be
present in the whole lineage of NetBSD releases.
Index: kern_proc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/kern_proc.c,v
retrieving revision 1.44
retrieving revision 1.43
diff -r1.44 -r1.43
1c1
< /* $NetBSD: kern_proc.c,v 1.44 2001/02/04 22:32:24 pk Exp $ */
---
> /* $NetBSD: kern_proc.c,v 1.43 2000/11/08 14:28:13 ad Exp $ */
442d441
< /* Remove reference (if any) from tty to this process group */
447,450c446
< if (--pgrp->pg_session->s_count == 0) {
< /* Remove reference (if any) from tty to this session */
< if (pgrp->pg_session->s_ttyp != NULL)
< pgrp->pg_session->s_ttyp->t_session = NULL;
---
> if (--pgrp->pg_session->s_count == 0)
452d447
< }