Subject: Re: bug#66127: 28.2; emacs crash after single C-g

From: Eli Zaretskii <[email-masked]>
Date: Thu, 21 Sep 2023 07:41:22 +0300

> From: [email-masked]
> Date: Wed, 20 Sep 2023 21:59:45 +0200
> 
> 
> Sorry I do not have a minimal test case.
> 
> Since a long time ago, single C-g crashes emacs for me so when there is
> something long running blocking emacs, it is not possible to reliably
> interrupt it.
> 
> I observe this behaviour often when using the notmuch email client and
> trying to display a long thread.  When notmuch block emacs for ages and
> I press single C-g, sometimes I get the following crash:
> 
> Fatal error 11: Segmentation fault
> Backtrace:
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5251c8]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x41f4e6]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x41f9e8]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x523398]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x52341c]
> /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libc.so.6(+0x38d60)[0x7f6e33852d60]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5efcba]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5eff11]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5894c3]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-d1746297/preloaded/jit-lock-8a988e43-703cd7fb.eln(F6a69742d6c6f636b2d666f6e746966792d6e6f77_jit_lock_fontify_now_0+0x2d2)[0x7f6e316b0172]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5894c3]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/../lib/emacs/28.2/native-lisp/28.2-d1746297/preloaded/jit-lock-8a988e43-703cd7fb.eln(F6a69742d6c6f636b2d66756e6374696f6e_jit_lock_function_0+0x232)[0x7f6e316afaf2]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5894c3]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x588981]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x43e5f4]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x44d95c]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x44daf8]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x452fd6]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x458788]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x4566b5]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x458ae0]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x45ac77]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x455876]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x47c514]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x4814ab]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x58865c]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x441149]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x441105]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x46b751]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x46d705]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x4289ee]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5894c3]
> /nix/store/bvkjcb6pzd3d51q9j7yhf3bhljxlvb95-emacs-packages-deps/share/emacs/native-lisp/28.2-d1746297/notmuch-show-482175f2-4dd38a29.eln(F6e6f746d7563682d73686f772d636f6d6d616e642d686f6f6b_notmuch_show_command_hook_0+0x71)[0x7f6e2f742971]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5894c3]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5895f8]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x588981]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x50a9c1]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x588c6d]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x50e318]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x51b00b]
> /nix/store/5vx99s8cjzv8hcirly8g06alhjz0zaba-emacs-28.2/bin/emacs[0x5885cf]
> ...
> Segmentation fault (core dumped)
> 
> Does this help?

Only a little.  Those addresses in the backtrace can only be
interpreted on your system.  The node "Crashing" in the Emacs user
manual explains how to convert them to human-readable list of files,
functions, and line numbers, so please do that and post the results.
For even better results, run Emacs under GDB, and when it crashes,
type at the GDB prompt:

  (gdb) thread apply all bt

and post the results.

All of the above assumes your Emacs was not stripped of debug info; if
it was, there's no way of getting symbolic backtraces, and I would
recommend to download the symbols or rebuild Emacs without stripping,
before doing any of the above.

> In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
> System Description: NixOS 23.05 (Stoat)

Any chance you could try Emacs 29.1 or the HEAD of the current
emacs-29 branch of the Emacs Git repository?  We will not be making
any more releases from the Emacs 28 branch, and it is possible that
the bug you are experiencing was already solved.

Thanks.