From owner-freebsd-questions@FreeBSD.ORG Fri May 21 19:59:59 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF3E81065675 for ; Fri, 21 May 2010 19:59:59 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 574868FC25 for ; Fri, 21 May 2010 19:59:58 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.2, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_50 0.80) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: o4LJxZtk006500 Received: from kobe.laptop (77.49.120.100.dsl.dyn.forthnet.gr [77.49.120.100]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-9.1) with ESMTP id o4LJxZtk006500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 21 May 2010 22:59:48 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.4/8.14.4) with ESMTP id o4LJxTQa003931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 May 2010 22:59:29 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.4/8.14.4/Submit) id o4LJxSQu003928; Fri, 21 May 2010 22:59:28 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Carl Johnson References: <877hmzbi1f.fsf@cjlinux.localnet> <878w7d7qbb.fsf@kobe.laptop> <87pr0przea.fsf@cjlinux.localnet> Date: Fri, 21 May 2010 22:59:28 +0300 In-Reply-To: <87pr0przea.fsf@cjlinux.localnet> (Carl Johnson's message of "Fri, 21 May 2010 09:30:05 -0700") Message-ID: <8739xlnhzz.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Bash lockups X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 20:00:00 -0000 On Fri, 21 May 2010 09:30:05 -0700, Carl Johnson wrote: > Giorgos Keramidas writes: >> Does this lock-up happen if you leave the shell 'idle' for too long >> over an ssh session? There may be problems with stateful connection >> tracking between your terminal and the remote shell :-/ > > No, I don't think that could be the problem. I am just using ssh > between local machines and there is no firewall between them. It also > often seems to happen to a shell as I switch away from it to another > one. One suspicion is that something is sending a signal to the shell > as it switches, and bash sometimes doesn't handle that signal > properly. > > I also should have mentioned that I have been running bash as my > default shell for years under Linux and have never seen this problem > there. > > Thanks for the suggestion. That's ok. If you can attach to the bash process with ktrace please try to grab a ktrace file from a deadlocked shell. We may be able to see why it gets deadlocked by running kdump(8) on the shell trace file. You can run a second shell under ktrace (and hope that the parent doesn't deadlock before the traced child shell), by running: bash$ ktrace -f bash.trace bash --login When you exit from the child shell you can dump ktrace(8) events from the bash.trace file with: bash$ kdump -f bash.trace > logfile 2>&1 Looking near the last records dumped in 'logfile' should be quite informative if the process is dead-locked or spinning around the same code over and over again.