From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71224: 30.0.50; SIGSEGV in start_display Date: Fri, 07 Jun 2024 22:46:35 +0300 Message-ID: <86wmn0edt0.fsf@gnu.org> References: <86o78rv499.fsf@gnu.org> <86msoaszgj.fsf@gnu.org> <86jzjdu7iq.fsf@gnu.org> <86cyp5u4o5.fsf@gnu.org> <86mso8shj2.fsf@gnu.org> <86jzjbqzcm.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29583"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71224@debbugs.gnu.org To: Daniel Clemente Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 08 01:23:20 2024 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 1sFivX-0007R7-0A for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jun 2024 01:23:19 +0200 Original-Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFfqP-0001zT-Ld; Fri, 07 Jun 2024 16:05:49 -0400 Original-Received: from [2001:470:142:3::10] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFfqN-0001z6-W3 for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 16:05:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFfqN-0002cF-Oq for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 16:05:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFfqc-0002jG-J8 for bug-gnu-emacs@gnu.org; Fri, 07 Jun 2024 16:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Jun 2024 20:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71224 X-GNU-PR-Package: emacs Original-Received: via spool by 71224-submit@debbugs.gnu.org id=B71224.171779071010353 (code B ref 71224); Fri, 07 Jun 2024 20:06:02 +0000 Original-Received: (at 71224) by debbugs.gnu.org; 7 Jun 2024 20:05:10 +0000 Original-Received: from localhost ([127.0.0.1]:57739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFfpk-0002gl-Kr for submit@debbugs.gnu.org; Fri, 07 Jun 2024 16:05:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFfpi-0002fo-L0 for 71224@debbugs.gnu.org; Fri, 07 Jun 2024 16:05:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFfXv-0007be-KL; Fri, 07 Jun 2024 15:46:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=PFlWBN9KpCBqCJnycmzxcP6+qRm/YowbogSMXfV73Xs=; b=VZ8qNMm4xcr4 rvG+Z8c9OTphaTQD16hy8dtDPdDu8vzcH+Wkm11npljx7qFWusuBVw5xChk83Kd2ng0c5ei9T+K+t HOKCXuvK8LVqAUKovumQqh6sFSjkGD7C1HqAoWeUG2H4H2FddUXiYPbP4tn9YoOtAIeaO9FJpkP6k Y4LhS8nbIYlZ2WpSNO5EmHg66LReG5B7aq48X0ibJOPOUXLs2HrOMMroXWcX01VVLTDUEXmjqirq3 WFOugJu+p8gFqB7fQA7aMvCjc9YcWsB0/n7brCR6XLVoORhSkG+/TXKBOIndzwMKJGK6osGG5dSDq 8Y30jObdhUwmiBxtzhCNDg==; In-Reply-To: (message from Daniel Clemente on Fri, 7 Jun 2024 16:08:11 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286786 Archived-At: > From: Daniel Clemente > Date: Fri, 7 Jun 2024 16:08:11 +0000 > Cc: 71224@debbugs.gnu.org > > Sorry for the long wait, I was focused on other bugs. > This one is about the null glyph matrices. > It still happens after the fixes in 71223 that improve fast > opening+closing. I'm using 7d36bb0547f, fairly recent. > > After a few hours of debugging and learning. I found a very simple > formula to produce the SIGSEGV. No GC involved, and no automated > window opening/resizing. > To reproduce it: > > emacs --fg-daemon -Q > emacsclient -c > > Open a buffer with this code in it: > (defun recurse () (recurse)) > (recurse) > > And eval the defun. Don't call (recurse) yet. > > Do: M-x debug > This opens the backtrace window. > Use C-x o to go away from the backtrace window and back to that > buffer with the Lisp code. > Now eval (with C-x C-e) the call to (recurse) > You get a message in the minibuffer: cl-prin1, excessive-lisp-nesting, > and the backtrace window is updated. > Don't close that backtrace window. > > Open a new frame, as before: emacsclient -c > The daemon crashes with SIGSEGV. > > > Program received signal SIGSEGV, Segmentation fault. > 0x00005555555d7833 in redisplay_window (window=XIL(0x55555631d5e5), > just_this_one_p=false) at xdisp.c:19961 > 19961 *w->desired_matrix->method = 0; > (gdb) bt > #0 0x00005555555d7833 in redisplay_window > (window=XIL(0x55555631d5e5), just_this_one_p=false) > at xdisp.c:19961 > #1 0x00005555555d0a95 in redisplay_window_0 > (window=XIL(0x55555631d5e5)) at xdisp.c:18016 > #2 0x000055555576c9e2 in internal_condition_case_1 > (bfun=0x5555555d0a53 , > arg=XIL(0x55555631d5e5), handlers=XIL(0x7ffff1e5506b), > hfun=0x5555555d0931 ) > at eval.c:1637 > #3 0x00005555555d0907 in redisplay_windows > (window=XIL(0x55555631d5e5)) at xdisp.c:17985 > #4 0x00005555555cf486 in redisplay_internal () at xdisp.c:17384 > #5 0x00005555555cffcc in redisplay_preserve_echo_area (from_where=2) > at xdisp.c:17743 > #6 0x00005555555950e6 in Fredisplay (force=XIL(0)) at dispnew.c:6368 Thanks, I could reproduce this and installed a fix. The result of the fix is that the daemon doesn't crash; the last client gets an error message and exits, but the terminal from which the last client connection was attempted is left in messed up state. The user will then need to reset the terminal somehow, e.g. with "tput reset" or somesuch.