From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 04:40:35 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60F7C1065670 for ; Mon, 1 Dec 2008 04:40:35 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id 4325B8FC17 for ; Mon, 1 Dec 2008 04:40:35 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.14.3/8.14.3) with ESMTP id mB14KbrS044206 for ; Sun, 30 Nov 2008 20:20:37 -0800 (PST) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.14.3/8.14.3/Submit) id mB14Kbxp044205 for hackers@freebsd.org; Sun, 30 Nov 2008 20:20:37 -0800 (PST) (envelope-from steve) Date: Sun, 30 Nov 2008 20:20:37 -0800 From: Steve Watt To: hackers@freebsd.org Message-ID: <20081201042037.GA43208@wattres.Watt.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Callsign: KD6GGD X-Archived: 1228105237.611737844@wattres.Watt.COM X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (wattres.watt.com [127.0.0.1]); Sun, 30 Nov 2008 20:20:37 -0800 (PST) Cc: Subject: tcsh loses the foreground process group? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Steve Watt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 04:40:35 -0000 (Please don't cc: me on replies, I can usually keep up with -hackers.) I've run into this about 5 or 6 times recently, and it seems to have survived the last couple of world updates. I'm running 6-STABLE (6.4-PRE as of 24 Nov right now), tcsh 6.15.00, which shows tcsh 6.15.00 (Astron) 2007-03-03 (i386-intel-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec as $version. The symptom is that when I do a long-ish running task inside a `` expansion that I then ^C, nobody gets the foreground process group... I never get a prompt back after the ^C, and ^T gets me load: 0.27 no foreground process group Sending SIGCHLD and/or SIGCONT to the tcsh doesn't seem to make any difference at all. The tcsh is sitting in "pause" WCHAN, which seems sensible. A truss on tcsh reveals (oddly enough) that it's sitting in sigsuspend(). Sending it signals makes it loop through a wait4() call and go back into sigsuspend(). It happens running either as root (from sudo) or as a regular user. It happens under xterm, under ssh sessions, and on a direct console login. One portable reproduction: # cd /usr/src # less `egrep -lir '^Foo.*baz' *` ^Cload: 0.02 no foreground process group (I typed ^C ^T) SIGKILL to the shell seems to be the only way to get things back to normal. I'm not sure how to isolate it further - it seems likely that this is a bug in the kernel, rather than in tcsh, but the session management stuff is pretty hairy in both places. Does anyone have debugging thoughts? -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3" Internet: steve @ Watt.COM Whois: SW32-ARIN Free time? There's no such thing. It just comes in varying prices...