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.bac...@nl.origin-it.com  _/_/  _/_/_/      use Std::Disclaimer;


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to