From owner-freebsd-current Fri Jun 11 6:48: 4 1999 Delivered-To: freebsd-current@freebsd.org Received: from gw-nl3.philips.com (gw-nl3.philips.com [192.68.44.35]) by hub.freebsd.org (Postfix) with ESMTP id 446A514C83 for ; Fri, 11 Jun 1999 06:48:00 -0700 (PDT) (envelope-from Jos.Backus@nl.origin-it.com) Received: from smtprelay-nl1.philips.com (localhost.philips.com [127.0.0.1]) by gw-nl3.philips.com with ESMTP id PAA16462 for ; Fri, 11 Jun 1999 15:47:58 +0200 (MEST) (envelope-from Jos.Backus@nl.origin-it.com) Received: from smtprelay-eur1.philips.com(130.139.36.3) by gw-nl3.philips.com via mwrap (4.0a) id xma016459; Fri, 11 Jun 99 15:47:59 +0200 Received: from hal.mpn.cp.philips.com (hal.mpn.cp.philips.com [130.139.64.195]) by smtprelay-nl1.philips.com (8.9.3/8.8.5-1.2.2m-19990317) with SMTP id PAA03413 for ; Fri, 11 Jun 1999 15:47:58 +0200 (MET DST) Received: (qmail 25598 invoked by uid 666); 11 Jun 1999 13:48:19 -0000 Date: Fri, 11 Jun 1999 15:48:19 +0200 From: Jos Backus To: current@freebsd.org Subject: Snoop device broken Message-ID: <19990611154819.E21893@hal.mpn.cp.philips.com> Reply-To: Jos Backus Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG With a kernel built on June 9th, I am seeing the following: hal:/sys/kern# w -h | grep jos jos p1 :0.0 Wed03PM - /usr/local/bin/vim /ho # watch p1 watch: fatal: cannot attach to tty # kdump output: 25537 watch CALL open(0xbfbfd8f4,0,0xbfbfd9e4) 25537 watch NAMI "/dev/snp0" 25537 watch RET open 3 25537 watch CALL stat(0xbfbfd504,0xbfbfd4a4) 25537 watch NAMI "/dev/ttyp1" 25537 watch RET stat 0 25537 watch CALL ioctl(0x3,SNPSTTY,0x804ac80) 25537 watch RET ioctl -1 errno 22 Invalid argument 25537 watch CALL ioctl(0,TIOCSETA,0x804b0a0) 25537 watch RET ioctl 0 25537 watch CALL write(0x2,0xbfbfcd04,0x7) 25537 watch GIO fd 2 wrote 7 bytes "watch: " 25537 watch RET write 7 25537 watch CALL write(0x2,0xbfbfcd1c,0x1b) 25537 watch GIO fd 2 wrote 27 bytes "fatal: cannot attach to tty" 25537 watch RET write 27/0x1b 25537 watch CALL write(0x2,0xbfbfcd08,0x1) 25537 watch GIO fd 2 wrote 1 byte " " 25537 watch RET write 1 25537 watch CALL exit(0x45) The following code in sys/kern/tty_snoop.c seems responsible: tp = snpdevtotty(tdev); if (!tp) return (EINVAL); which in turn leads to static struct tty * snpdevtotty (dev) dev_t dev; { struct cdevsw *cdp; cdp = devsw(dev); if (cdp == NULL) return (NULL); return ((*cdp->d_devtotty)(dev)); } Apparently cdp is set to NULL here by the ``devsw(dev)'' call. I suspect that this issue is related to the recent dev_t changes. Is anyone else seeing this? Thanks, -- Jos Backus _/ _/_/_/ "Reliability means never _/ _/ _/ having to say you're sorry." _/ _/_/_/ -- D. J. Bernstein _/ _/ _/ _/ Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message