Subject: bug#60626: closed (Re: bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 11 Jan 2023 12:51:02 +0000

Your bug report

#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60626: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60626
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
From: Eli Zaretskii <[email-masked]>
To: Ihor Radchenko <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Wed, 11 Jan 2023 14:50:40 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Ihor Radchenko <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> Date: Wed, 11 Jan 2023 11:08:04 +0000
> 
> Michael Heerdegen <[email-masked]> writes:
> 
> > Couldn't it be that the buffer had been live when the form had been
> > evaluated, but killed when the form had been printed (later)?  The
> > information you posted does not necessarily imply that `buffer-live-p'
> > ever returned t when called with a killed buffer.
> 
> This is likely true.
> 
> The test looks like
> 
> (unwind-protect
>         (org-test-with-temp-text
> 	    (format "#+begin_src octave :results file graphics :file %s
> sombrero;
> #+end_src"
> 		    file)
>           (org-babel-execute-src-block)
>           (should (search-forward (format "[[file:%s]]" file) nil nil))
>           (should (file-readable-p file))
>           (should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"))))
>       ;; clean-up
>       (delete-file file)
>       (when (get-buffer "*Org-Babel Error Output*")
>         (kill-buffer "*Org-Babel Error Output*")))
> 
> So, unwind fallback forms are likely executed.
> 
> Thanks for the pointer!
> 
> I think this bug report can then be closed.

Thanks, closing.

Subject: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
From: Ihor Radchenko <[email-masked]>
To: [email-masked]
Date: Sat, 07 Jan 2023 12:44:47 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

We are recently experiencing test failures using Emacs 28, Emacs 27, and
Emacs 26 on CI (non-interactively):

https://builds.sr.ht/~bzg/job/918602

2 unexpected results:
   FAILED  ob-octave/graphics-file  ((should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"))) :form (buffer-live-p #<killed buffer>) :value t)
   FAILED  ob-octave/graphics-file-space  ((should-not (buffer-live-p (get-buffer "*Org-Babel Error Output*"))) :form (buffer-live-p #<killed buffer>) :value t)

Note that (buffer-live-p #<killed buffer>) returns non-nil, which is
unexpected.

I am also able to reproduce locally using rake + podman:

See https://git.sr.ht/~bzg/org-mode-tests/:

1. cd /path/to/org-mode-tests
2. ln -s /path/to/org ./org-mode
3. cd local
4. rake test:debian:emacs28 

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>