From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#13743: 24.2.93; Segmentation fault when trying to [s]teal a file opened elsewhere Date: Wed, 27 Feb 2013 21:46:16 +0400 Message-ID: <512E4668.6040000@yandex.ru> References: <5125ADA9.3070603@cs.ucla.edu> <51283965.2020107@yandex.ru> <837glzkqvc.fsf@gnu.org> <83621ilvk9.fsf@gnu.org> <512A31A0.4040804@yandex.ru> <83ehg5k8xe.fsf@gnu.org> <512AFC18.4090504@yandex.ru> <83zjysicj7.fsf@gnu.org> <512BB694.3030501@yandex.ru> <83r4k4i40t.fsf@gnu.org> <512BF25F.4080208@yandex.ru> <83fw0jivh5.fsf@gnu.org> <512C3328.4070103@yandex.ru> <831uc2j4rk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361987282 12981 80.91.229.3 (27 Feb 2013 17:48:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2013 17:48:02 +0000 (UTC) Cc: 13743-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 27 18:48:24 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UAl77-0007Nr-G0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2013 18:48:21 +0100 Original-Received: from localhost ([::1]:44576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAl6j-0003t6-4n for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2013 12:47:57 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAl6W-0003qw-G7 for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 12:47:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAl63-00028J-Eo for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 12:47:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAl62-00027A-8q for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 12:47:15 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UAl7m-0002L8-60 for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 12:49:02 -0500 Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Feb 2013 17:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 13743 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 13743@debbugs.gnu.org, dgutov@yandex.ru, dgutov@yandex.ru Original-Received: via spool by 13743-done@debbugs.gnu.org id=D13743.13619872948933 (code D ref 13743); Wed, 27 Feb 2013 17:49:01 +0000 Original-Received: (at 13743-done) by debbugs.gnu.org; 27 Feb 2013 17:48:14 +0000 Original-Received: from localhost ([127.0.0.1]:53821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAl6z-0002K2-T4 for submit@debbugs.gnu.org; Wed, 27 Feb 2013 12:48:14 -0500 Original-Received: from mail-lb0-f171.google.com ([209.85.217.171]:56323) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAl6v-0002Jr-9P for 13743-done@debbugs.gnu.org; Wed, 27 Feb 2013 12:48:10 -0500 Original-Received: by mail-lb0-f171.google.com with SMTP id gg13so691848lbb.30 for <13743-done@debbugs.gnu.org>; Wed, 27 Feb 2013 09:46:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=z2LBmIMe7kXvZ/i3hQfoHJ+ieaHkKoX/w3+CHfCB7s4=; b=agdC92L2r148OX92DgSCVj+DGyXiRzZeE+iOQx3khOW8qoq0SQxMowI5wPSzjsYtLI Xx8hnkSWzVb0akWTrkGx29L8Cz2EpCu6v6LF8ZUMcFdyPdXVTTzZarCfxascDtewmG3V wRzWjyFENOyB0DS7d2SkOVzhhn8QXD7bdV6xLSQdA8QjB6dIdrrZU8F9TkxNV0ZFYDtv Gnc/ixYT7oniyf7hyY51DfiqnZpaQOD78clMJ45l/OGfpQbdgjvt+zgCow9a57XvP5R2 gjgae5cVG/farA0AfMdz0rBoW7VHDSOyUNRIw/W0r5ShM6MMFdNslIh8BuJsGB7IYPeH cyvQ== X-Received: by 10.112.16.12 with SMTP id b12mr2450054lbd.55.1361987176385; Wed, 27 Feb 2013 09:46:16 -0800 (PST) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id mq7sm3149904lab.1.2013.02.27.09.46.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Feb 2013 09:46:15 -0800 (PST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: <831uc2j4rk.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71920 Archived-At: On 26.02.2013 22:42, Eli Zaretskii wrote: >> Date: Tue, 26 Feb 2013 07:59:36 +0400 >> From: Dmitry Gutov >> CC: monnier@iro.umontreal.ca, 13743@debbugs.gnu.org >> >> On 26.02.2013 7:51, Eli Zaretskii wrote: >>>> Date: Tue, 26 Feb 2013 03:23:11 +0400 >>>> From: Dmitry Gutov >>>> CC: monnier@iro.umontreal.ca, 13743@debbugs.gnu.org >>>> >>>> On 25.02.2013 23:31, Eli Zaretskii wrote: >>>>>> Date: Mon, 25 Feb 2013 23:08:04 +0400 >>>>>> From: Dmitry Gutov >>>>>> CC: monnier@iro.umontreal.ca, 13743@debbugs.gnu.org >>>>>> >>>>>> On 25.02.2013 20:27, Eli Zaretskii wrote: >>>>>>> Btw, what mmm-mode does is quite nasty, because it causes stale lock >>>>>>> files to be left behind, if you press 'p' when Emacs says that the >>>>>>> file is locked. This is because mmm-mode makes the buffer unmodified >>>>>>> again after doing whatever it is that causes these prompts, and if you >>>>>>> then kill Emacs without ever editing the file, the function that >>>>>>> unlocks the file is not called (because the buffer is not modified). >>>>>> >>>>>> AFAICT, it only did that to make sure the subsequent `kill-buffer' >>>>>> doesn't query the user. It doesn't seem to do that either way, so I >>>>>> removed the `set-buffer-modified-p' call. >>>>> >>>>> And after removing that call, do you end up with a "modified" buffer >>>>> after visiting a file? >>>> >>>> Nope. >>> >>> Then the root cause is still there: the file is locked by an operation >>> that leaves the buffer unmodified. >> >> Any ideas what that might be? mmm-mode initialization code is rather >> complex. > > I suggest to run Emacs under GDB, put a breakpoint in lock_file and > unlock_file, and when they break, see who calls them in C and in Lisp. Thanks, this little investigation has resulted in Bug#13836, please take a look when you have the time. Meanwhile, binding `buffer-file-truename' to nil around the whole indirect-buffer business seems to work around this well enough.