Subject: Re: bug#43882: 27.1; Gnus sometimes crashes emacs 27.1 during nnir search

From: Mikael Svahnberg <[email-masked]>
Date: Mon, 12 Oct 2020 09:12:56 +0200

Robert Pluim <2020-10-09 16:43> wrote:
>>>>>> On Fri, 09 Oct 2020 12:14:18 +0200, Mikael Svahnberg <[email-masked]> said:
>
>     Mikael> I upgraded to emacs 27.1 yesterday and so far it has crashed twice on me
>     Mikael> when I search for emails in Gnus. I use the following function to
>     Mikael> perform the search (there are probably better ways, but this has worked
>     Mikael> for me the past eight years):
>
>     Mikael> --------------------
>     Mikael>       ;; Search mail from everywhere
>     Mikael>       (defun msv-search-mail ()
>     Mikael>         (interactive)
>     Mikael>         (with-current-buffer "*Group*"
>     Mikael>           (save-excursion
>     Mikael>             (beginning-of-buffer)
>     Mikael>             (search-forward "All Mail")
>     Mikael>             (call-interactively (gnus-group-make-nnir-group nil)))))
>
>     Mikael>       ;; <2017-08-15 Tue>
>     Mikael>       ;; Try a better search input
>     Mikael>       (use-package gnus-x-gm-raw :ensure t)
>     Mikael> --------------------
>
>     Mikael> What happens is that emacs freezes and (I happened to have =top=
>     Mikael> running in a terminal nearby) consumes 100% CPU for 5-10 seconds, before
>     Mikael> crashing.
>
>     Mikael> I have done more mail searches, and it does not crash every time I
>     Mikael> search. The first thing I do after restarting is to perform the exact
>     Mikael> same search, which has worked. Intermittent bugs, yay!
>
> Do things improve if you increase your stack size using 'ulimit -s'?
> MacOS has what is by modern standards a fairly small default stack.
>
> There are a couple of regexp-related fixes in master as well. Could
> you try that branch?
>
> Robert

Hi,

The stack size was the default 8192 kB. I have -- reluctantly, but in
the interest of debugging -- set it to 65532 kB via ulimit and then
launched emacs from that shell.

How can I verify from within Emacs what stack size it is running with?

I will keep it like this for a couple of days and see if I get more
crashes. If I do, I will report and move on and upgrade to HEAD.

/Mikael