unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Clemente <n142857@gmail.com>
Cc: 71176@debbugs.gnu.org
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	[thread overview]
Message-ID: <86r0dr106n.fsf@gnu.org> (raw)
In-Reply-To: <CAJKAhPCRMgEsaq7YFC3sRBqYiQeSCvWOj2o2ArEPb12REhodHQ@mail.gmail.com> (message from Daniel Clemente on Fri, 24 May 2024 17:38:11 +0000)

> From: Daniel Clemente <n142857@gmail.com>
> 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=<optimized
> out>, mouse=mouse@entry=false, base_face_id=<optimized out>, attr_filter=<optimized out>) 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.)





  reply	other threads:[~2024-05-24 19:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 17:38 bug#71176: 30.0.50; Segmentation fault (SIGSEGV) in TTY+emacsclient, default_face is nil Daniel Clemente
2024-05-24 19:26 ` Eli Zaretskii [this message]
2024-05-25 11:04   ` Daniel Clemente
2024-05-25 12:42     ` Eli Zaretskii
2024-05-25 16:22       ` Daniel Clemente
2024-05-25 17:25         ` Eli Zaretskii
2024-05-25 17:48           ` Eli Zaretskii
2024-05-25 18:07             ` Eli Zaretskii
2024-05-26 10:58               ` Daniel Clemente
2024-05-26 11:04                 ` Daniel Clemente
2024-05-26 16:44                   ` Eli Zaretskii
2024-05-27 11:04                     ` Daniel Clemente
2024-05-27 12:39                       ` Eli Zaretskii
2024-05-26 17:55                 ` Eli Zaretskii
2024-05-27 11:05                   ` Daniel Clemente

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=86r0dr106n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71176@debbugs.gnu.org \
    --cc=n142857@gmail.com \
    /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).