From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Evil Boris Newsgroups: gmane.emacs.devel Subject: Re: RMAIL file locking problem? Date: Thu, 28 Apr 2005 00:03:25 -0400 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114661485 13207 80.91.229.2 (28 Apr 2005 04:11:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2005 04:11:25 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 28 06:11:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DR0Mw-0003jG-PC for ged-emacs-devel@m.gmane.org; Thu, 28 Apr 2005 06:11:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DR0T0-0003Ya-1k for ged-emacs-devel@m.gmane.org; Thu, 28 Apr 2005 00:17:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DR0RH-0002n2-Hc for emacs-devel@gnu.org; Thu, 28 Apr 2005 00:15:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DR0RD-0002lH-QS for emacs-devel@gnu.org; Thu, 28 Apr 2005 00:15:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DR0RD-00021E-Jj for emacs-devel@gnu.org; Thu, 28 Apr 2005 00:15:43 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DR0JE-0000Dj-I5 for emacs-devel@gnu.org; Thu, 28 Apr 2005 00:07:29 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DR0A3-0002hu-6X for emacs-devel@gnu.org; Thu, 28 Apr 2005 05:57:59 +0200 Original-Received: from 207-38-193-43.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com ([207.38.193.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Apr 2005 05:57:59 +0200 Original-Received: from evilborisnet by 207-38-193-43.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Apr 2005 05:57:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207-38-193-43.c3-0.wsd-ubr1.qens-wsd.ny.cable.rcn.com User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:GhLoJGGBMZaEkaiV6gbYldBsvso= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36466 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36466 Richard Stallman writes: > I don't know how to debug this remotely, but if you run > under GDB, you can put a breakpoint at lock_file and see > when and where it locks the file. Using the xbacktrace > GDB command at that point would give us a lot of info > about the reason, probably enough to figure out what's > happening. I played with it a bit. Emacs locks many files, so this gets quite tedious. As far as I can tell, this always happens here: ========== (gdb) xbacktrace "insert-file-contents" "rmail-insert-inbox-text" "rmail-get-new-mail" "call-interactively" (gdb) cont ========== As far as I can tell, it is the following code: (if file-name (rmail-insert-inbox-text files nil) (setq delete-files (rmail-insert-inbox-text files t))) On my machine the locking trouble seems to happen when there is no new mail. My understanding is that RMAIL reads in the contents of the (empty!) mailbox (by the way, would it make sense to check for 0 length and just skip the rest of jumping through hoops in this case---no locking, no inserting of zero bytes, no testing for having inserted zero bytes?) Any ideas of what else I can check? It seems like one way the lockfile appears (but not consistently!?!?!?) when I type "g" to get new mail, while there isn't any in the mail box. Any and all ideas welcome. --Boris