From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21784 invoked from network); 26 Jul 2005 22:31:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jul 2005 22:31:06 -0000 Received: (qmail 87494 invoked from network); 26 Jul 2005 22:31:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 22:31:00 -0000 Received: (qmail 24331 invoked by alias); 26 Jul 2005 22:30:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21534 Received: (qmail 24322 invoked from network); 26 Jul 2005 22:30:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Jul 2005 22:30:56 -0000 Received: (qmail 87191 invoked from network); 26 Jul 2005 22:30:56 -0000 Received: from dan.emsphone.com (199.67.51.101) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 22:30:49 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j6QMUdQH043274; Tue, 26 Jul 2005 17:30:39 -0500 (CDT) (envelope-from dan) Date: Tue, 26 Jul 2005 17:30:39 -0500 From: Dan Nelson To: Mark Daniel Reidel Cc: zsh-workers@sunsite.dk Subject: Re: Pause when quitting under FreeBSD Message-ID: <20050726223038.GC57412@dan.emsphone.com> References: <42E6D3E6.5070206@reidel.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42E6D3E6.5070206@reidel.info> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 In the last episode (Jul 27), Mark Daniel Reidel said: > I'm not 100% sure if this is the right place to post this problem, > but ever since I switched to a 64bit OS and installed my shell of > choice, quitting zsh suddenly takes about 2 or 3 seconds. Since my > configuration comes from an NFS-server, I can be 100% sure that it's > the same unter FreeBSD 5.4 and 6 (which is the one that seems to have > problems). I already tried a ktrace to maybe find the bugger, but the > time-consumption seems to be during some breaks. Here's the important > parts: > > [...] > 744 zsh Events dropped. > 744 zsh 1122421279.260961 RET open 3 > 744 zsh Events dropped. > 744 zsh 1122421279.271187 RET close 0 > 744 zsh 1122421280.524404 CALL break(0x876c20) > 744 zsh 1122421280.524420 RET break 0 > 744 zsh 1122421280.563815 CALL break(0x871c20) > [...] > 744 zsh 1122421281.009755 CALL break(0x835c20) If you can switch to another shell quickly and kill -STOP it, you should be able to attach a gdb session and get a stack trace. Or, run gcore on it (which will SIGSTOP it temporarily) and gdb the resulting corefile. Since the next thing zsh does is unlink the history lockfile, I'd guess the problem is hist.c:hend() or savehistfile() somewhere. Take a look at your ~/.zsh_history file; do you maybe have some really really long lines in it? Maybe an NFS glitch caused a run of NULLs to get stored in there. > 744 zsh 1122421281.009771 RET break 0 > 744 zsh 1122421281.548473 CALL break(0x7d4c20) > 744 zsh 1122421281.548534 RET break 0 > 744 zsh 1122421281.548602 CALL unlink(0x7b6960) > 744 zsh 1122421281.548606 NAMI "/home/mark/.zsh_history.LOCK" > 744 zsh 1122421281.553918 RET unlink 0 > [...] -- Dan Nelson dnelson@allantgroup.com