From owner-freebsd-bugs Sat Jun 19 15:50: 7 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5BBF4152BD for ; Sat, 19 Jun 1999 15:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA24663; Sat, 19 Jun 1999 15:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sat, 19 Jun 1999 15:50:01 -0700 (PDT) Message-Id: <199906192250.PAA24663@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: kern/12247: userlevel program let kernel hang Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/12247; it has been noted by GNATS. From: Bruce Evans To: bde@zeta.org.au, tejblum@arc.hq.cti.ru Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/12247: userlevel program let kernel hang Date: Sun, 20 Jun 1999 08:45:53 +1000 >> tsleep()'s return codes are poorly documented and were >> misinterpreted in lf_setlock(). tsleep() can return 0 if the process >> was restarted by a debugger, > >I didn't realise that a process sleeping interruptible can be stopped >inside the tsleep call (is that true?). It looks dangerous to me. For I think it isn't true. >example, interruptible nfs may sleep interuuptible, in particular in >the vfs_bio code, with vnode locks held, etc. Stopping at such point >looks like a good opportunity to hang the machine... PT_ATTACH is implemented using SIGSTOP, but the consequences shouldn't be any worse than for a manual kill -STOP. I think SIGSTOP of a stopped process is normally optimised away (so tsleep() doesn't return), but for ptrace() it is explicitly pessimised (so tsleep() returns 0). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message