Experimental ttwwakeup() panic patch

Ed Maste emaste at phaedrus.sandvine.ca
Fri May 6 07:59:04 PDT 2005


On Wed, May 04, 2005 at 08:54:23PM -0700, Doug White wrote:

> > http://people.freebsd.org/~dwhite/tty.c.20050503.patch
> 
> This patch has been committed and exists as rev 1.228.2.4 of
> src/sys/kern/tty.c.  Please let me know if this fixes the panic for you,
> or causes new problems :)

For what it's worth, I've come across a similar crash during a test that
repeatedly ssh'd into the machine.

This was while opening a pty, not using serial console.  The symptoms
seem similar; my tty struct has a struct knlist with a null struct mtx *.
I haven't yet investigated in great detail or tried the patch.  I just
wanted to offer this as another data point.

Although kgdb gets confused during the backtrace (frames 7 and 8) the
tf_eip is a cmpxchg in knote().

#5  0xa0737d9e in trap (frame=
      {tf_fs = -940507112, tf_es = -1604648944, tf_ds = 16, tf_edi = -1539518464, tf_esi = -1554006784, tf_ebp =
+-940488284, tf_isp = -940488336, tf_ebx = -1572873216, tf_edx = 0, tf_ecx = -1570261440, tf_eax = 4, tf_trapno = 12,
+tf_err = 2, tf_eip = -1604905379, tf_cs = 8, tf_eflags = 66118, tf_esp = -1572873216, tf_ss = -1554006784}) at
+/usr/src/sys/i386/i386/trap.c:436
#6  0xa0723d8a in calltrap () at /usr/src/sys/i386/i386/exception.s:202
#7  0xc7f10018 in ?? ()
#8  0xa05b0010 in power_profile_set_state (state=0)
    at /usr/src/sys/kern/subr_power.c:110
#9  0xa05c942c in ttwakeup (tp=0xa23fdc00) at /usr/src/sys/kern/tty.c:2370
#10 0xa05c7d71 in ttymodem (tp=0xa23fdc00, flag=0)
    at /usr/src/sys/kern/tty.c:1625
#11 0xa05cc3cd in ptcopen (dev=0xa35fbd00, flag=3, devtype=8192, td=0x0)
    at linedisc.h:136
#12 0xa054d06c in spec_open (ap=0xc7f14a70)
    at /usr/src/sys/fs/specfs/spec_vnops.c:207
#13 0xa054cd44 in spec_vnoperate (ap=0x0)
    at /usr/src/sys/fs/specfs/spec_vnops.c:118
#14 0xa0601bad in vn_open_cred (ndp=0xc7f14bd8, flagp=0xc7f14cd8, cmode=0,
    cred=0xa315c500, fdidx=0) at vnode_if.h:228
#15 0xa060175f in vn_open (ndp=0x0, flagp=0x0, cmode=0, fdidx=0)
    at /usr/src/sys/kern/vfs_vnops.c:91
#16 0xa05fa8cd in kern_open (td=0xa267b640, path=0x0, pathseg=UIO_USERSPACE,
    flags=3, mode=0) at /usr/src/sys/kern/vfs_syscalls.c:957
#17 0xa05fa7c1 in open (td=0x0, uap=0x0)
    at /usr/src/sys/kern/vfs_syscalls.c:926
#18 0xa07388db in syscall (frame=
      {tf_fs = 134676527, tf_es = 47, tf_ds = -1614872529, tf_edi = -1, tf_esi = 134724008, tf_ebp = -1614815016, tf_isp
+= -940487308, tf_ebx = 1745724064, tf_edx = 1745720517, tf_ecx = 1748412300, tf_eax = 5, tf_trapno = 12, tf_err = 2,
+tf_eip = 1747892523, tf_cs = 31, tf_eflags = 514, tf_esp = -1614815108, tf_ss = 47}) at
+/usr/src/sys/i386/i386/trap.c:1021
#19 0xa0723ddf in Xint0x80_syscall ()
    at /usr/src/sys/i386/i386/exception.s:263

--
Ed Maste
Sandvine Inc.


More information about the freebsd-stable mailing list