On Sat, Dec 30, 2000 at 09:41:08AM -0600, Michael Harnois wrote:
> panic: lockable mtx_enter() of lockmgr interlock when not legal @ 
>../../kern/kern_lock.c: 247

Hello!

OK, so since nobody has done it before me, I just decided to investigate a
bit. Remember, that I am not a kernel hacker, so I might be completely
off-base with what I have done. (In which case, feel free to toast me)

Machine:

FreeBSD fonix.hos.u-szeged.hu 5.0-CURRENT FreeBSD 5.0-CURRENT #14: Sat Dec
30 15
:04:55 CET 2000     [EMAIL PROTECTED]:/usr/src/sys/compile/FONIX
i386

Problem:

When using ftp, and either a transfer or a dir listing is in progress,
hitting Ctrl-Z in the terminal on which ftp runs causes a panic. When ftp
just sits there waiting for ttyin, Ctrl-Z works just fine.

This is the same panic as the one described in kern/23935, but no ppp is
needed, it just works:-) 

Other symptoms:

Maybe related, network performance on my RealTek 8029 (ed) PCI card is
impacted since the last upgrade (today). Especially ssh performance goes
down the toilet from time to time (which
makes it a real PITA to type this letter on our mail server, but machine
itself is not allowed to send mail because of firewall...) ie characters
appear with high latency, connection appears to be hung. Interestingly,
disk activity is *not* impacted, somehow keyboard and network interact in
non-favorable ways. (ie I can listen to mp3s as I want, it doesn't even
stutter, also build/installworld and rm -rf /usr/obj/* completed without
any problems and within normal time-frame.) 

Measures:

After finding out how to reproduce the panic, I broke out my FM radio and
took a crash dump. (it's almost party time, after all...) and fired up gdb.
Poked around some, since the bt posted in the PR is appearently from
non-debug kernel, and am including the transscript here. I do not think
there is anything unusual about my kernel config and dmesg, but if you
think they are interesting, I can post those.

Next:

I think I am going to build a new kernel with MUTEX_DEBUG to see if
anything changes. But I do not have the skillz (even after looking at how
some of the maestros do it on these lists:-) to investigate a lot more, so
if you have any ideas at all as to where to go from here, I will gladly
follow... the machine *can* afford downtime:-) (but crash dumps tend to be
big since i have 128M of RAM:-)

Thoughts? Flames?:-)

-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary
Script started on Sat Dec 30 17:48:55 2000
[17:48, Dec 30., Sat] cc@fonix:/usr/src/sys/compile/FONIX ttyp0 # 
gdb -k

GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd".
(kgdb) symbol-file kernel.debug
Reading symbols from kernel.debug...done.
(kgdb) exec-file /var/crash/kernel.0
(kgdb) core-file /var/crash/vmcore.0
IdlePTD 4980736
initial pcb at 3c7120
panicstr: blockable mtx_enter() of lockmgr interlock when not legal @ 
../../kern/kern_lock.c:247
panic messages:
---
panic: blockable mtx_enter() of lockmgr interlock when not legal @ 
../../kern/kern_lock.c:247

syncing disks... 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 
1: dev:#ad/0x20003, flags:21021024, blkno:144, lblkno:144
2: dev:#ad/0x20006, flags:21021024, blkno:3014976, lblkno:3014976
3: dev:#ad/0x20003, flags:21021024, blkno:196672, lblkno:196672
giving up on 3 buffers
Uptime: 30m17s

dumping to dev #ad/0x20001, offset 352256
dump ata0: resetting devices .. done
128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 
107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 
81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 
52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 
23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 
---
#0  dumpsys () at ../../kern/kern_shutdown.c:477
477             if (dumping++) {
(kgdb) where     bt
#0  dumpsys () at ../../kern/kern_shutdown.c:477
#1  0xc01b94a7 in boot (howto=256) at ../../kern/kern_shutdown.c:320
#2  0xc01b9871 in panic (
    fmt=0xc032cce0 "blockable mtx_enter() of %s when not legal @ %s:%d")
    at ../../kern/kern_shutdown.c:570
#3  0xc01b3c23 in witness_enter (m=0xc0b54e00, flags=0, 
    file=0xc032bcfa "../../kern/kern_lock.c", line=247)
    at ../../kern/kern_mutex.c:875
#4  0xc01b0ab6 in lockmgr (lkp=0xc03f2260, flags=1, interlkp=0x0, p=0xcbbb4740)
    at ../../sys/mutex.h:528
#5  0xc01baf44 in psignal (p=0xcbbb2320, sig=18) at ../../kern/kern_sig.c:1161
#6  0xc01baa89 in pgsignal (pgrp=0xc269c020, sig=18, checkctty=1)
    at ../../kern/kern_sig.c:985
#7  0xc01d4331 in ttyinput (c=26, tp=0xc03db0a0) at ../../kern/tty.c:421
#8  0xc02ee0fe in sckbdevent (thiskbd=0xc03d9720, event=0, arg=0xc03e0700)
    at ../../dev/syscons/syscons.c:617
#9  0xc02e5ce6 in atkbd_intr (kbd=0xc03d9720, arg=0x0)
    at ../../dev/kbd/atkbd.c:458
#10 0xc030d644 in atkbd_isa_intr (arg=0xc03d9720) at ../../isa/atkbd_isa.c:125
#11 0xc030a120 in ithd_loop (dummy=0x0) at ../../i386/isa/ithread.c:188
(kgdb) up
#1  0xc01b94a7 in boot (howto=256) at ../../kern/kern_shutdown.c:320
320                     dumpsys();
(kgdb) up
#2  0xc01b9871 in panic (
    fmt=0xc032cce0 "blockable mtx_enter() of %s when not legal @ %s:%d")
    at ../../kern/kern_shutdown.c:570
570             boot(bootopt);
(kgdb) up
#3  0xc01b3c23 in witness_enter (m=0xc0b54e00, flags=0, 
    file=0xc032bcfa "../../kern/kern_lock.c", line=247)
    at ../../kern/kern_mutex.c:875
875                     panic("blockable mtx_enter() of %s when not legal @ %s:%d",
(kgdb) list
870                     goto out;
871             if (cold)
872                     goto out;
873     
874             if (!mtx_legal2block())
875                     panic("blockable mtx_enter() of %s when not legal @ %s:%d",
876                                 m->mtx_description, file, line);
877             /*
878              * Is this the first mutex acquired 
879              */
(kgdb) up
#4  0xc01b0ab6 in lockmgr (lkp=0xc03f2260, flags=1, interlkp=0x0, p=0xcbbb4740)
    at ../../sys/mutex.h:528
528             WITNESS_ENTER(mpp, type, file, line);
(kgdb) list
523                             _getlock_sleep(mpp, CURTHD, (type) & MTX_HARDOPTS);
524                     else
525                             _getlock_norecurse(mpp, CURTHD, (type) & 
MTX_HARDOPTS);
526             }
527     done:
528             WITNESS_ENTER(mpp, type, file, line);
529             if (((type) & MTX_QUIET) == 0)
530                     CTR5(KTR_LOCK, STR_mtx_enter_fmt,
531                         mpp->mtx_description, mpp, mpp->mtx_recurse, file, line);
532     
(kgdb) q
[17:50, Dec 30., Sat] cc@fonix:/usr/src/sys/compile/FONIX ttyp0 # 
exit

exit

Script done on Sat Dec 30 17:50:52 2000

Reply via email to