unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Valtteri Vuorikoski <vuori@notcom.org>
To: 40225@debbugs.gnu.org
Subject: bug#40225: 27.0.90; abort with apparent stack explosion in lsp-mode
Date: Fri, 15 May 2020 10:28:58 +0300	[thread overview]
Message-ID: <f09358d0-a852-3d2e-5178-c3d4be7f9dd5@notcom.org> (raw)
In-Reply-To: <83h7y41pxb.fsf@gnu.org>

On 2020-03-31 18:53, Eli Zaretskii wrote:
>> (gdb) bt full 3
>> #0  0x00005568e2e5dc1b in mark_object (arg=Python Exception <class
>> 'gdb.MemoryError'> Cannot access memory at address 0x7ffde9c2fff8:
>> #1  0x00005568e2e5df9c in mark_object (arg=0x5568e6c1f003) at alloc.c:6629
>>           ptr = 0x5568e6c1f000
>>           obj = 0x5568e6c1f043
>>           po = 0x5568e6c1f000
>>           cdr_count = 0
> 
> This does look like stack overflow.  Can you enlarge the stack size of
> your Emacs and see if that helps?
> 

After fiddling with my init.el, the crash seems to have gone away even 
with stack limit set to 8MB. I can't state the culprit with full 
certainty, but with ~75% probability it was a function 
(tab-line-tabs-buffer-list-function) which was getting called on every 
mouse event.

Since this function was getting called a huge number of times, I 
memoized some parts of it with the memoize.el library. It generates a 
closure like this: 
https://github.com/skeeto/emacs-memoize/blob/master/memoize.el#L99

If a timeout is set, every time the lambda is called, the cleanup timer 
is reset. Crashes stopped after I removed the timeout from my memoized 
function. There were a few other tweaks and package updates around the 
same time, but as far as I can tell this was the only high-traffic 
function that changed.

  -Valtteri





  parent reply	other threads:[~2020-05-15  7:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 14:03 bug#40225: 27.0.90; abort with apparent stack explosion in lsp-mode Valtteri Vuorikoski
2020-03-25 16:20 ` Eli Zaretskii
2020-03-25 16:25   ` Valtteri Vuorikoski
2020-03-25 16:29     ` Eli Zaretskii
2020-03-26 15:42   ` Valtteri Vuorikoski
2020-03-26 18:49     ` Eli Zaretskii
2020-03-31 13:59       ` Valtteri Vuorikoski
2020-03-31 15:53         ` Eli Zaretskii
2020-03-31 18:39           ` Valtteri Vuorikoski
2020-04-12 10:40           ` Valtteri Vuorikoski
2020-05-15  7:28           ` Valtteri Vuorikoski [this message]
2022-02-10  7:21             ` Lars Ingebrigtsen
2022-02-10  9:09               ` Valtteri Vuorikoski
2022-02-10 11:36                 ` Lars Ingebrigtsen
2022-02-10 18:50                 ` Juri Linkov
2022-02-10 19:49                   ` Valtteri Vuorikoski
2022-02-11  8:34                     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f09358d0-a852-3d2e-5178-c3d4be7f9dd5@notcom.org \
    --to=vuori@notcom.org \
    --cc=40225@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).