hangs when trying to view..

51 views
Skip to first unread message

cho...@chopps.org

unread,
Mar 13, 2016, 9:40:47 AM3/13/16
to Mu Discuss, cho...@chopps.org

I'm getting a lot of hangs when trying to view various emails. I haven't
been able to track down what it is. I have a fairly aggressive (once a
minute) email update system that runs externally and uses emacsclient to
inform mu4e that it needs to update

``emacsclient -e "(mu4e-update-index)" > /dev/null``

I am suspicions that this update might be causing something to fail.

Basically I'll be using ']' to advance through a list of unread mails
and all of a sudden view the next one will just hang, I have to then hit
^G multiple times (like 3-6 times) and finally the headers view
disappears and is replaced with the view of the mail.

Any idea what might be going on here?

I also wonder about the HTML setup. It seems to happen more when I have
this enabled:

mu4e-html2text-command 'mu4e-shr2text
shr-color-visible-luminance-min 80
mu4e-view-html-plaintext-ratio-heuristic 15

Thanks,
Chris.
signature.asc

Dirk-Jan C. Binnema

unread,
Mar 13, 2016, 11:37:44 AM3/13/16
to mu-di...@googlegroups.com, cho...@chopps.org
Hi Chris,

On Sunday Mar 13 2016, cho...@chopps.org wrote:

> I'm getting a lot of hangs when trying to view various emails. I haven't
> been able to track down what it is. I have a fairly aggressive (once a
> minute) email update system that runs externally and uses emacsclient to
> inform mu4e that it needs to update
>
> ``emacsclient -e "(mu4e-update-index)" > /dev/null``
>
> I am suspicions that this update might be causing something to fail.

Perhaps... why do you do it that way? You could just let mu4e handle the
update automatically ever n minutes.


> Basically I'll be using ']' to advance through a list of unread mails
> and all of a sudden view the next one will just hang, I have to then hit
> ^G multiple times (like 3-6 times) and finally the headers view
> disappears and is replaced with the view of the mail.
>
> Any idea what might be going on here?

You could use M-x toggle-debug-on-quit to see what it's doing.

Emacs & the mu server instance can do only one thing at a time. So, when
you're indexing, it can't open a message for you, and have to wait for
that to finish - this you may perceive as the hanging.

Apart from reducing the frequency, it might help to reduce the time
indexing takes, ie. using '.noupdate'. See the mu-index mangpage for
details.

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

cho...@chopps.org

unread,
Mar 18, 2016, 7:34:22 PM3/18/16
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com

Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:

> Hi Chris,
>
> On Sunday Mar 13 2016, cho...@chopps.org wrote:
>
>> I'm getting a lot of hangs when trying to view various emails. I haven't
>> been able to track down what it is. I have a fairly aggressive (once a
>> minute) email update system that runs externally and uses emacsclient to
>> inform mu4e that it needs to update
>>
>> ``emacsclient -e "(mu4e-update-index)" > /dev/null``
>>
>> I am suspicions that this update might be causing something to fail.
>
> Perhaps... why do you do it that way? You could just let mu4e handle the
> update automatically ever n minutes.

The update takes a while (a minute or more sometimes), so I don't want
mu4e hung for that time.

In any case I disabled my update and verified I'm still seeing the
hangs, so it must be something else.

>> Basically I'll be using ']' to advance through a list of unread mails
>> and all of a sudden view the next one will just hang, I have to then hit
>> ^G multiple times (like 3-6 times) and finally the headers view
>> disappears and is replaced with the view of the mail.
>>
>> Any idea what might be going on here?
>
> You could use M-x toggle-debug-on-quit to see what it's doing.

Yeah, very frustratingly it doesn't drop into the debugger after the
4-6th C-g when it finally displays the message.

One point of interest is sometimes the C-g will have the message replace
the smaller headers view, and in the larger window I will see "Getting
the message..." (or whatever that text is I don't have the text handy
right now). This doesn't happen everytime though, sometimes the message
shows up where it should (the bottom larger window) leaving the headers
view intact.

> Emacs & the mu server instance can do only one thing at a time. So, when
> you're indexing, it can't open a message for you, and have to wait for
> that to finish - this you may perceive as the hanging.

Understood, but in my case hang means ~ever (well as long as I was
willing to wait which was many minutes, much longer than an index update
takes).

> Apart from reducing the frequency, it might help to reduce the time
> indexing takes, ie. using '.noupdate'. See the mu-index mangpage for
> details.

I might do this anyway, but I don't think it's the problem.

