Subject: bug#37671: 27.0.50; Segmentation fault with --fg-daemon on Linux

From: Eli Zaretskii <[email-masked]>
Date: Thu, 10 Oct 2019 14:03:57 +0300

> From: Frank Terbeck <[email-masked]>
> Date: Wed, 09 Oct 2019 03:55:23 +0200
> 
> 
> I am  running emacs in  Linux. The base  system is an  up-to-date Debian
> sid. Right  now I am starting  emacs via systemd and  emacs' --fg-daemon
> flag. I  am mostly attaching  GUI clients  to this server  instance. The
> graphical  user interface  is a  non-reparenting window  manager (namely
> xmonad). This build uses  --with-x-toolkit=lucid --with-cairo as well as
> --with-libsystemd.
> 
> The issue is emacs  crashing, plainly. And I have not  been able to iso-
> late and  specifics that are required  for crashes to happen.  I've seen
> this sporadically with different builds of emacs from its master branch.
> To look  into it more closely,  I rebuilt emacs with  debugging symbols.
> And luckily,  I didn't have  to wait very  long. Emacs crashed  within a
> day.
> 
> I didn't  so anything spectacular either.  I think I was  just switching
> from a buffer to another. And emacs'  uptime was pretty low too. Like an
> hour or two, if I'd have to wager a guess.
> 
> Here is the stack-trace, as recorded by systemd's coredumpctl:
> 
> Stack trace of thread 1679:
> #0  0x00007f34412112a7 __pthread_kill (libpthread.so.0)
> #1  0x000055d90de0f632 deliver_process_signal (emacs-27.0.50)
> #2  0x000055d90df7be10 deliver_child_signal (emacs-27.0.50)
> #3  0x00007f3441214510 __restore_rt (libpthread.so.0)
> #4  0x00007f3440f92d2f __GI___poll (libc.so.6)
> #5  0x00007f3441e3809e n/a (libglib-2.0.so.0)
> #6  0x00007f3441e38403 g_main_loop_run (libglib-2.0.so.0)
> #7  0x00007f34420a3726 n/a (libgio-2.0.so.0)
> #8  0x00007f3441e60d0d n/a (libglib-2.0.so.0)
> #9  0x00007f3441209fb7 start_thread (libpthread.so.0)
> #10 0x00007f3440f9d2ef __clone (libc.so.6)

Thanks.

Looks like the crash was in Glib?

It is strange that you see a problem that no one else sees, and you
say you have had it for quite some time.

Can you run Emacs under GDB?  I hope it will show a better backtrace
if you do so.