Subject: bug#79478: 31.0.50; One to two minute hangs

From: Eli Zaretskii <[email-masked]>
Date: Sat, 20 Sep 2025 18:01:22 +0300

> From: Sean Whitton <[email-masked]>
> Date: Sat, 20 Sep 2025 15:48:46 +0100
> 
> For the past week or so my pgtk, native comp Emacs has been hanging for
> a minute or so at a time, sometimes.
> 
> Usually my other Emacs instance running gdb hangs in the same way at the
> same times so I haven't been able to get a backtrace, but the gdb Emacs
> didn't so I was able to get a backtrace:
> 
>  0 in CHECK_STRING of /home/swhitton/src/emacs/primary/src/lisp.h:1596
>  1 in Fstring_equal of fns.c:351
>  2 in assoc_ignore_text_properties of buffer.c:473
>  3 in Fget_buffer of buffer.c:490
>  4 in Fget_buffer_create of buffer.c:588
>  5 in message_dolog of xdisp.c:12205
>  6 in message_log_maybe_newline of xdisp.c:12165
>  7 in Fcommand_error_default_function of keyboard.c:1088
>  8 in F68656c702d636f6d6d616e642d6572726f722d636f6e66757361626c652d73756767657374696f6e73_help_command_error_confusable_suggestions_0
>  9 in funcall_subr of eval.c:3246
> 10 in funcall_general of eval.c:3121
> 11 in Ffuncall of eval.c:3174
> 12 in cmd_error_internal of keyboard.c:1042
> 13 in cmd_error of keyboard.c:1010
> 14 in internal_condition_case of eval.c:1686
> 15 in command_loop_2 of keyboard.c:1163
> 16 in internal_catch of eval.c:1370
> 17 in command_loop of keyboard.c:1141
> 18 in recursive_edit_1 of keyboard.c:749
> 19 in Frecursive_edit of keyboard.c:832
> 20 in main of emacs.c:2629
> 
> If I let it continue a bit and then interrupt again it's similar:
> 
>  0 in __memrchr_avx2 of ../sysdeps/x86_64/multiarch/memrchr-avx2.S:89
>  1 in find_newline of search.c:910
>  2 in scan_newline of search.c:974
>  3 in message_dolog of xdisp.c:12317
>  4 in message_log_maybe_newline of xdisp.c:12165
>  5 in Fcommand_error_default_function of keyboard.c:1088
>  6 in F68656c702d636f6d6d616e642d6572726f722d636f6e66757361626c652d73756767657374696f6e73_help_command_error_confusable_suggestions_0
>  7 in funcall_subr of eval.c:3246
>  8 in funcall_general of eval.c:3121
>  9 in Ffuncall of eval.c:3174
> 10 in cmd_error_internal of keyboard.c:1042
> 11 in cmd_error of keyboard.c:1010
> 12 in internal_condition_case of eval.c:1686
> 13 in command_loop_2 of keyboard.c:1163
> 14 in internal_catch of eval.c:1370
> 15 in command_loop of keyboard.c:1141
> 16 in recursive_edit_1 of keyboard.c:749
> 17 in Frecursive_edit of keyboard.c:832
> 18 in main of emacs.c:2629
> 
> The commonality each time is a call to a very long function with name
> containing "_help_command_error_confusable_suggestions".
> 
> While this is going on Emacs shows up at 90--100 CPU% in top(1).

This is help-command-error-confusable-suggestions, in help.el.

But what is more interesting is the call to
command-error-default-function, which calls to message_dolog: it means
Emacs is logging some error message in *Messages*>  What do you see
there after these minute-long pauses end?