unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19304: 25.0.50; vc-dir hangs forever
@ 2014-12-08 13:47 Sam Steingold
  2014-12-08 16:25 ` Dmitry Gutov
  0 siblings, 1 reply; 9+ messages in thread
From: Sam Steingold @ 2014-12-08 13:47 UTC (permalink / raw)
  To: 19304

When I do C-x v d ~ RET (C-x v d runs the command vc-dir), I get the
buffer and the message "running hg status -mardui -C . in background"
and the *vc-dir* buffer never actually becomes usable.

This behavior started relatively recently (within the last couple of
weeks).

My home directory is under hg and many subtrees are ignored:

--8<---------------cut here---------------start------------->8---
$ time hg status -mardui -C . | cut -f1 -d' ' | sort | uniq -c | sort -n'
   1 A
   5 M
  19 ?
185661 I

real	0m11.587s
user	0m10.745s
sys	0m1.103s
--8<---------------cut here---------------end--------------->8---

as you see, the hg command completes fast but emacs, apparently, chokes
on the 180k ignored files.

In GNU Emacs 25.0.50.9 (x86_64-apple-darwin14.0.0, NS appkit-1343.16 Version 10.10.1 (Build 14B25))
 of 2014-12-08 on sds-MacBook-Pro.local
Repository revision: 7fb8fc35ebf980ed299ce9dfd1694fa0f1ea169b
Windowing system distributor `Apple', version 10.3.1343
Configured using:
 `configure --with-ns'

Configured features:
IMAGEMAGICK ACL GNUTLS LIBXML2 ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  diff-auto-refine-mode: t
  rcirc-track-minor-mode: t
  which-function-mode: t
  url-handler-mode: t
  show-paren-mode: t
  desktop-save-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent messages:
Spell-checking region using aspell with default dictionary...
Exited spell-checking
Sending...
Mark set [2 times]
Sending via mail...
Type "q" in help window to delete it.
Sending email 
Sending email done
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
Sending...done
next-line: End of buffer [3 times]

Load-path shadows:
None found.

Features:
(help-mode gnutls smtpmail ispell cl-indent pp shadow sort bbdb-message
mailalias cookie1 mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view
mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time
gnus-spec gnus-int gnus-range gnus-win skeleton emacsbug message rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs disp-table network-stream nsm starttls tls
time-stamp ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff misearch multi-isearch tramp-cache mule-util
tramp-sh tramp tramp-compat tramp-loaddefs trampver remember
bug-reference add-log sh-script smie dired-aux python json pig-mode
vc-hg make-mode view noutline outline vc-git diff-mode easy-mmode vc-dir
ewoc vc vc-dispatcher package epg-config dired midnight warnings gnus
gnus-ems nnheader mail-utils wid-edit bbdb-mua bbdb-com crm mailabbrev
bbdb-loaddefs bbdb bbdb-site timezone rcirc server which-func imenu
url-handlers url-parse auth-source cl-macs eieio byte-opt bytecomp
byte-compile cl-extra cconv eieio-core gnus-util mm-util mail-prsvr
password-cache url-vars paren help-at-pt desktop frameset cus-start
cus-load ido ess-toolbar ess-mouse mouseme thingatpt browse-url ess-menu
ess-swv ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d
ess-sas-l ess-sas-a shell pcomplete ess-sta-d ess-sta-l cc-vars cc-defs
make-regexp ess-sp6-d ess-sp3-d ess-julia ess-r-d compile ess-tracebug
format-spec ess-roxy advice help-fns hideshow ess-help ess-developer
ess-r-args ess-s-l ess ess-inf comint ansi-color ring ess-mode
ess-noweb-mode ess-utils ess-custom executable easymenu ess-compat
ess-site cl gv cl-loaddefs cl-lib time-date tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win 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 cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer 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 make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 2340516 126226)
 (symbols 48 65311 0)
 (miscs 40 101868 767)
 (strings 32 286040 38685)
 (string-bytes 1 13454818)
 (vectors 16 148643)
 (vector-slots 8 1800520 46530)
 (floats 8 612 1030)
 (intervals 56 578435 12684)
 (buffers 976 60))

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1343
http://www.childpsy.net/ http://americancensorship.org
http://mideasttruth.com http://honestreporting.com http://iris.org.il
People hear what they want to hear and discard the rest.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 13:47 bug#19304: 25.0.50; vc-dir hangs forever Sam Steingold
@ 2014-12-08 16:25 ` Dmitry Gutov
  2014-12-08 17:00   ` Sam Steingold
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Gutov @ 2014-12-08 16:25 UTC (permalink / raw)
  To: Sam Steingold; +Cc: 19304-done

Version: 25.1

Sam Steingold <sds@gnu.org> writes:

> When I do C-x v d ~ RET (C-x v d runs the command vc-dir), I get the
> buffer and the message "running hg status -mardui -C . in background"
> and the *vc-dir* buffer never actually becomes usable.

AFAICS, that's due to b1a765b3a8586cd53c21579982c8fbc0ce534336.

It switched `vc-dir-refresh-files' to call `dir-status-file' without
checking that each implementation doesn't include unwanted files which
might slow down that call.

