Crash -CURRENT BOX while jdk-p7 with gdb

2002-07-30 Thread Huang wen hui

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
dbtr
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 ?

--hwh



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



Re: Crash -CURRENT BOX while jdk-p7 with gdb

2002-07-30 Thread Bruce Evans

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
 dbtr
 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 -  1.175
+++ kern_sig.c  21 Jul 2002 01:25:04 -
@@ -1634,4 +1609,5 @@
if (SIGISMEMBER(p-p_sigmask, sig))
continue;
+   signotify(p);
}

%%%

Bruce


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