From owner-freebsd-current Sun Sep 30 20:28:48 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 3EA7A37B408 for ; Sun, 30 Sep 2001 20:24:44 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id NAA03428; Mon, 1 Oct 2001 13:24:36 +1000 Date: Mon, 1 Oct 2001 13:24:00 +1000 (EST) From: Bruce Evans X-X-Sender: To: Doug Barton Cc: Subject: Re: panic: blockable sleep lock (sx) allproc @ /usr/local/src/sys/kern/kern_proc.c:212 In-Reply-To: <3BB77EE4.4F7CAD2D@DougBarton.net> Message-ID: <20011001131719.B76679-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 30 Sep 2001, Doug Barton wrote: > =09With -current as of last night around 7pm PDT: > > > IdlePTD 4390912 > initial pcb at 320920 > panicstr: bremfree: bp 0xc68bf184 not locked > panic messages: > --- > panic: blockable sleep lock (sx) allproc @ > /usr/local/src/sys/kern/kern_proc.c:212 > > syncing disks... panic: bremfree: bp 0xc68bf184 not locked > Uptime: 9h46m14s > > ... > #10 0xc01cf4d5 in panic (fmt=3D0xc02b0f20 "blockable sleep lock (%s) %s @ > %s:%d") > at /usr/local/src/sys/kern/kern_shutdown.c:628 > #11 0xc01e6054 in witness_lock (lock=3D0xc035a9a0, flags=3D0, > file=3D0xc02ad8e0 "/usr/local/src/sys/kern/kern_proc.c", line=3D212) > at /usr/local/src/sys/kern/subr_witness.c:493 > #12 0xc01d3625 in _sx_slock (sx=3D0xc035a9a0, > file=3D0xc02ad8e0 "/usr/local/src/sys/kern/kern_proc.c", line=3D212) > at /usr/local/src/sys/kern/kern_sx.c:115 > #13 0xc01ca5e4 in pfind (pid=3D353) at > /usr/local/src/sys/kern/kern_proc.c:212 > #14 0xc01e98a2 in selwakeup (sip=3D0xc179b804) at > /usr/local/src/sys/kern/sys_generic.c:1292 > #15 0xc01f33a3 in ptcwakeup (tp=3D0xc179b828, flag=3D1) > at /usr/local/src/sys/kern/tty_pty.c:321 > #16 0xc01f337a in ptsstart (tp=3D0xc179b828) at > /usr/local/src/sys/kern/tty_pty.c:310 > #17 0xc01f0958 in ttstart (tp=3D0xc179b828) at > /usr/local/src/sys/kern/tty.c:1409 > #18 0xc01f1da9 in tputchar (c=3D99, tp=3D0xc179b828) at > /usr/local/src/sys/kern/tty.c:2469 > #19 0xc01e291f in putchar (c=3D99, arg=3D0xcd9a0be8) at > /usr/local/src/sys/kern/subr_prf.c:306 > #20 0xc01e2b9e in kvprintf ( > fmt=3D0xc02add01 "alcru: negative time of %ld usec for pid %d (%s)\n"= , > func=3D0xc01e28d0 , arg=3D0xcd9a0be8, radix=3D10, ap=3D0xcd9= a0c00 > "=DE/=CC=FF\002\020") > at /usr/local/src/sys/kern/subr_prf.c:489 > #21 0xc01e284c in printf ( > fmt=3D0xc02add00 "calcru: negative time of %ld usec for pid %d (%s)\n= ") > at /usr/local/src/sys/kern/subr_prf.c:262 > #22 0xc01cdeab in calcru (p=3D0xcd0e7300, up=3D0xc189ae00, sp=3D0xc189ae0= 8, > ip=3D0x0) > at /usr/local/src/sys/kern/kern_resource.c:669 > #23 0xc01c041c in exit1 (td=3D0xcd0e7404, rv=3D256) at > /usr/local/src/sys/kern/kern_exit.c:318 > #24 0xc01bfdde in sys_exit (td=3D0xcd0e7404, uap=3D0xcd9a0d20) > at /usr/local/src/sys/kern/kern_exit.c:110 > #25 0xc027543f in syscall (frame=3D{tf_fs =3D 47, tf_es =3D 47, tf_ds =3D= 47, > tf_edi =3D 0, > tf_esi =3D -1, tf_ebp =3D -1077937600, tf_isp =3D -845542028, tf_eb= x =3D > 672297256, > tf_edx =3D 512, tf_ecx =3D 672374048, tf_eax =3D 1, tf_trapno =3D 1= 2, tf_err > =3D 2, > tf_eip =3D 671896240, tf_cs =3D 31, tf_eflags =3D 643, tf_esp =3D > -1077937644, tf_ss =3D 47}) > at /usr/local/src/sys/i386/i386/trap.c:1122 > #26 0xc026953d in syscall_with_err_pushed () This is a well-know bug in printf(9). The TIOCCONS ioctl always gave non-deterministic crashes. Now it gives determinstic panics when pintf() is called while sched_lock is held. Work-around: don't use anything that uses TIOCCONS (xconsole?). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message