GNU bug report logs - #75357
[scratch/elisp-benchmarks] elb-scroll window size assumption breaks on repeated runs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Pip Cet <pipcet@HIDDEN>; dated Sat, 4 Jan 2025 16:37:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 75357 <at> debbugs.gnu.org:


Received: (at 75357) by debbugs.gnu.org; 6 Jan 2025 14:24:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 06 09:24:28 2025
Received: from localhost ([127.0.0.1]:37430 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUo1s-0006wN-Eg
	for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 09:24:28 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:55575)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tUo1q-0006w4-7n
 for 75357 <at> debbugs.gnu.org; Mon, 06 Jan 2025 09:24:27 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 858FA801C2;
 Mon,  6 Jan 2025 09:24:20 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1736173455;
 bh=U9UVetMpaJ9ONGdC+jsS+Usg950HGIxfxS/BBcbUux4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=AJaPzPWcTOn3qSFak9O3yZK+8JtxWe/jvVip6AeHtRhLAQwDSKw6PNLAzfSyoXWEH
 uchZAauI9FbP/dd3dBLE0ikdrWQ50W06m4/F4cdsbQUW7x7sen36vrayvnbZn+RTgU
 b/ip1f2kGaQuKls72aPifGjeYLMTd4BKHW1CbN2xFNYkP7xOZOYeuh1D2sCurAc/z7
 cArk2VBVJ71lwo7gEzYpDCgWujdlsvH7r/VCvO7wkhxrRRLvMcbnO/Rl35214oCv/w
 TehkYX0qZPKf4xrvh0HnO//qn9Ech9pTTje3G0MUgOwHrHOVHnfdIG+69Xm60pa5oA
 NySH4sC/P5kVQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87B6A801CC;
 Mon,  6 Jan 2025 09:24:15 -0500 (EST)
Received: from pastel (69-165-162-104.dsl.teksavvy.com [69.165.162.104])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5951A12049E;
 Mon,  6 Jan 2025 09:24:15 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
Subject: Re: bug#75357: [scratch/elisp-benchmarks] elb-scroll window size
 assumption breaks on repeated runs
In-Reply-To: <yp1r05g5log.fsf@HIDDEN> (Andrea Corallo's message of
 "Mon, 06 Jan 2025 04:35:59 -0500")
Message-ID: <jwvikqsowma.fsf-monnier+emacs@HIDDEN>
References: <87h66efsfx.fsf@HIDDEN> <yp1r05g5log.fsf@HIDDEN>
Date: Mon, 06 Jan 2025 09:24:13 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75357
Cc: "Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs@HIDDEN>, 75357 <at> debbugs.gnu.org,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> On scratch/elisp-benchmarks, the following emacs -Q invocation:
>>
>> ./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(progn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1))'
>>
>> produces a fatal Lisp error, attempting to invoke the debugger in a
>> non-interactive session:
>>
>> Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-smie...
>> Window size: 19 x 80
>> Debugger entered--Lisp error: (error "Window size not as stipulated by the benchmark")
>>   signal(error ("Window size not as stipulated by the benchmark"))
>>   error("Window size not as stipulated by the benchmark")
>>   elb-scroll-entry()
>
> I'm not sure this is a bug as we want always to run the benchmark from a
> known state, anyway adding Stefan as he's the author of the benchmark.

