bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs


From: Michael Welsh Duggan
Subject: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs
Date: Mon, 29 Mar 2021 11:21:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Mon, 29 Mar 2021 18:02:24 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: mwd@md5i.com, schwab@linux-m68k.org, 47244@debbugs.gnu.org
>> 
>> Any idea where could be the Lisp code that switches from " *nntpd*" to
>> the buffer in the currently selected window?  Perhaps some
>> with-current-buffer thing somewhere?
>
> Actually, no, I don't think it can be with-current-buffer, it must be
> something else.  I wonder how we ended up being at top-level with
> current buffer being " *nntpd*" and the selected window's buffer being
> something else, which was killed?  Hmm...

I'm far from certain myself.  I have no options specifically set
regarding threads and I run Gnus from Emacs sources.  What I can say is
that every time I can remember this happening, the following is the
sequence of events:

1) Emacs has locked up.  This is presumably because:
   a) I have switched my work VPN on, and
   b) Gnus uses my existing IMAP connection to attempt to check for new
      articles due to this clause in my .gnus file:

         (gnus-demon-add-handler 'gnus-demon-scan-news 5 nil)
2) From the *Group* buffer I hit `C-g` to cancel its attempt, and `^` to
   switch to the Gnus *Sever* buffer.
3) In that buffer I go to the imap connection and type `C O`, which runs
   `gnus-server-close-server` and `gnus-server-open-server`,
   respectively.
4) I type `q` to exit the server buffer.  This is when the breakpoint
   triggers.  `g` calls the following function:

    (defun gnus-server-exit ()
      "Return to the group buffer."
      (interactive nil gnus-server-mode)
      (gnus-run-hooks 'gnus-server-exit-hook)
      (gnus-kill-buffer (current-buffer))
      (gnus-configure-windows 'group t))

`gnus-sever-exit-hook` is nil.  The definition of `gnus-kill-buffer` is
as follows:

    (defmacro gnus-kill-buffer (buffer)
      "Kill BUFFER and remove from the list of Gnus buffers."
      `(let ((buf ,buffer))
         (when (gnus-buffer-live-p buf)
           (kill-buffer buf)
           (gnus-prune-buffers))))
    
    (defun gnus-buffers ()
      "Return a list of live Gnus buffers."
      (setq gnus-buffers (seq-filter #'buffer-live-p gnus-buffers)))
    
    (defalias 'gnus-prune-buffers #'gnus-buffers)

`gnus-configure-windows` is a quite complex function that I'm not going
to attach to this email, as it is easier to look at it in-situ from the
sources (gnus-win.el).

-- 
Michael Welsh Duggan
(mwd@cert.org)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]