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#71176: 30.0.50; Segmentation fault (SIGSEGV) in TTY+emacsclient, default_face is nil Date: Fri, 24 May 2024 22:26:08 +0300 Message-ID: <86r0dr106n.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19735"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71176@debbugs.gnu.org To: Daniel Clemente Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 24 21:27:16 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 1sAaZP-0004tb-Ke for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 May 2024 21:27:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAaZ7-0007UG-2q; Fri, 24 May 2024 15:26:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAaZ5-0007Tr-6d for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 15:26:55 -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 1sAaZ4-0007io-T8 for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 15:26:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAaZB-0005rT-UI for bug-gnu-emacs@gnu.org; Fri, 24 May 2024 15:27:01 -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, 24 May 2024 19:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71176 X-GNU-PR-Package: emacs Original-Received: via spool by 71176-submit@debbugs.gnu.org id=B71176.171657878722522 (code B ref 71176); Fri, 24 May 2024 19:27:01 +0000 Original-Received: (at 71176) by debbugs.gnu.org; 24 May 2024 19:26:27 +0000 Original-Received: from localhost ([127.0.0.1]:38753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAaYd-0005rC-2u for submit@debbugs.gnu.org; Fri, 24 May 2024 15:26:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAaYa-0005r6-Dx for 71176@debbugs.gnu.org; Fri, 24 May 2024 15:26:26 -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 1sAaYN-0007Xt-TK; Fri, 24 May 2024 15:26:11 -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=JXZFBkd08P1gAuvshrrGMW7+04H63FDtrLV4DhL5C60=; b=ZxSoXinszZw3 GHmkRbKGvw/NeN5e2H09jiepKpTJl2VUl5TOhnyx/BjsSh5zciG8msJcGGN/Qq+koy4fwBNDYfvgT RFC7h1t08b6YrThI5LPScAEaIHLJk58sfoRbiaAC8Ic8wWSBEOFdT83SY6PAFwAqIFQCUljxbu/gJ OkMCE7O2BtGJuCL1JmUmOQwBWnL3OoTnFrL9+4v5XvNsqvVhGcWGAcoMfYz8EgTJ9dAZM+x5pDNHZ bQTmpwFqExqbbT57VxJJNZfI9J7r/1f0+IxNWfxk1l0zW+LsqsE6eRlaDkLGoNaFEy3wAgut4aI4i BgR+xSswjeHqiI2a259UKg==; In-Reply-To: (message from Daniel Clemente on Fri, 24 May 2024 17:38: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:285793 Archived-At: > From: Daniel Clemente > Date: Fri, 24 May 2024 17:38:11 +0000 > > Using emacsclient, with Emacs compiled without X support. I'm seeing crashes from time to time, after dozens > of hours of normal work, mainly when opening a new emacsclient frame. I didn't find how to reproduce this. > The crashes have been happening since I switched to TTY-only (weeks or months ago). I attach some gdb > output+exploration of 1 crash, and my build details. > Apparently there's a nil default_face. Which should never happen. > My ~/.emacs is large but I don't do anything weird with the 'default face, apart from (set-face-foreground > 'default "#bbb"). Note that #bbb appears in the backtrace. > I use rxvt-unicode; $TERM=rxvt-unicode-256color > > Could it be because the GC runs before tty_lookup_color has finished its job? Unlikely. > Thread 1 "emacs" received signal SIGSEGV, Segmentation fault. > face_at_buffer_position (w=0x5555747a08e0, pos=1, endptr=endptr@entry=0x7fffffff9918, limit= out>, mouse=mouse@entry=false, base_face_id=, attr_filter=) at > xfaces.c:6819 > warning: Source file is more recent than executable. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is not a good sign: you have edited your sources after the Emacs binary was produced, so some of the information in the backtrace and the GDB session might be inaccurate or even incorrect. > 6819 return default_face->id; Do you use face-remapping? Is face-remapping-alist non-nil when this happens? If so, can you show the value of Vface_remapping_alist? > Configured using: > 'configure --prefix=/opt/dc/emacs/ --without-dbus --with-tiff=no --without-tiff > --without-libsystemd --without-dbus --with-mailutils --with-native-compilation --without-modules > --with-x-toolkit=no --without-imagemagick --without-xft --without-harfbuzz --without-freetype > --without-libotf --without-xwidgets --without-xpm --without-jpeg --without-gif --without-png > --without-webp --without-rsvg --without-cairo --without-x 'CFLAGS=-g3 -O3'' I recommend against using -O3 to build Emacs: at the very least it makes debugging much harder. More importantly, with latest GCC versions it could produce invalid code (a.k.a. "GCC bugs"). The default optimization level -O2 should be more than enough. (I'm not saying this has anything to do with the segfaults.)