Sounds like something has changed in Emacs's C code, or maybe it's
something in some system-depend code?
`elb-scroll` cares about the window size because it's a benchmark that
is influenced by (and thus partly measures) the redisplay:

    (unless (and noninteractive (not (boundp 'redisplay-skip-initial-frame)))
      (defun elb-scroll-entry ()
        ;; FIXME: This relies on `elb-smie.el' being compiled already which is
        ;; not necessarily the case if we're only running some of the benchmarks.
        (load (expand-file-name "elb-smie" elb-bench-directory) nil 'nomessage)
        (setq redisplay-skip-initial-frame nil)
        (with-temp-buffer
          (rename-buffer (generate-new-buffer-name "elb-scroll"))
          (switch-to-buffer (current-buffer))
          (insert-file-contents (expand-file-name
                                 "../resources/xmenu.c" elb-bench-directory))
          (redisplay 'force) ;; Refresh the window dimensions.
          (enlarge-window (- 23 (window-height)))
          (enlarge-window (- 80 (window-width)) 'horiz)
          (redisplay 'force) ;; Refresh the window dimensions.
          (unless (and (equal 23 (window-height))
                       (equal 80 (window-width)))
            (error "Window size %S x %S not as stipulated by the benchmark"
                    (window-height) (window-width)))
          (dotimes (_ 10)
            (elb-smie-mode)
            (goto-char (point-min))
            (condition-case nil
                (while t (scroll-up nil) (redisplay 'force))
              (end-of-buffer nil))))))

Try and figure out why window size is 19x80 after

          (enlarge-window (- 23 (window-height)))
          (enlarge-window (- 80 (window-width)) 'horiz)

- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75357; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 14:24:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 06 09:24:36 2025
Received: from localhost ([127.0.0.1]:37434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUo1z-0006wl-TR
	for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 09:24:36 -0500
Received: from lists.gnu.org ([2001:470:142::17]:38902)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tUo1y-0006wJ-EV
 for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 09:24:35 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monnier@HIDDEN>)
 id 1tUo1p-00076S-3O
 for bug-gnu-emacs@HIDDEN; Mon, 06 Jan 2025 09:24:25 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <monnier@HIDDEN>)
 id 1tUo1n-0001AN-7O; Mon, 06 Jan 2025 09:24:24 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 858FA801C2;
 Mon,  6 Jan 2025 09:24:20 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1736173455;
 bh=U9UVetMpaJ9ONGdC+jsS+Usg950HGIxfxS/BBcbUux4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=AJaPzPWcTOn3qSFak9O3yZK+8JtxWe/jvVip6AeHtRhLAQwDSKw6PNLAzfSyoXWEH
 uchZAauI9FbP/dd3dBLE0ikdrWQ50W06m4/F4cdsbQUW7x7sen36vrayvnbZn+RTgU
 b/ip1f2kGaQuKls72aPifGjeYLMTd4BKHW1CbN2xFNYkP7xOZOYeuh1D2sCurAc/z7
 cArk2VBVJ71lwo7gEzYpDCgWujdlsvH7r/VCvO7wkhxrRRLvMcbnO/Rl35214oCv/w
 TehkYX0qZPKf4xrvh0HnO//qn9Ech9pTTje3G0MUgOwHrHOVHnfdIG+69Xm60pa5oA
 NySH4sC/P5kVQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87B6A801CC;
 Mon,  6 Jan 2025 09:24:15 -0500 (EST)
Received: from pastel (69-165-162-104.dsl.teksavvy.com [69.165.162.104])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5951A12049E;
 Mon,  6 Jan 2025 09:24:15 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Andrea Corallo <acorallo@HIDDEN>
Subject: Re: bug#75357: [scratch/elisp-benchmarks] elb-scroll window size
 assumption breaks on repeated runs
In-Reply-To: <yp1r05g5log.fsf@HIDDEN> (Andrea Corallo's message of
 "Mon, 06 Jan 2025 04:35:59 -0500")
Message-ID: <jwvikqsowma.fsf-monnier+emacs@HIDDEN>
References: <87h66efsfx.fsf@HIDDEN> <yp1r05g5log.fsf@HIDDEN>
Date: Mon, 06 Jan 2025 09:24:13 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
Received-SPF: pass client-ip=132.204.25.50;
 envelope-from=monnier@HIDDEN; helo=mailscanner.iro.umontreal.ca
X-Spam_score_int: -42
X-Spam_score: -4.3
X-Spam_bar: ----
X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: "Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs@HIDDEN>, 75357 <at> debbugs.gnu.org,
 Pip Cet <pipcet@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> On scratch/elisp-benchmarks, the following emacs -Q invocation:
>>
>> ./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(progn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1))'
>>
>> produces a fatal Lisp error, attempting to invoke the debugger in a
>> non-interactive session:
>>
>> Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-smie...
>> Window size: 19 x 80
>> Debugger entered--Lisp error: (error "Window size not as stipulated by the benchmark")
>>   signal(error ("Window size not as stipulated by the benchmark"))
>>   error("Window size not as stipulated by the benchmark")
>>   elb-scroll-entry()
>
> I'm not sure this is a bug as we want always to run the benchmark from a
> known state, anyway adding Stefan as he's the author of the benchmark.

Sounds like something has changed in Emacs's C code, or maybe it's
something in some system-depend code?
`elb-scroll` cares about the window size because it's a benchmark that
is influenced by (and thus partly measures) the redisplay:

    (unless (and noninteractive (not (boundp 'redisplay-skip-initial-frame)))
      (defun elb-scroll-entry ()
        ;; FIXME: This relies on `elb-smie.el' being compiled already which is
        ;; not necessarily the case if we're only running some of the benchmarks.
        (load (expand-file-name "elb-smie" elb-bench-directory) nil 'nomessage)
        (setq redisplay-skip-initial-frame nil)
        (with-temp-buffer
          (rename-buffer (generate-new-buffer-name "elb-scroll"))
          (switch-to-buffer (current-buffer))
          (insert-file-contents (expand-file-name
                                 "../resources/xmenu.c" elb-bench-directory))
          (redisplay 'force) ;; Refresh the window dimensions.
          (enlarge-window (- 23 (window-height)))
          (enlarge-window (- 80 (window-width)) 'horiz)
          (redisplay 'force) ;; Refresh the window dimensions.
          (unless (and (equal 23 (window-height))
                       (equal 80 (window-width)))
            (error "Window size %S x %S not as stipulated by the benchmark"
                    (window-height) (window-width)))
          (dotimes (_ 10)
            (elb-smie-mode)
            (goto-char (point-min))
            (condition-case nil
                (while t (scroll-up nil) (redisplay 'force))
              (end-of-buffer nil))))))

Try and figure out why window size is 19x80 after

          (enlarge-window (- 23 (window-height)))
          (enlarge-window (- 80 (window-width)) 'horiz)

- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75357; Package emacs. Full text available.

Message received at 75357 <at> debbugs.gnu.org:


Received: (at 75357) by debbugs.gnu.org; 6 Jan 2025 09:36:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 06 04:36:15 2025
Received: from localhost ([127.0.0.1]:36698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUjWw-0000ez-SQ
	for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 04:36:15 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:38428)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acorallo@HIDDEN>) id 1tUjWu-0000em-Qa
 for 75357 <at> debbugs.gnu.org; Mon, 06 Jan 2025 04:36:13 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <acorallo@HIDDEN>)
 id 1tUjWn-0001Ds-6c; Mon, 06 Jan 2025 04:36:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=IyiTmS8PONBGuDxtFWayBomepEJgd0nRoO6pdI+TXgk=; b=C1wMoOnQw/NcHPEB8Qeb
 t3qIXyl0DtMN1aN3MccgnPweLcLbVDxN6Wr8nkmcWtPdsqw+QfCp1QJMdtDvhhUKyc4vNX96i/m7W
 CF952diOrgYYbK0f/Q6BUKS+9xEgcwoDMElcLCIO4+YAlE/h6bF4eKRbVBjrRMtGwigbkTX1+ZJh5
 k8x3GYtmVtPcuI80fxuNdUcTY8ye8rAuIiYgBnJh7behNhWu1AgXL3NtHzrkvUEgGrj/6x7c4dA4m
 6R4FGCarR27l1K1iXImAC7+Y1u8G7fxvOFAjq/LFHIKG+ZUPR5hQOzfepkpbRliRpNL7bdsQsdppf
 mA04iY4ApOldlA==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1tUjWh-00069T-KU; Mon, 06 Jan 2025 04:36:01 -0500
From: Andrea Corallo <acorallo@HIDDEN>
To: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#75357: [scratch/elisp-benchmarks] elb-scroll window size
 assumption breaks on repeated runs
In-Reply-To: <87h66efsfx.fsf@HIDDEN> (Pip Cet via's message of "Sat,
 04 Jan 2025 16:36:20 +0000")
References: <87h66efsfx.fsf@HIDDEN>
Date: Mon, 06 Jan 2025 04:35:59 -0500
Message-ID: <yp1r05g5log.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75357
Cc: Pip Cet <pipcet@HIDDEN>, 75357 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@HIDDEN> writes:

> On scratch/elisp-benchmarks, the following emacs -Q invocation:
>
> ./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(progn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1))'
>
> produces a fatal Lisp error, attempting to invoke the debugger in a
> non-interactive session:
>
> Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-smie...
> Window size: 19 x 80
> Debugger entered--Lisp error: (error "Window size not as stipulated by the benchmark")
>   signal(error ("Window size not as stipulated by the benchmark"))
>   error("Window size not as stipulated by the benchmark")
>   elb-scroll-entry()

I'm not sure this is a bug as we want always to run the benchmark from a
known state, anyway adding Stefan as he's the author of the benchmark.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75357; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Jan 2025 09:36:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 06 04:36:21 2025
Received: from localhost ([127.0.0.1]:36702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tUjX3-0000fO-7Q
	for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 04:36:21 -0500
Received: from lists.gnu.org ([2001:470:142::17]:43014)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acorallo@HIDDEN>) id 1tUjX2-0000ey-6u
 for submit <at> debbugs.gnu.org; Mon, 06 Jan 2025 04:36:20 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <acorallo@HIDDEN>) id 1tUjWp-0000bp-Pg
 for bug-gnu-emacs@HIDDEN; Mon, 06 Jan 2025 04:36:08 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <acorallo@HIDDEN>)
 id 1tUjWn-0001Ds-6c; Mon, 06 Jan 2025 04:36:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=IyiTmS8PONBGuDxtFWayBomepEJgd0nRoO6pdI+TXgk=; b=C1wMoOnQw/NcHPEB8Qeb
 t3qIXyl0DtMN1aN3MccgnPweLcLbVDxN6Wr8nkmcWtPdsqw+QfCp1QJMdtDvhhUKyc4vNX96i/m7W
 CF952diOrgYYbK0f/Q6BUKS+9xEgcwoDMElcLCIO4+YAlE/h6bF4eKRbVBjrRMtGwigbkTX1+ZJh5
 k8x3GYtmVtPcuI80fxuNdUcTY8ye8rAuIiYgBnJh7behNhWu1AgXL3NtHzrkvUEgGrj/6x7c4dA4m
 6R4FGCarR27l1K1iXImAC7+Y1u8G7fxvOFAjq/LFHIKG+ZUPR5hQOzfepkpbRliRpNL7bdsQsdppf
 mA04iY4ApOldlA==;
Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <acorallo@HIDDEN>)
 id 1tUjWh-00069T-KU; Mon, 06 Jan 2025 04:36:01 -0500
From: Andrea Corallo <acorallo@HIDDEN>
To: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs@HIDDEN>
Subject: Re: bug#75357: [scratch/elisp-benchmarks] elb-scroll window size
 assumption breaks on repeated runs
In-Reply-To: <87h66efsfx.fsf@HIDDEN> (Pip Cet via's message of "Sat,
 04 Jan 2025 16:36:20 +0000")
References: <87h66efsfx.fsf@HIDDEN>
Date: Mon, 06 Jan 2025 04:35:59 -0500
Message-ID: <yp1r05g5log.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: submit
Cc: Pip Cet <pipcet@HIDDEN>, 75357 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@HIDDEN> writes:

> On scratch/elisp-benchmarks, the following emacs -Q invocation:
>
> ./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(progn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1))'
>
> produces a fatal Lisp error, attempting to invoke the debugger in a
> non-interactive session:
>
> Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-smie...
> Window size: 19 x 80
> Debugger entered--Lisp error: (error "Window size not as stipulated by the benchmark")
>   signal(error ("Window size not as stipulated by the benchmark"))
>   error("Window size not as stipulated by the benchmark")
>   elb-scroll-entry()

I'm not sure this is a bug as we want always to run the benchmark from a
known state, anyway adding Stefan as he's the author of the benchmark.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#75357; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 16:36:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 04 11:36:37 2025
Received: from localhost ([127.0.0.1]:56878 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tU78e-00012R-TE
	for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:36:37 -0500
Received: from lists.gnu.org ([2001:470:142::17]:56040)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pipcet@HIDDEN>)
 id 1tU78c-00012C-Mv
 for submit <at> debbugs.gnu.org; Sat, 04 Jan 2025 11:36:35 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pipcet@HIDDEN>)
 id 1tU78X-0006zX-24
 for bug-gnu-emacs@HIDDEN; Sat, 04 Jan 2025 11:36:29 -0500
Received: from mail-10629.protonmail.ch ([79.135.106.29])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pipcet@HIDDEN>)
 id 1tU78V-0004tb-Eu
 for bug-gnu-emacs@HIDDEN; Sat, 04 Jan 2025 11:36:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1736008584; x=1736267784;
 bh=4XidUo8MDPSmmkU2GnbaUXMZT3KUULoXuwb9EEdsRzo=;
 h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
 Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:
 List-Unsubscribe:List-Unsubscribe-Post;
 b=Av82T3njAAC2Wnc46Hs/FT3ITLUw70/FzYqL+d80um5ZJrEWubp7UM7f2/A3EI7Vr
 dYwOx8gi0Q/1ccg+BqzWgNbJ3tTOFeZDiMePJ9Tv4cRrBglAR/X8qHJvkJOGVEQiOJ
 tIBxE2I0e86+fKi3lzyz43jsqs65yfStOoYVF8EvrvztgWx9khbPmJTQ9R1wJOTXjP
 EmC3DZWwR8Pqyzp2k54qXMu5z1QvuLPOYjh9Oa5J6/8CqGdIIcVHPKA9l+IPwPQLhC
 2DrquB1NIP8QW1s4012lU5BbP5mTi8H4kNsc3N6Q8huYpJoz1krHb8QIL1am8LIH1H
 SFm0SRgEDzTgw==
Date: Sat, 04 Jan 2025 16:36:20 +0000
To: bug-gnu-emacs@HIDDEN
From: Pip Cet <pipcet@HIDDEN>
Subject: [scratch/elisp-benchmarks] elb-scroll window size assumption breaks
 on repeated runs
Message-ID: <87h66efsfx.fsf@HIDDEN>
Feedback-ID: 112775352:user:proton
X-Pm-Message-ID: 754a6ce7104599e3875f6e2a1ab72ee4f399d616
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=79.135.106.29; envelope-from=pipcet@HIDDEN;
 helo=mail-10629.protonmail.ch
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

On scratch/elisp-benchmarks, the following emacs -Q invocation:

./src/emacs --batch -Q -l ./elisp-benchmarks/elisp-benchmarks.el --eval '(p=
rogn (elisp-benchmarks-run "scroll" t 1) (elisp-benchmarks-run "scroll" t 1=
))'

produces a fatal Lisp error, attempting to invoke the debugger in a
non-interactive session:

Loading /home/pip/emacs-elisp-benchmarks/elisp-benchmarks/benchmarks/elb-sm=
ie...
Window size: 19 x 80
Debugger entered--Lisp error: (error "Window size not as stipulated by the =
benchmark")
  signal(error ("Window size not as stipulated by the benchmark"))
  error("Window size not as stipulated by the benchmark")
  elb-scroll-entry()

There are several bugs here:

1. The test itself incorrectly assumes that no secondary window is
displayed which would affect the ability of the test to resize its
window to the specified dimensions.

2. elisp-benchmarks does not handle Lisp errors thrown by a test
gracefully if debug-on-error is initially t, since it uses
with-demoted-errors without let-binding debug-on-error.

3. elisp-benchmarks destructively uses setq to modify the session's
debug-on-error value, leaving it at a different value on exit.

(1) can be fixed by a call to (delete-other-windows) in noninteractive
mode, but cannot be fixed that way in interactive mode.

(2) can be fixed by let-binding debug-on-error in non-interactive mode,
or using condition-case properly.

(3) can and should be fixed in the obvious fashion.

(2) and (3) can also be fixed by moving to ERT, which has an established
API for handling both the interactive and non-interactive scenario.

In all cases, we need a way to indicate for a benchmark whether it
modifies Emacs state destructively.  We need to handle debug-on-quit
differently, as ERT does.





Acknowledgement sent to Pip Cet <pipcet@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#75357; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.