Although 180K ignored files? Damn, that's a lot.

Should be fixed with 5872f843ff45de150f4b35cbc9b11e9f63c96cf2.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 16:25 ` Dmitry Gutov
@ 2014-12-08 17:00   ` Sam Steingold
  2014-12-08 18:18     ` Dmitry Gutov
  0 siblings, 1 reply; 9+ messages in thread
From: Sam Steingold @ 2014-12-08 17:00 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 19304, 19304-reopen

No, your patch is not a solution.
'C-x v d' now works, but 'g' in the *vc-dir* buffer hangs.
100k ignored files is quite normal.
I have my home under hg and many git and hg repos in ~/src/ &c, and
the top-level hg ignores "~/src".

On Mon, Dec 8, 2014 at 11:25 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> Version: 25.1
>
> Sam Steingold <sds@gnu.org> writes:
>
>> When I do C-x v d ~ RET (C-x v d runs the command vc-dir), I get the
>> buffer and the message "running hg status -mardui -C . in background"
>> and the *vc-dir* buffer never actually becomes usable.
>
> AFAICS, that's due to b1a765b3a8586cd53c21579982c8fbc0ce534336.
>
> It switched `vc-dir-refresh-files' to call `dir-status-file' without
> checking that each implementation doesn't include unwanted files which
> might slow down that call.
>
> Although 180K ignored files? Damn, that's a lot.
>
> Should be fixed with 5872f843ff45de150f4b35cbc9b11e9f63c96cf2.



-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 17:00   ` Sam Steingold
@ 2014-12-08 18:18     ` Dmitry Gutov
  2014-12-08 18:34       ` Sam Steingold
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Gutov @ 2014-12-08 18:18 UTC (permalink / raw)
  To: Sam Steingold; +Cc: 19304

On 12/08/2014 07:00 PM, Sam Steingold wrote:
> No, your patch is not a solution.
> 'C-x v d' now works, but 'g' in the *vc-dir* buffer hangs.
> 100k ignored files is quite normal.
> I have my home under hg and many git and hg repos in ~/src/ &c, and
> the top-level hg ignores "~/src".

Okay, it's more complicated, then. Do you see a change in which command 
is called? Specifically, the "i" from "-mardui" should be gone now.

Could you find out where most of the time is spent? The call to Hg, or 
some particular Emacs function.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 18:18     ` Dmitry Gutov
@ 2014-12-08 18:34       ` Sam Steingold
  2014-12-08 22:56         ` Dmitry Gutov
  0 siblings, 1 reply; 9+ messages in thread
From: Sam Steingold @ 2014-12-08 18:34 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Eric S. Raymond, 19304

> * Dmitry Gutov <qthgbi@lnaqrk.eh> [2014-12-08 20:18:48 +0200]:
>
> On 12/08/2014 07:00 PM, Sam Steingold wrote:
>> No, your patch is not a solution.
>> 'C-x v d' now works, but 'g' in the *vc-dir* buffer hangs.
>> 100k ignored files is quite normal.
>> I have my home under hg and many git and hg repos in ~/src/ &c, and
>> the top-level hg ignores "~/src".
>
> Okay, it's more complicated, then. Do you see a change in which command
> is called? Specifically, the "i" from "-mardui" should be gone now.

yes, but only for vc-dir, not revert-buffer in *vc-dir*.
also this is only for hg not git and others

> Could you find out where most of the time is spent? The call to Hg, or
> some particular Emacs function.

some emacs function (-mardui takes ~10s).
dunno which - bug#19303 kills emacs when I set debug-on-quit to t and
try to C-g out of the frozen emacs.

note that it is _really_ easy to reproduce the problem:

1. clone emacs repo into dir1
2. clone emacs repo into dir2
3. mv dir1 dir2/
4. add dir1 to dir2/.gitignore


-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1343
http://www.childpsy.net/ http://openvotingconsortium.org
http://honestreporting.com http://mideasttruth.com
recursion, n: See recursion.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 18:34       ` Sam Steingold
@ 2014-12-08 22:56         ` Dmitry Gutov
  2014-12-09  4:39           ` Sam Steingold
  2014-12-10  0:09           ` Sam Steingold
  0 siblings, 2 replies; 9+ messages in thread
