From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20286 invoked from network); 23 May 2008 22:30:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 May 2008 22:30:57 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 7617 invoked from network); 23 May 2008 22:30:45 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 May 2008 22:30:45 -0000 Received: (qmail 1795 invoked by alias); 23 May 2008 22:30:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25086 Received: (qmail 1782 invoked from network); 23 May 2008 22:30:40 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 23 May 2008 22:30:40 -0000 Received: from prunille.vinc17.org (vinc17.pck.nerim.net [213.41.242.187]) by bifrost.dotsrc.org (Postfix) with ESMTP id 7EE9380589A4 for ; Sat, 24 May 2008 00:30:35 +0200 (CEST) Received: by prunille.vinc17.org (Postfix, from userid 501) id E1AA722B0CFE; Sat, 24 May 2008 00:30:34 +0200 (CEST) Date: Sat, 24 May 2008 00:30:34 +0200 From: Vincent Lefevre To: martin f krafft , 482525@bugs.debian.org, zsh-workers@sunsite.dk Subject: Re: Bug#482525: failure to fcntl-lock history file, takes ages to create interactive session Message-ID: <20080523223034.GM7056@prunille.vinc17.org> Mail-Followup-To: martin f krafft , 482525@bugs.debian.org, zsh-workers@sunsite.dk References: <20080523094636.GA3814@piper.oerlikon.madduck.net> <20080523132408.GA8806@scru.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080523132408.GA8806@scru.org> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.17-vl-r21552 (2008-04-09) X-Virus-Scanned: ClamAV 0.91.2/7223/Fri May 23 23:03:39 2008 on bifrost X-Virus-Status: Clean --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2008-05-23 13:24:08 +0000, Clint Adams wrote: > On Fri, May 23, 2008 at 11:46:36AM +0200, martin f krafft wrote: > > This repeats a number of times before it finally moves on. Complete > > strace is attached. Search for "EIO". > > Out of curiosity, does the same thing happen if you use -o nolock on > the client? Don't you mean -o nohistfcntllock? I've attached a small program to test whether fcntl lock is working. Usage: tfcntl It will lock the file for seconds. You can execute it with = 1. If you don't get the prompt after 1 second, then there's a problem. I've already seen such problems in the past (the NFS server needed to be rebooted), which affected other software using fcntl lock, e.g. mail software. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon) --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tfcntl.c" #include #include #include #include #include #include int main (int argc, char *argv[]) { FILE *f; int fd; struct flock lck; if (argc != 3) { fprintf (stderr, "Usage: tfcntl \n"); exit (1); } f = fopen (argv[1], "r+b"); if (f == NULL) { fprintf (stderr, "tfcntl: can't open file %s\n", argv[1]); perror ("tfnctl"); exit (2); } fd = fileno (f); memset (&lck, 0, sizeof (struct flock)); lck.l_type = F_WRLCK; lck.l_whence = SEEK_SET; if (fcntl (fd, F_SETLK, &lck) == -1) { fprintf (stderr, "tfcntl: lock failed (errno = %d)\n", errno); perror ("tfnctl"); exit (3); } sleep(atoi(argv[2])); memset (&lck, 0, sizeof (struct flock)); lck.l_type = F_UNLCK; lck.l_whence = SEEK_SET; fcntl (fd, F_SETLK, &lck); return 0; } --HcAYCG3uE/tztfnV--