all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
@ 2023-01-07 12:44 Ihor Radchenko
  2023-01-07 13:42 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-01-07 12:44 UTC (permalink / raw)
  To: 60626

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>





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
  2023-01-07 12:44 bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers Ihor Radchenko
@ 2023-01-07 13:42 ` Eli Zaretskii
  2023-01-07 15:01   ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-01-07 13:42 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: 60626

> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Sat, 07 Jan 2023 12:44:47 +0000
> 
> We are recently experiencing test failures using Emacs 28, Emacs 27, and
> Emacs 26 on CI (non-interactively):

What about Emacs 29?  Or is this report only about versions 28 and
older?  In the latter case, why would it suddenly start failing, if
those versions are no longer being developed?

> 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.

Are you sure this is the right interpretation?

Anyway, is there any hope for a more self-contained recipe, which I
could try on my system without too much ado?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
  2023-01-07 13:42 ` Eli Zaretskii
@ 2023-01-07 15:01   ` Ihor Radchenko
  2023-01-09 10:21     ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-01-07 15:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 60626

Eli Zaretskii <eliz@gnu.org> writes:

>> We are recently experiencing test failures using Emacs 28, Emacs 27, and
>> Emacs 26 on CI (non-interactively):
>
> What about Emacs 29?  Or is this report only about versions 28 and
> older?  In the latter case, why would it suddenly start failing, if
> those versions are no longer being developed?

The failures are after we added `buffer-live-p' into assert form:
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?h=bugfix&id=41ebc2e40c33080a47cebb2507f038058b862655

Unfortunately, we don't have CI configuration for Emacs 29 now.

>> 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.
>
> Are you sure this is the right interpretation?

I think so. The full backtrace is

Test ob-octave/graphics-file backtrace:
  signal(ert-test-failed (((should-not (buffer-live-p (get-buffer "*Or
  ert-fail(((should-not (buffer-live-p (get-buffer "*Org-Babel Error O
  (if (not (unwind-protect (setq value-1507 (apply fn-1505 args-1506))
  (let (form-description-1509) (if (not (unwind-protect (setq value-15
  (let ((value-1507 'ert-form-evaluation-aborted-1508)) (let (form-des
  (let* ((fn-1505 #'buffer-live-p) (args-1506 (condition-case err (let
  (progn (org-mode) (let ((point (string-match "<point>" inside-text))
  (unwind-protect (progn (org-mode) (let ((point (string-match "<point
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
  (let ((inside-text (if (stringp (format "#+begin_src octave :results
  (unwind-protect (let ((inside-text (if (stringp (format "#+begin_src
  (let ((file (make-temp-file "test-ob-octave-" nil ".png"))) (unwind-
  (let ((lexical-binding t)) (if (get-buffer "*Org-Babel Error Output*
  (closure (t) nil (let ((lexical-binding t)) (if (get-buffer "*Org-Ba
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name ob-octave/graphics-file :documentatio
  ert-run-or-rerun-test(#s(ert--stats :selector "\\(org\\|ob\\|ox\\...
  ert-run-tests("\\(org\\|ob\\|ox\\)" #f(compiled-function (event-type
  ert-run-tests-batch("\\(org\\|ob\\|ox\\)")
  ert-run-tests-batch-and-exit("\\(org\\|ob\\|ox\\)")
  (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
  org-test-run-batch-tests("\\(org\\|ob\\|ox\\)")
  command-line-1(("--load" "/home/build/.emacs.d/init.el" "--eval" "(s
  command-line()
  normal-top-level()
Test ob-octave/graphics-file condition:
    (ert-test-failed
     ((should-not
       (buffer-live-p
	(get-buffer "*Org-Babel Error Output*")))
      :form
      (buffer-live-p #<killed buffer>)
      :value t))
   FAILED   164/1187  ob-octave/graphics-file (0.257630 sec)

> Anyway, is there any hope for a more self-contained recipe, which I
> could try on my system without too much ado?

Unfortunately, no. Tests are not failing for me locally, so the
container setup appears to be part of the recipe.

I was only able to reproduce locally running the container.

-- 
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>





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
  2023-01-07 15:01   ` Ihor Radchenko
@ 2023-01-09 10:21     ` Michael Heerdegen
  2023-01-11 11:08       ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2023-01-09 10:21 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Eli Zaretskii, 60626

Ihor Radchenko <yantar92@posteo.net> writes:

> >> Note that (buffer-live-p #<killed buffer>) returns non-nil, which is
> >> unexpected.
> >
> > Are you sure this is the right interpretation?
>
> I think so.

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.

Michael.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
  2023-01-09 10:21     ` Michael Heerdegen
@ 2023-01-11 11:08       ` Ihor Radchenko
  2023-01-11 12:50         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2023-01-11 11:08 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Eli Zaretskii, 60626

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> > Are you sure this is the right interpretation?
>>
>> I think so.
>
> 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.

-- 
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>





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers
  2023-01-11 11:08       ` Ihor Radchenko
@ 2023-01-11 12:50         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2023-01-11 12:50 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: michael_heerdegen, 60626-done

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: Eli Zaretskii <eliz@gnu.org>, 60626@debbugs.gnu.org
> Date: Wed, 11 Jan 2023 11:08:04 +0000
> 
> Michael Heerdegen <michael_heerdegen@web.de> 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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-11 12:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 12:44 bug#60626: 30.0.50; `buffer-live-p' sometimes returns t on killed buffers Ihor Radchenko
2023-01-07 13:42 ` Eli Zaretskii
2023-01-07 15:01   ` Ihor Radchenko
2023-01-09 10:21     ` Michael Heerdegen
2023-01-11 11:08       ` Ihor Radchenko
2023-01-11 12:50         ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.