Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2002 03:41:43 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Huang wen hui <hwh@ns.gddsn.org.cn>
Cc:        freebsd-current <freebsd-current@FreeBSD.ORG>, <freebsd-java@FreeBSD.ORG>
Subject:   Re: Crash -CURRENT BOX while jdk-p7 with gdb
Message-ID:  <20020731032939.V56385-100000@gamplex.bde.org>
In-Reply-To: <3D46BE9B.5000906@mail.gddsn.org.cn>

next in thread | previous in thread | raw e-mail | index | archive | help
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-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020731032939.V56385-100000>