From: Dmitry Gutov @ 2014-12-08 22:56 UTC (permalink / raw)
  To: sds; +Cc: Eric S. Raymond, 19304

On 12/08/2014 08:34 PM, Sam Steingold wrote:

> yes, but only for vc-dir, not revert-buffer in *vc-dir*.
> also this is only for hg not git and others

I see. From the original report, I figured the problem was only with the 
Hg backend.

>> Could you find out where most of the time is spent? The call to Hg, or
>> some particular Emacs function.
>
> some emacs function (-mardui takes ~10s).
> dunno which - bug#19303 kills emacs when I set debug-on-quit to t and
> try to C-g out of the frozen emacs.

Instead of `debug-on-quit', if quitting by itself doesn't lead to 
crashes, you can try ELP or M-x profiler start.

> note that it is _really_ easy to reproduce the problem:
>
> 1. clone emacs repo into dir1
> 2. clone emacs repo into dir2
> 3. mv dir1 dir2/
> 4. add dir1 to dir2/.gitignore

Nope, I don't see the freeze here. It isn't particularly slow either.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 22:56         ` Dmitry Gutov
@ 2014-12-09  4:39           ` Sam Steingold
  2014-12-09 13:23             ` Dmitry Gutov
  2014-12-10  0:09           ` Sam Steingold
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Steingold @ 2014-12-09  4:39 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Eric S. Raymond, 19304

On Mon, Dec 8, 2014 at 5:56 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 12/08/2014 08:34 PM, Sam Steingold wrote:
>
>> note that it is _really_ easy to reproduce the problem:
>>
>> 1. clone emacs repo into dir1
>> 2. clone emacs repo into dir2
>> 3. mv dir1 dir2/
>> 4. add dir1 to dir2/.gitignore
>
> Nope, I don't see the freeze here. It isn't particularly slow either.

hmmm, maybe it is indeed limited to hg?
could you try to create an empty hg repo and move there an ignored
emacs git repo?
Thanks!

-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-09  4:39           ` Sam Steingold
@ 2014-12-09 13:23             ` Dmitry Gutov
  0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Gutov @ 2014-12-09 13:23 UTC (permalink / raw)
  To: Sam Steingold; +Cc: Eric S. Raymond, 19304

On 12/09/2014 06:39 AM, Sam Steingold wrote:

> hmmm, maybe it is indeed limited to hg?
> could you try to create an empty hg repo and move there an ignored
> emacs git repo?

Tried, and still didn't see anything nefarious.

There is a slowdown when the emacs subdir is not in .hgignore (but 
there's no freeze, and I get all Emacs's files in the vc-dir buffer with 
the status `unregistered'), but if I add the dir to .hgignore now and 
press `g', after a similar pause (~5 seconds), they become `ignored', 
and pressing `x' on an empty line removes them from the list.

After that, `g' works fast, and if I kill the vc-dir buffer and then 
reopen it, the ignored files are not displayed.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#19304: 25.0.50; vc-dir hangs forever
  2014-12-08 22:56         ` Dmitry Gutov
  2014-12-09  4:39           ` Sam Steingold
@ 2014-12-10  0:09           ` Sam Steingold
  1 sibling, 0 replies; 9+ messages in thread
From: Sam Steingold @ 2014-12-10  0:09 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Eric S. Raymond, 19304

On Mon, Dec 8, 2014 at 5:56 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 12/08/2014 08:34 PM, Sam Steingold wrote:
>
>>> Could you find out where most of the time is spent? The call to Hg, or
>>> some particular Emacs function.
>>
>>
>> some emacs function (-mardui takes ~10s).
>> dunno which - bug#19303 kills emacs when I set debug-on-quit to t and
>> try to C-g out of the frozen emacs.
>
>
> Instead of `debug-on-quit', if quitting by itself doesn't lead to crashes,
> you can try ELP or M-x profiler start.

I just tried - after ~ 20 minutes emacs crashed with bug#19303.

Sorry.


-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net/>





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-12-10  0:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08 13:47 bug#19304: 25.0.50; vc-dir hangs forever Sam Steingold
2014-12-08 16:25 ` Dmitry Gutov
2014-12-08 17:00   ` Sam Steingold
2014-12-08 18:18     ` Dmitry Gutov
2014-12-08 18:34       ` Sam Steingold
2014-12-08 22:56         ` Dmitry Gutov
2014-12-09  4:39           ` Sam Steingold
2014-12-09 13:23             ` Dmitry Gutov
2014-12-10  0:09           ` Sam Steingold

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).