emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Emacs hangs sometimes for no reason


From: Stig Brautaset
Subject: Re: [O] Emacs hangs sometimes for no reason
Date: Sun, 15 Jan 2017 13:55:00 +0000
User-agent: mu4e 0.9.19; emacs 25.1.1

Eric S Fraga <address@hidden> writes:

> On Saturday, 14 Jan 2017 at 18:33, Sebastian Christ wrote:
>> in the last couple weeks (perhaps months?) Emacs hangs for no specific
>> reason for me. The single constant is, that when it hangs, it hangs
>> while I'm in org-mode. This occurs on multiple circumstance as
>
> Just to say that I experience the same.  However, I track emacs as well
> as org so I never know if the problem is emacs or org.  In my case, all
> hangs are when in org mode but that could be because I'm in org mode
> 90% of the time... :-)

Just to say that I too experience the same. I'm convinced it started
happening since I upgraded to Org 9 (but I also started using Org's
Agenda more around the same time, I think). My versions:

- GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 
(Build 13F1911)) of 2016-09-21
- Org mode version 9.0.3 (9.0.3-elpaplus @ - 
/Users/stig/.emacs.d/elpa/org-plus-contrib-20161224/)

I can go a few days without encountering it, but then it will suddenly
hit. I have a feeling that it's triggered by refiling, or closing
TODOs towards the end of the file. My agenda file is big, but not
monstrous. (I think.) C-= reports: "Region has 2025 lines, 9592 words,
and 67513 characters." There are 333 headings, most of them
TODO/NEXT/PROJECT, and I use lots of tags. I also use a few categories
on top-level headings.

I've set the following to try to speed up agenda, but it hasn't made any
discernible difference as far as I can tell:

: (setq org-agenda-use-tag-inheritance '(todo))

I've tried to turn on debug on quit, and sent a few stack traces here in
the past but to no avail. I cannot reproduce it with =emacs -q=, but
that uses Org 8 anyway, so I would not expect it to. Nor do I have a
sure-fire way to reproduce the issue, and I am not keen on being without
my regular config for days while hoping to reproduce the hang.

I do think it's related to Emacs having run for a while, because once
the hang manifests I can just quit Emacs and restart what I was doing
and no hang will manifest (for a while). When last I managed to capture
a stack trace during one of these the stack trace started  with:

: Debugger entered--Lisp error: (quit)
:  avl-tree--do-delete(org-element--cache-compare [[[[[[nil nil
: (property-drawer (:begin 18463 :end 18529 :contents-begin 18479
: :contents-end 18519 :post-blank 1 :post-affiliated 18463 :parent nil))
: 0] [nil nil (plain-list (:type unordered :begin 18547 :end 18749
: :contents-begin 18574 :contents-end 18748 :structure ... :post-blank 1
: :post-affiliated 18574 :name "candidate-names" :parent nil)) 0]
: (paragraph (:begin 18529 :end 18547 :contents-begin 18529
: :contents-end 18546 :post-blank 1 :post-affiliated 18529 :parent nil))
: 0] [[nil nil (keyword (:key "RESULTS" :value "" :begin 18905 :end
: 18920 :post-blank 1 :post-affiliated 18905 :parent nil)) 0] [nil nil
: (paragraph (:begin 19570 :end 19586 :contents-begin 19570
: :contents-end 19585 :post-blank 1 :post-affiliated 19570 :parent nil))
: 0] (table (:begin 18920 :end 19570 :type org :tblfm nil
: :contents-begin 18920 :contents-end 19568 :value nil :post-blank 2
: :post-affiliated 18920 :parent nil)) 0] (src-block (:language "sh"
: :switches nil :parameters ":var names=candidate-names :results table"
: :begin 18749 :end 18905 :number-lines nil :preserve-indent nil
: :retain-labels t :use-labels t :label-fmt nil :value "   echo $names |
: xargs -n1 | perl  -MList::Util -e
: 'print List::Util::shuffle <>'\n" :post-blank 1 :post-affiliated
: 18749 :parent nil)) 0

Further, I do notice this stack trace is full of `:drawer-name
"LOGBOOK"' entries too, like this:

: (:begin 9624 :end 9714 :drawer-name "LOGBOOK" :contents-begin 9638
: :contents-end 9704 :post-blank 0 :post-affiliated 9624 :parent nil))
: 0] [[[[nil nil ... 0] [nil nil ... 0] ... 0] [[nil nil ... 0] [nil nil
: ... 0] ... 0] (drawer ...) 0] [[[nil nil ... 0] [nil nil ... 0] ... 0]
: [[[nil nil ... 0] nil ... -1] [[nil nil ... 0] [nil nil ... 0] ... 0]
: ... 0] (item ...) 1] (drawer (:begin 15202 :end 15582 :drawer-name
: "LOGBOOK" :contents-begin 15216 :contents-end 15572 :post-blank 0
: :post-affiliated 15202 :parent nil)) 1] (drawer (:begin 11498 :end
: 11629 :drawer-name "LOGBOOK" :contents-begin 11512 :contents-end 11619
: :post-blank 0 :post-affiliated 11498 :parent nil)) 1] (property-drawer
: (:begin 7832 :end 7900 :contents-begin 7849 :contents-end 7890
: :post-blank 0 :post-affiliated 7832 :parent nil)) 1] [[[[[[nil nil ...
: 0] [nil nil ... 0] ... 0] [[nil nil ... 0] [nil nil ... 0] ... 0]
: (src-block ...) 0] [[[nil nil ... 0] [nil nil ... 0] ... 0] [[nil nil
: ... 0] [nil nil ... 0] ... 0] (drawer ...) 0] (paragraph (:begin 19586
: :end 19669 :contents-begin 19586 :contents-end 19668 :post-blank 1
: :post-affiliated 19586 :parent nil)) 0] [[[[nil nil ... 0] [nil nil
: ... 0] ... 0] [[nil nil ... 0] [nil nil ... 0] ... 0] (drawer ...) 0]
: [[[nil nil ... 0] [nil nil ... 0] ... 0] [[nil nil ... 0] [[nil nil
: ... 0] nil ... -1] ... 1] (planning ...) 1] (drawer (:begin 25456 :end
: 25514 :drawer-name "LOGBOOK" :contents-begin 25469 :contents-end 25504
: :post-blank 1 :post-affiliated 25456 :parent nil)) 1] (planning
: (:closed nil :deadline nil :scheduled (timestamp ...) :begin 23148
: :end 23180 :post-blank 0 :post-affiliated 23148 :parent nil)) 1]

The end of the stack trace was:

: 0] nil 28373 nil nil)
:  org-element--cache-sync(#<buffer Agenda.org> 28373)
:  org-element-at-point()
:  org-eldoc-get-src-lang()
:  org-eldoc-documentation-function()
:  eldoc-print-current-symbol-info()
:  #[0 "\204.

I must admit, I haven't tried to simply "wait it out" and see if it
eventually finishes what it's doing and returning control to me.
Perhaps I'll try that next, but usually when these hangs occur it's
when I'm in the middle of doing something that I'd rather want to
finish :-(

If anybody has tips for how I can produce a better bug report, I'd be
very happy to hear them.


Stig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]