From owner-freebsd-current Tue Jul 30 10:37:27 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8D9C37B400; Tue, 30 Jul 2002 10:37:19 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id A590443E31; Tue, 30 Jul 2002 10:37:18 -0700 (PDT) (envelope-from bde@zeta.org.au) 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 DAA26245; Wed, 31 Jul 2002 03:37:08 +1000 Date: Wed, 31 Jul 2002 03:41:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Huang wen hui Cc: freebsd-current , Subject: Re: Crash -CURRENT BOX while jdk-p7 with gdb In-Reply-To: <3D46BE9B.5000906@mail.gddsn.org.cn> Message-ID: <20020731032939.V56385-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Wed, 31 Jul 2002, Huang wen hui wrote: > I got a problem with jdk-p7+XIM input server. I try to use gdb to find out. > But if I run gdb on X11, -CURRENT(07/29) box will crash immediately: > > gdb> file /usr/local/jdk1.3.1/bin/i386/green_threads/java_g > gdb> run -version > > panic: blockable sleep lock (sleep mutex) sellck @ > ../../../kern/sys_generic.c:1178 > Debugger("panic") > Stopped at Debugger+0x45: xchgl %ebx, in_Debugger.0 > db>tr > Debugger(c043bffc) at Debugger+0x45 > Panic(.....) at panic+0x7c > witness_lock(...) at witness_lock+0x7f > _mtx_lock_flags(...) at _mxt_lock_flags+0x6b > selwakeup(...) at selwakeup+0x1e > ptcwakeup(...) at ptcwakeup+0x23 > ptsstart(...) at ptsstart+0x2c > ttstart(...) at ttstart+0x16 > tputchar(...) at tputchar+0x35 > putchar(...) at putchar+0x55 > kvprintf(...) at kvprintf+0x77 > printf(...) at printf+0x43 > userret(...) at userret+0xd9 > ast(...) at ast+02b5 > doreti_ast() at doreti_ast+0x1a > > On text console, -CURRENT box will not crash. and I got msg: > gdb> file /usr/local/jdk1.3.1/bin/i386/green_threads/java_g > gdb> run -version > > lock order reversal > 1st 0xc44e0180 pipe mutex (pipe mutex) @ ../../../kern/sys_pipe.c:451 > 2nd 0xc04af6c0 sigio lock (sigio lock) @ ../../../kern/kern_sig.c:2014 > > failed to set signal flags properlyt for ast() > failed to set signal flags properlyt for ast() > failed to set signal flags properlyt for ast() > failed to set signal flags properlyt for ast() > failed to set signal flags properlyt for ast() > failed to set signal flags properlyt for ast() > failed to set signal flags properlyt for ast() > > I comment printf in function "userret " in file > /usr/src/sys/kern/subr_trap.c > > the box does not crash now. so It is not safe for using printf in > /usr/src/sys/kern/subr_trap.c ? No, since printf itself is broken. The TIOCCONS ioctl is broken in all cases and the syscons console driver is broken in some cases. Don't use xconsole or anything else that uses the TIOCCONS ioctl. Commenting out the printf is as good a workaround as any. Some printfs in mi_switch() are still commented out because of this bug. Try the following patch for fixing the problem reported by the printf. %%% Index: kern_sig.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_sig.c,v retrieving revision 1.175 diff -u -2 -r1.175 kern_sig.c --- kern_sig.c 10 Jul 2002 06:31:35 -0000 1.175 +++ kern_sig.c 21 Jul 2002 01:25:04 -0000 @@ -1634,4 +1609,5 @@ if (SIGISMEMBER(p->p_sigmask, sig)) continue; + signotify(p); } %%% Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message