Re: PROCTREE_LOCK() vs. gdb hang

2000-12-31 Thread Wesley Morgan

On Sun, 31 Dec 2000, User Sja wrote:

 I don't really know my way around the kernel so I'm just guessing here:

 Is there a proctree lock release operation missing in kern_sig.c,
 function issignal()?  There seems to be one lock operation more
 than there are release operations.  I tried putting one in and
 now gdb doesn't hang the whole machine (at least as easily as
 before.)

I don't know anything about the kernel either, but I locked up in gdb the
other day and every process eventually became stuck in proctree... Just my
$0.02US

-- 
   _ __ ___   ___ ___ ___
  Wesley N Morgan   _ __ ___ | _ ) __|   \
  [EMAIL PROTECTED] _ __ | _ \._ \ |) |
  FreeBSD: The Power To Serve  _ |___/___/___/
  6bone: 3ffe:1ce3:7::b4ff:fe53:c297
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!



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



Re: PROCTREE_LOCK() vs. gdb hang

2000-12-31 Thread Brian F. Feldman

User Sja [EMAIL PROTECTED] wrote:
 I don't really know my way around the kernel so I'm just guessing here:
 
 Is there a proctree lock release operation missing in kern_sig.c,
 function issignal()?  There seems to be one lock operation more
 than there are release operations.  I tried putting one in and
 now gdb doesn't hang the whole machine (at least as easily as
 before.)

I think you've really found the problem!  Your analysis and fix seems to be 
correct, and it wouldn't affect "normal" operations, only those when a 
process is being traced.  I'll test it out right now to make sure it works, 
and Paul can commit it if he also thinks it is correct.

 #kern (sja@tilli) 112 cvs diff -u kern_sig.c
 Index: kern_sig.c
 ===
 RCS file: /usr/cvs/src/sys/kern/kern_sig.c,v
 retrieving revision 1.98
 diff -u -r1.98 kern_sig.c
 --- kern_sig.c  2000/12/23 19:43:09 1.98
 +++ kern_sig.c  2000/12/31 16:01:45
 @@ -1311,6 +1311,7 @@
 PROCTREE_LOCK(PT_SHARED);
 } while (!trace_req(p)
   p-p_flag  P_TRACED);
 +   PROCTREE_LOCK(PT_RELEASE);
  
 /*
  * If the traced bit got turned off, go back up
 
 
 ++sja



-- 
 Brian Fundakowski Feldman   \  FreeBSD: The Power to Serve!  /
 [EMAIL PROTECTED]`--'




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



RE: PROCTREE_LOCK() vs. gdb hang

2000-12-31 Thread John Baldwin


On 31-Dec-00 User Sja wrote:
 I don't really know my way around the kernel so I'm just guessing here:
 
 Is there a proctree lock release operation missing in kern_sig.c,
 function issignal()?  There seems to be one lock operation more
 than there are release operations.  I tried putting one in and
 now gdb doesn't hang the whole machine (at least as easily as
 before.)

This looks correct.  If Paul can test it and commit it that would be most
helpful.

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


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