From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Gamari Newsgroups: gmane.emacs.bugs Subject: bug#21559: 25.0.50; auto-revert-mode breaks git rebase Date: Fri, 25 Sep 2015 14:45:56 +0200 Message-ID: <87wpvebraz.fsf@smart-cactus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1443192004 26548 80.91.229.3 (25 Sep 2015 14:40:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 14:40:04 +0000 (UTC) To: 21559@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 16:39:52 2015 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 1ZfUAA-0007gg-Mp for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 16:39:50 +0200 Original-Received: from localhost ([::1]:43777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfUAA-0005p8-7R for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 10:39:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfU1i-0000O0-AZ for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:31:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfU1e-0003Ui-Ud for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfU1e-0003Uc-Jz for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZfU1e-0005rR-B3 for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ben Gamari Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Sep 2015 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144319144822507 (code B ref -1); Fri, 25 Sep 2015 14:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Sep 2015 14:30:48 +0000 Original-Received: from localhost ([127.0.0.1]:43187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfU1O-0005qr-E0 for submit@debbugs.gnu.org; Fri, 25 Sep 2015 10:30:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36091) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfSOG-0003OO-Ev for submit@debbugs.gnu.org; Fri, 25 Sep 2015 08:46:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfSOE-00088l-8w for submit@debbugs.gnu.org; Fri, 25 Sep 2015 08:46:16 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:60654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfSOE-00088h-6x for submit@debbugs.gnu.org; Fri, 25 Sep 2015 08:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfSOC-0002uA-AN for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 08:46:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfSO9-000858-0t for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 08:46:12 -0400 Original-Received: from mail.smart-cactus.org ([54.187.36.80]:41563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfSO8-00084T-OV for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 08:46:08 -0400 Original-Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id D13A674944; Fri, 25 Sep 2015 12:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1443184511; bh=fp2G0h4lJf7LE+YGS8fqMT5BSRd4b0NFkRTtKRB1UJ8=; h=From:To:Subject:Date:From; b=pZY5bgD9KJNLM6dhC6J9gPQWp6DHdsvNjCVeYi/4EkQ3c+BFLVD/HSWScF9fz1VEq NOLGGq9Dd/la0ATpaL9FSB0wqyyAJmZFGEOoK1AUIG5gZ/Hh4dVSwKoLMZuWcJ126e 1mBTf/K8BauEQkF36oIe06LpjLuKMWC6GHx1nUZg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Fri, 25 Sep 2015 10:30:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:106908 Archived-At: --=-=-= Content-Type: text/plain emacs running with `auto-revert-mode` enabled breaks `git rebase` in repositories where files are open. The problem appears to be that `auto-revert-mode` attempts to refresh version control information with `vc-find-file-hook` on revert events. `vc-find-file-hook` calls out to `git`, taking the repository's index lock. This interferes badly with `git rebase`, which performs many git commands in quick succession. When `auto-revert-mode` is enabled there is a very high chance that the following race will occur, git emacs ---------------------- ----------------------------- 1. git rebase checks out a commit, releases `index.lock` 2. `auto-revert-mode` notices change, firing off a `git` process and taking `index.lock`. 3. git rebase applies patch and attempts to commit. Notices that `index.lock` is taken and fails. 4. emacs' `git` process finishes, releasing lock In the end the user is left with a badly broken rebase process and an error message complaining that `index.lock` exists, which he then goes to confirm and finds no such file as emacs has already released the lock. Arguably `git rebase` should be holding the `index.lock` for the entire duration of the process (or be more resilient to the lock being taken) but sadly this isn't the case. Emacs should behave appropriately to accomodate this behavior. One imperfect workaround would be to instead schedule a worker to call `vc-fine-file-hook` at some point in the future when the repository is more likely to be idle (for instance, when there have been no change events for a second or so). git version 2.5.1 In GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6) of 2015-08-20 on ben-laptop Windowing system distributor `The X.Org Foundation', version 11.0.11702000 System Description: Debian GNU/Linux testing (stretch) Configured using: `configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.0/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.0/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.0/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.0/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: elisp-slime-nav-mode: t goto-address-prog-mode: t auto-highlight-symbol-mode: t clean-aindent-mode: t highlight-numbers-mode: t highlight-parentheses-mode: t rainbow-delimiters-mode: t yas-global-mode: t yas-minor-mode: t helm-descbinds-mode: t helm-mode: t shell-dirtrack-mode: t projectile-global-mode: t projectile-mode: t recentf-mode: t winner-mode: t window-numbering-mode: t volatile-highlights-mode: t global-vi-tilde-fringe-mode: t global-undo-tree-mode: t undo-tree-mode: t savehist-mode: t popwin-mode: t global-page-break-lines-mode: t page-break-lines-mode: t Info-breadcrumbs-in-mode-line-mode: t ido-vertical-mode: t flx-ido-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-search-highlight-persist: t evil-search-highlight-persist: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t evil-jumper-mode: t evil-escape-mode: t global-anzu-mode: t anzu-mode: t eval-sexp-fu-flash-mode: t company-mode: t global-hl-line-mode: t xterm-mouse-mode: t global-auto-revert-mode: t evil-leader-mode: t evil-mode: t evil-local-mode: t which-key-mode: t override-global-mode: t spacemacs-additional-leader-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Recent messages: Resetting customization items...done Creating customization setup...done Creating customization items... Creating group... Creating group entries...done Creating customization items ...done Resetting customization items...done Creating customization setup...done Info-mouse-follow-link: Args out of range: 2394 Text is read-only [2 times] Load-path shadows: /home/ben/.emacs.d/elpa/helm-20150923.2134/helm-multi-match hides /home/ben/.emacs.d/elpa/helm-core-20150923.959/helm-multi-match /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-show hides /usr/local/share/emacs/site-lisp/notmuch-show /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-print hides /usr/local/share/emacs/site-lisp/notmuch-print /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-wash hides /usr/local/share/emacs/site-lisp/notmuch-wash /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-jump hides /usr/local/share/emacs/site-lisp/notmuch-jump /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-crypto hides /usr/local/share/emacs/site-lisp/notmuch-crypto /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-hello hides /usr/local/share/emacs/site-lisp/notmuch-hello /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-tree hides /usr/local/share/emacs/site-lisp/notmuch-tree /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch hides /usr/local/share/emacs/site-lisp/notmuch /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-address hides /usr/local/share/emacs/site-lisp/notmuch-address /home/ben/.emacs.d/elpa/notmuch-20150907.527/coolj hides /usr/local/share/emacs/site-lisp/coolj /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-parser hides /usr/local/share/emacs/site-lisp/notmuch-parser /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-lib hides /usr/local/share/emacs/site-lisp/notmuch-lib /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-query hides /usr/local/share/emacs/site-lisp/notmuch-query /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-mua hides /usr/local/share/emacs/site-lisp/notmuch-mua /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-message hides /usr/local/share/emacs/site-lisp/notmuch-message /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-tag hides /usr/local/share/emacs/site-lisp/notmuch-tag /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-maildir-fcc hides /usr/local/share/emacs/site-lisp/notmuch-maildir-fcc /home/ben/.emacs.d/elpa/cmake-mode-20150817.725/cmake-mode hides /usr/share/emacs24/site-lisp/cmake-data/cmake-mode /home/ben/.emacs.d/elpa/cmake-mode-20150817.725/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.0.50/lisp/textmodes/rst /home/ben/.emacs.d/elpa/seq-20150917.1508/seq hides /usr/share/emacs/25.0.50/lisp/emacs-lisp/seq Features: (shadow sort mail-extr warnings emacsbug message rfc822 mml mml-sec mailabbrev gmm-utils mailheader sendmail mail-utils cus-edit cus-start cus-load company-files company-keywords company-etags company-gtags company-template company-dabbrev-code company-dabbrev company-capf elisp-slime-nav goto-addr auto-highlight-symbol clean-aindent-mode highlight-numbers parent-mode highlight-parentheses hideshow rainbow-delimiters yasnippet jka-compr eieio-opt speedbar sb-image ezimage dframe find-func helm-command helm-elisp helm-eval edebug helm-descbinds helm-mode helm-files image-dired tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec dired-x dired-aux ffap helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info bookmark helm-locate helm-grep helm-regexp helm-plugin helm-external helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source gnus-util password-cache url-vars mailcap helm-utils helm-help helm-types helm helm-source eieio-compat helm-multi-match helm-lib dired projectile grep compile ibuf-ext ibuffer recentf tree-widget disp-table server winner window-numbering etags xref project volatile-highlights vi-tilde-fringe undo-tree diff solarized smooth-scrolling smartparens-config saveplace savehist py-yapf powerline powerline-separators color powerline-themes popwin page-break-lines info+ ido-vertical-mode flx-ido flx ido exec-path-from-shell evil-surround evil-search-highlight-persist evil-numbers evil-lisp-state smartparens evil-jumper evil-indent-textobject evil-exchange evil-escape evil-args evil-anzu anzu eval-sexp-fu rx highlight diminish company-web company web-completion-data info tex-site adaptive-wrap hybrid-mode ielm pp comint ansi-color hl-line xt-mouse autorevert filenotify core-evilified-state evil-leader evil evil-integration evil-maps evil-commands evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common windmove thingatpt rect evil-digraphs evil-vars ring which-key quelpa package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr json lisp-mnt use-package bind-key s ucs-normalize dash wid-edit zenburn-theme core-configuration-layer cl-seq finder-inf core-dotspacemacs ht cl package epg-config eieio byte-opt bytecomp byte-compile cl-extra help-mode easymenu seq cconv eieio-core cl-macs gv core-spacemacs derived edmacro kmacro cl-loaddefs cl-lib core-evilify-keymap core-keybindings easy-mmode core-use-package-ext core-micro-state corelv core-toggle core-fonts-support core-spacemacs-buffer core-funcs core-themes-support advice core-auto-completion core-release-management core-emacs-backports subr-x pcase devhelp time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 854111 669089) (symbols 48 49466 68) (miscs 40 1968 2565) (strings 32 311688 272104) (string-bytes 1 11727672) (vectors 16 64346) (vector-slots 8 1157167 184119) (floats 8 1008 1405) (intervals 56 4139 1183) (buffers 976 26) (heap 1024 129296 66437)) --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWBUIEAAoJEHPt6ejPuu8BuREH/0/wqF5hPmWfEo4vwFnZYJQl PVtauXQYeZNRoOatGK0EveJpWufjjgrowtSzQYtkT3+Cr45G8k3tQayFXvLNRpHT s8SZJciS6PDg8g0DDUCRWkhS3Til0HBHmUh+ms9zIMKTE6ujcQ4PczQiugVZ4pnJ BQRfbHgVYLfMjiHURzYzm5ytXAyiIhK2rdMRQtUdKacqi0DxDWfBIsOIfQbAvGHl TZeo2quFhWUj4KSbENu2QJcHwJ1lhPhHcS/+Yozi1/wgtGHXYe25ETdh6ypKiuK9 lo/UZlbgYSYGaBYAnstp1OKMncA6JokKxwSK+oZEkMtxbBsJnnXPhQIGoVTXZus= =sxDE -----END PGP SIGNATURE----- --==-=-=-- --=-=-=--