From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mitchel Humpherys Newsgroups: gmane.emacs.bugs Subject: bug#21559: 25.0.50; auto-revert-mode breaks git rebase Date: Sat, 06 Feb 2016 21:03:35 -0800 Message-ID: <87vb613ye0.fsf@gmail.com> References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454821460 2240 80.91.229.3 (7 Feb 2016 05:04:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2016 05:04:20 +0000 (UTC) Cc: 21559@debbugs.gnu.org To: Ben Gamari Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 07 06:04:11 2016 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 1aSHW6-0006tW-DV for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Feb 2016 06:04:10 +0100 Original-Received: from localhost ([::1]:59588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSHW5-00044q-IX for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Feb 2016 00:04:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSHW2-00044V-3t for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2016 00:04:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSHVy-000762-Ti for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2016 00:04:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSHVy-00075y-PK for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2016 00:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSHVy-0006Ks-J5 for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2016 00:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mitchel Humpherys Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Feb 2016 05:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21559-submit@debbugs.gnu.org id=B21559.145482142624317 (code B ref 21559); Sun, 07 Feb 2016 05:04:02 +0000 Original-Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 05:03:46 +0000 Original-Received: from localhost ([127.0.0.1]:36251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSHVi-0006K9-79 for submit@debbugs.gnu.org; Sun, 07 Feb 2016 00:03:46 -0500 Original-Received: from mail-pf0-f173.google.com ([209.85.192.173]:33043) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSHVg-0006Jv-Bf for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 00:03:44 -0500 Original-Received: by mail-pf0-f173.google.com with SMTP id w123so91804665pfb.0 for <21559@debbugs.gnu.org>; Sat, 06 Feb 2016 21:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=nlyWiwhcbeeREGrq/0oqQHqszBwv01E5PtdO0BlU6aY=; b=lQyOC73Gpnqv6hFtbbfnw4/g5iVQ0LkF3fiYj1CsrcDlUsH9Qf92O8DhJDd4a1CesW IFzqBMkZCGcOeuHk5cVdsHRkGi0MPxOpUlD3dLakbHSJE9A6uSpQ+lHYQjxfjL/Wd+SZ BLx+JglunaZQxEyyxDAnmlGi+HPxRo7Sb93hcNg6f832FgCyjOP0Viz/tyiAWZXrZADc whJJllIZH2KWZKbFNnzXBF9xoMhCqq6nWgju5xY6LU3xxt1ZLV9H1S8lhsvwjqews6Ei OhgNDVkuQwAMV3N2dVklUUdE0FYpwRdKsuJd1sKFlinozOuMOub+17xY21V/ajubY6nQ KCrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=nlyWiwhcbeeREGrq/0oqQHqszBwv01E5PtdO0BlU6aY=; b=Ii76SGQGVfeZ7vOGWdZ9sNba0vaedy8SZ+e7aVclHHNJiHsj5QSPNAd7iP+nrx22kh BqRXOGjXYotbzerWvglp0sctyTLYunl6xlcGmLRP/bXG6TmtxPu6DDGfsohPMUnSWyCg s4VNAKJeKERXkPBK7TY3j6HA/vhgkKGbLR2gopbQBlz6MrqptXItCv1en6thyHo9vqLt N6ccu7EGPh1hd5S2b9Q2ciGC0EwCFH6Z2kGx1ato2lFQecIuXUzAY3AYiCFKrDLs2WnS NNDZmK5eXWoD8ms4rfED3zGhMwxNuG2XZKvAfahlLhu6WZ6Kc3zJjH5oqr7dcbvQqR83 eKlg== X-Gm-Message-State: AG10YOSVF5W7C7TKLRbQPptWScAkC5q0Qr/qEDMBDMBTpDLv6e/hGNDOxpb0+gRr8iV8fg== X-Received: by 10.98.16.86 with SMTP id y83mr32247686pfi.45.1454821418313; Sat, 06 Feb 2016 21:03:38 -0800 (PST) Original-Received: from algz ([2600:8801:f900:f34:21e:65ff:fe80:25f6]) by smtp.gmail.com with ESMTPSA id g10sm34323015pfd.92.2016.02.06.21.03.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Feb 2016 21:03:37 -0800 (PST) In-Reply-To: <87zivd8fra.fsf@gmail.com> (Mitchel Humpherys's message of "Sat, 06 Feb 2016 17:34:49 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:112591 Archived-At: On Sat, Feb 06 2016 at 05:34:49 PM, Mitchel Humpherys wrote: > I took a quick look at the git source and the main source of this > particular error seems to be from the `git update-index' command. I see > that vc-git.el is calling `git update-index' in a few places but my > attempts at instrumenting the code to track down where it was coming > from were fruitless. I tried: > > (setq vc-command-messages t) > > as well as: > > (defun vc-git-command (buffer okstatus file-or-list &rest flags) > "A wrapper around `vc-do-command' for use in vc-git.el. > The difference to vc-do-command is that this function always invokes > `vc-git-program'." > (let ((coding-system-for-read vc-git-commits-coding-system) > (coding-system-for-write vc-git-commits-coding-system)) > + (message "git: %s %s" file-or-list flags) > > Any ideas on how we can trace every git command that vc-git.el is > running? I'm suspicious that we're calling `git update-index' in the > auto revert path somewhere... Sorry, I take it all back. `git update-index' is the source of that one particular index.lock error message, but it's certainly not the only thing holding index.lock... And actually it looks like `git ls-files' does take index.lock: $ cd /path/to/emacs/ $ git ls-files # in another shell after running the following inotifywait: $ inotifywait -m .git | grep index.lock Setting up watches. Watches established. .git/ CREATE index.lock .git/ OPEN index.lock .git/ CLOSE_WRITE,CLOSE index.lock .git/ DELETE index.lock .git/ CREATE index.lock .git/ OPEN index.lock .git/ CLOSE_WRITE,CLOSE index.lock .git/ DELETE index.lock I did a bit of git debugging and it looks like someone must be registering an atexit handler or something that takes index.lock, because it doesn't get taken in the ls-files code itself. It's taken sometime after the `exit' function gets called in `handle_builtin' in git.c. Anyways, I'm more inclined now to agree that this a git bug. I don't see why `git ls-files' would be taking index.lock... So we're back to the question of "how can Emacs handle this more gracefully".