On 10 Sep 2001, Dag-Erling Smorgrav wrote:

> It's not just linux_sendsig() - I get this panic even when not running
> Linux programs:
> ...
> #10 0xc01a529d in panic (fmt=0xc02a9d20 "blockable sleep lock (%s) %s @ %s:%d")
>     at ../../../kern/kern_shutdown.c:657
> #11 0xc01c5432 in witness_lock (lock=0xc034fb40, flags=0,
>     file=0xc02a6503 "../../../kern/kern_proc.c", line=146)
>     at ../../../kern/subr_witness.c:493
> #12 0xc01aca15 in _sx_slock (sx=0xc034fb40,
>     file=0xc02a6503 "../../../kern/kern_proc.c", line=146)
>     at ../../../kern/kern_sx.c:115
> #13 0xc019bf80 in pfind (pid=453) at ../../../kern/kern_proc.c:146
> #14 0xc01ca409 in selwakeup (sip=0xc2bf5004)
>     at ../../../kern/sys_generic.c:1255
> #15 0xc01d580b in ptcwakeup (tp=0xc2bf5020, flag=1)
>     at ../../../kern/tty_pty.c:319
> #16 0xc01d57e6 in ptsstart (tp=0xc2bf5020) at ../../../kern/tty_pty.c:308
> #17 0xc01d2d40 in ttstart (tp=0xc2bf5020) at ../../../kern/tty.c:1409
> #18 0xc01d42f9 in tputchar (c=109, tp=0xc2bf5020) at ../../../kern/tty.c:2458

This has been debugged before.  tputchar cannot be called from plain
kernel printfs, because it calls non-reentrant parts of  tty/pty driver.
But it is called if `constty' is set.  `constty' is set by the TIOCCONS
ioctl.  This shows that TIOCCONS ioctl is misemplemented at best (it
would need a large buffer to have a chance of working, but console
output really should be unbuffered).  This is an old bug.  Previously,
calling tputchar() from interrupt handlers did something non-deterministic.
Now it always panics if it called with sched_lock held (and witness
stuff enabled).  Try nuking this ioctl or its callers.

> #19 0xc01c075b in putchar (c=109, arg=0xda0b6eb4)
>     at ../../../kern/subr_prf.c:305
> #20 0xc01c09c2 in kvprintf (
>     fmt=0xc02a6921 "icrouptime() went backwards (%ld.%06ld -> %ld.%06ld)\n",
>     func=0xc01c070c <putchar>, arg=0xda0b6eb4, radix=10, ap=0xda0b6ecc "\\n")
>     at ../../../kern/subr_prf.c:488
> #21 0xc01c0688 in printf (
>     fmt=0xc02a6920 "microuptime() went backwards (%ld.%06ld -> %ld.%06ld)\n")
>     at ../../../kern/subr_prf.c:261
> #22 0xc01a2a17 in calcru (p=0xd9fbb880, up=0xda0b5cd0, sp=0xda0b5cd8, ip=0x0)
>     at ../../../kern/kern_resource.c:640
> #23 0xc01a2f8f in getrusage (p=0xd9fbb880, uap=0xda0b6f80)
>     at ../../../kern/kern_resource.c:719
> #24 0xc0277f79 in syscall (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
>       tf_edi = 4, tf_esi = 675146872, tf_ebp = 136366288, tf_isp = -636784684,
>       tf_ebx = 675227280, tf_edx = 136366316, tf_ecx = 675052402,
>       tf_eax = 117, tf_trapno = 0, tf_err = 2, tf_eip = 677466309, tf_cs = 31,
>       tf_eflags = 535, tf_esp = 136366248, tf_ss = 47})
>     at ../../../i386/i386/trap.c:1117
> #25 0xc026a4fd in syscall_with_err_pushed ()

Bruce


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to