Thanks,
Chris.

P.S. my original message used the wrong address for signing.. something
else I need to debug :)

>
> Kind regards,
> Dirk.

signature.asc

cho...@chopps.org

unread,
Mar 18, 2016, 8:47:26 PM3/18/16
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com

BTW, I'm running emacs 24.5, and mu 0.9.16 (built using aur/mu)

Thanks,
Chris.
signature.asc

cho...@chopps.org

unread,
Mar 18, 2016, 9:18:09 PM3/18/16
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com

Found it!

I did a lot of disabling and selective re-enabling to narrow it down to
a setting within my mu4-headers-mode-hook. I removed them all and then
one by one enabled them until I found a single setting that caused
the hangs.

;; XXX causes hangs
(add-hook 'mu4e-headers-mode-hook
(lambda () (progn (setq scroll-up-aggressively .8))))

I have no idea why this would cause hangs. The settings I actually
wanted to set were:

(add-hook 'mu4e-headers-mode-hook
(lambda () (progn
(make-local-variable 'scroll-conservatively)
(setq
show-trailing-whitespace nil
scroll-conservatively 0
;; scroll-up-aggressively .8
;; scroll-down-aggressively .8)
))))

The intention was to always be able to see a message summaries at the
top and bottom of the headers window as I advanced either up or down
reading messages.

Thanks,
Chris.
signature.asc

Dirk-Jan C. Binnema

unread,
Mar 19, 2016, 4:54:08 AM3/19/16
to cho...@chopps.org, mu-di...@googlegroups.com
Hi Chris,

On Saturday Mar 19 2016, cho...@chopps.org wrote:

> Found it!
>
> I did a lot of disabling and selective re-enabling to narrow it down to
> a setting within my mu4-headers-mode-hook. I removed them all and then
> one by one enabled them until I found a single setting that caused
> the hangs.
>
> ;; XXX causes hangs
> (add-hook 'mu4e-headers-mode-hook
> (lambda () (progn (setq scroll-up-aggressively .8))))
>
> I have no idea why this would cause hangs. The settings I actually
> wanted to set were:
>
> (add-hook 'mu4e-headers-mode-hook
> (lambda () (progn
> (make-local-variable 'scroll-conservatively)
> (setq
> show-trailing-whitespace nil
> scroll-conservatively 0
> ;; scroll-up-aggressively .8
> ;; scroll-down-aggressively .8)
> ))))
>
> The intention was to always be able to see a message summaries at the
> top and bottom of the headers window as I advanced either up or down
> reading messages.

Oh, great you found it!

Still, it's weird you got those hangs... I tried the hook and I can't
seem to reproduce any of that (with the emacsclient part at least).

Re-indexing your mail shouldn't take a minute -- here's its less than a
second for 71K messages.

cho...@chopps.org

unread,
Mar 19, 2016, 3:59:14 PM3/19/16
to Dirk-Jan C. Binnema, mu-di...@googlegroups.com

Dirk-Jan C. Binnema <dj...@djcbsoftware.nl> writes:

> Hi Chris,
>
> On Saturday Mar 19 2016, cho...@chopps.org wrote:
>
>> Found it!
>>
>> I did a lot of disabling and selective re-enabling to narrow it down to
>> a setting within my mu4-headers-mode-hook. I removed them all and then
>> one by one enabled them until I found a single setting that caused
>> the hangs.
>>
>> ;; XXX causes hangs
>> (add-hook 'mu4e-headers-mode-hook
>> (lambda () (progn (setq scroll-up-aggressively .8))))
>
> Oh, great you found it!
>
> Still, it's weird you got those hangs... I tried the hook and I can't
> seem to reproduce any of that (with the emacsclient part at least).

I like to line up quite a good number of unread emails and hit ']'
really quickly it can take up to 10 or more to hang for me.

I run in "evil" mode, I also am running the emacs directly (with server
started, but not daemon mode), not sure if that might affect things.

> Re-indexing your mail shouldn't take a minute -- here's its less than a
> second for 71K messages.

Re-indexing is fast (a second or so), but offlineimap to fetch new mails
is not. So I run a script (using systemd user unit file) which runs
offlineimap every 60 seconds and calls into emacs to reindex with
emacsclient iff new mail has arrived. It also posts some notifications
for newly received inbox mail.

This is all works, so it was a red-herring for my problem.

Thanks,
Chris.

>
> Kind regards,
> Dirk.

signature.asc
Reply all
Reply to author
Forward
0 new messages