From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Valtteri Vuorikoski Newsgroups: gmane.emacs.bugs Subject: bug#40225: 27.0.90; abort with apparent stack explosion in lsp-mode Date: Fri, 15 May 2020 10:28:58 +0300 Message-ID: References: <87mu844jm0.fsf@notcom.org> <83mu849zjc.fsf@gnu.org> <835zer9cj9.fsf@gnu.org> <8600e733-d75a-3d8f-897d-2eb3ca6bb59d@notcom.org> <83h7y41pxb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56027"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 To: 40225@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 15 09:30:53 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZUnz-000EPD-Be for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 09:30:51 +0200 Original-Received: from localhost ([::1]:33962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZUny-0005Eu-56 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 03:30:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZUnC-0005Cd-VU for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 03:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZUnC-0001lR-Mf for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 03:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZUnC-0007tz-HZ for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 03:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Valtteri Vuorikoski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2020 07:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40225 X-GNU-PR-Package: emacs Original-Received: via spool by 40225-submit@debbugs.gnu.org id=B40225.158952774630274 (code B ref 40225); Fri, 15 May 2020 07:30:02 +0000 Original-Received: (at 40225) by debbugs.gnu.org; 15 May 2020 07:29:06 +0000 Original-Received: from localhost ([127.0.0.1]:35764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZUmI-0007sE-2D for submit@debbugs.gnu.org; Fri, 15 May 2020 03:29:06 -0400 Original-Received: from mail.netcrew.fi ([85.188.1.62]:49990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZUmF-0007rv-3k for 40225@debbugs.gnu.org; Fri, 15 May 2020 03:29:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=notcom.org; s=nc2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version: Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=e56Dzv2Ir7c7KnRo0lBLlwoOcK7Jom5Nf+/cnWnyGNc=; b=RsRq93IOnZBUqZ3cAnG/Z69YnC ti1j99ghyzNA/uC1EWu37jh4aD+i0xKu96Pr3WUVkLzWVOmn+HwRHV/d1R3mwU7shOJR+COc10I/K 23KbUX6mrioLHxVdL647EXmH1tqhZqLFLLJbCR5cjVpk08MrfeT2jwA9h0nlSXZeHGRY=; Original-Received: from dsl-hkibng31-54faf6-86.dhcp.inet.fi ([84.250.246.86] helo=[10.0.42.10]) by mail.netcrew.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jZUmE-0004ph-Gw for 40225@debbugs.gnu.org; Fri, 15 May 2020 10:29:02 +0300 In-Reply-To: <83h7y41pxb.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180299 Archived-At: On 2020-03-31 18:53, Eli Zaretskii wrote: >> (gdb) bt full 3 >> #0 0x00005568e2e5dc1b in mark_object (arg=Python Exception > '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