GNU logs - #71988, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#71988: 31.0.50; ert-test-run-tests-batch-expensive runs out of memory if previous tests failed
Resent-From: Pip Cet <pipcet@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Jul 2024 04:51:02 +0000
Resent-Message-ID: <handler.71988.B.17204142155023 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 71988
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 71988 <at> debbugs.gnu.org
X-Debbugs-Original-To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.17204142155023
          (code B ref -1); Mon, 08 Jul 2024 04:51:02 +0000
Received: (at submit) by debbugs.gnu.org; 8 Jul 2024 04:50:15 +0000
Received: from localhost ([127.0.0.1]:49432 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sQgKN-0001Ix-5t
	for submit <at> debbugs.gnu.org; Mon, 08 Jul 2024 00:50:15 -0400
Received: from lists.gnu.org ([209.51.188.17]:47826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1sQgKI-0001Ig-61
 for submit <at> debbugs.gnu.org; Mon, 08 Jul 2024 00:50:14 -0400
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 1sQgKD-0007UR-4b
 for bug-gnu-emacs@HIDDEN; Mon, 08 Jul 2024 00:50:05 -0400
Received: from mail-40134.protonmail.ch ([185.70.40.134])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pipcet@HIDDEN>)
 id 1sQgKB-0005Hr-12
 for bug-gnu-emacs@HIDDEN; Mon, 08 Jul 2024 00:50:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1720414199; x=1720673399;
 bh=bYP0Bqf2rYXqh5HDI9cy2Z0QynYzxXXyaov2PNNKZoc=;
 h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
 Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;
 b=IQEFFwfac7AGfB5KBP5Sm2JTMEA4kT9/P1KbmkZwPDmx422wg4Iyh1RYZe04YO0Uf
 TeakBuzIHBaS7GedYGmANfn2FyYexkYWBIpADfrJ48ARyWIInBz4eULxD2VsvvMqht
 iia7sT13JjVB1oj85jKvYzcWP0qiqb1KESxzcJQw/cWxvHnmp8VinbH2bHzpscZaxB
 N+Rf55T2V76UCYQdHkZTGdE6S+v2x6CjMfqf7/euxPDjhxudv7HovUUocNS2+YGeHp
 8eOUtMH2Ptcs7+wSP2+hd93Cs4lp71ffBHDGryiWyGd9Qm01Dye/+ceVeLotPJzTWz
 ntPNiCI/XT1qA==
Date: Mon, 08 Jul 2024 04:49:54 +0000
From: Pip Cet <pipcet@HIDDEN>
Message-ID: <cVt0dZOYriBO6Tpo1lJSHrnbA6ttTZvZIClty3TCFUNMfHf66UhbHi7A329CLnWz5ueIn3ypvcKDLsBynBK8wzd41YA29AKEPDgokIrVsqs=@protonmail.com>
Feedback-ID: 112775352:user:proton
X-Pm-Message-ID: c3bc2e178bc72cc98d90675c2902e047b333df0e
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="b1_zSKYbvc3qGge9nyFVYnxffM8Cg6iz8q7xeMH5pse4w"
Received-SPF: pass client-ip=185.70.40.134; envelope-from=pipcet@HIDDEN;
 helo=mail-40134.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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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.3 (-)
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: -2.3 (--)

This is a multi-part message in MIME format.

--b1_zSKYbvc3qGge9nyFVYnxffM8Cg6iz8q7xeMH5pse4w
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

This bug report is mostly to get a bug number to put in the patch :-).

The test `ert-test-run-tests-batch-expensive' overrides print settings
and prints a full backtrace to a temporary buffer repeatedly. If a
previous test, such as `ert-test-run-tests-batch', failed, this
eventually runs out of memory even on a 64 GB system.

For example, one can add "(should nil)" to ert-test-run-tests-batch and
run:

$ make -C test lisp/emacs-lisp/ert-tests

The problem is the ert--stats structure's tests vector is being printed,
which recursively prints all previous tests' data.

A possible fix is to temporarily override cl-print-object for either
vectors or the ert--stats object to print nothing.

Unfortunately, we don't appear to have an official mechanism for
temporarily calling cl-defmethod, such as a generalized variable one can
cl-letf to. The patch does that by running cl-defmethod inside a
(cl-letf* (((symbol-function 'cl-print-object) (symbol-function
'cl-print-object))) ...) form. As future changes to cl-generic might
break that, an additional test is added to make sure our binding is
undone and die loudly if it hasn't been.

This also speeds up the test significantly and it might be possible to
remove the :unstable tag.
--b1_zSKYbvc3qGge9nyFVYnxffM8Cg6iz8q7xeMH5pse4w
Content-Type: text/x-patch; name=0001-ert-tests-reproducer.patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=0001-ert-tests-reproducer.patch

ZGlmZiAtLWdpdCBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbCBiL3Rlc3QvbGlz
cC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbAppbmRleCAxYWZmNzNkNjZmNi4uMmY4ZTczODJiZWEg
MTAwNjQ0Ci0tLSBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbAorKysgYi90ZXN0
L2xpc3AvZW1hY3MtbGlzcC9lcnQtdGVzdHMuZWwKQEAgLTU4Myw2ICs1ODMsNyBAQCBlcnQtdGVz
dC1ydW4tdGVzdHMtYmF0Y2gKIAkJICAgKHNldHEgZm91bmQtbG9uZyAoc3RyaW5nLW1hdGNoIGxv
bmctdGV4dCBtc2cpKSkKIAkJICh1bmxlc3MgZm91bmQtY29tcGxleAogCQkgICAoc2V0cSBmb3Vu
ZC1jb21wbGV4IChzdHJpbmctbWF0Y2ggY29tcGxleC10ZXh0IG1zZykpKSkKKyAgICAgICAgKHNo
b3VsZCBuaWwpCiAJKHNob3VsZCBmb3VuZC1sb25nKQogCShzaG91bGQgZm91bmQtY29tcGxleCkp
KSkpCiAK

--b1_zSKYbvc3qGge9nyFVYnxffM8Cg6iz8q7xeMH5pse4w
Content-Type: text/x-patch; name=0001-ert-tests.patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=0001-ert-tests.patch

ZGlmZiAtLWdpdCBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbCBiL3Rlc3QvbGlz
cC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbAppbmRleCAxYWZmNzNkNjZmNi4uNGNiNTIzZDJmZjEg
MTAwNjQ0Ci0tLSBhL3Rlc3QvbGlzcC9lbWFjcy1saXNwL2VydC10ZXN0cy5lbAorKysgYi90ZXN0
L2xpc3AvZW1hY3MtbGlzcC9lcnQtdGVzdHMuZWwKQEAgLTU2OSw3ICs1NjksNyBAQCBlcnQtdGVz
dC1ydW4tdGVzdHMtYmF0Y2gKICAgICAgICAgKHNhdmUtd2luZG93LWV4Y3Vyc2lvbgogICAgICAg
ICAgIChsZXQgKChjYXNlLWZvbGQtc2VhcmNoIG5pbCkKICAgICAgICAgICAgICAgICAoZXJ0LWJh
dGNoLWJhY2t0cmFjZS1yaWdodC1tYXJnaW4gbmlsKQotCQkoZXJ0LWJhdGNoLXByaW50LWxldmVs
IDEwKQorCQkoZXJ0LWJhdGNoLXByaW50LWxldmVsIDEpCiAJCShlcnQtYmF0Y2gtcHJpbnQtbGVu
Z3RoIDExKSkKICAgICAgICAgICAgIChlcnQtcnVuLXRlc3RzLWJhdGNoCiAgICAgICAgICAgICAg
YChtZW1iZXIgLGZhaWxpbmctdGVzdC0xICxmYWlsaW5nLXRlc3QtMikpKSkpCg==

--b1_zSKYbvc3qGge9nyFVYnxffM8Cg6iz8q7xeMH5pse4w--





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Pip Cet <pipcet@HIDDEN>
Subject: bug#71988: Acknowledgement (31.0.50; ert-test-run-tests-batch-expensive
 runs out of memory if previous tests failed)
Message-ID: <handler.71988.B.17204142155023.ack <at> debbugs.gnu.org>
References: <cVt0dZOYriBO6Tpo1lJSHrnbA6ttTZvZIClty3TCFUNMfHf66UhbHi7A329CLnWz5ueIn3ypvcKDLsBynBK8wzd41YA29AKEPDgokIrVsqs=@protonmail.com>
X-Gnu-PR-Message: ack 71988
X-Gnu-PR-Package: emacs
Reply-To: 71988 <at> debbugs.gnu.org
Date: Mon, 08 Jul 2024 04:51:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 71988 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
71988: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D71988
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#71988: 31.0.50; ert-test-run-tests-batch-expensive runs out of memory if previous tests failed
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Jul 2024 11:18:01 +0000
Resent-Message-ID: <handler.71988.B71988.172043746823145 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 71988
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Pip Cet <pipcet@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Cc: 71988 <at> debbugs.gnu.org
Received: via spool by 71988-submit <at> debbugs.gnu.org id=B71988.172043746823145
          (code B ref 71988); Mon, 08 Jul 2024 11:18:01 +0000
Received: (at 71988) by debbugs.gnu.org; 8 Jul 2024 11:17:48 +0000
Received: from localhost ([127.0.0.1]:49819 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sQmNQ-00061F-1g
	for submit <at> debbugs.gnu.org; Mon, 08 Jul 2024 07:17:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sQmNN-000612-68
 for 71988 <at> debbugs.gnu.org; Mon, 08 Jul 2024 07:17:45 -0400
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 <eliz@HIDDEN>)
 id 1sQmNB-0003Va-6n; Mon, 08 Jul 2024 07:17:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=OyZZ8Tq2qaEmXD69ZoOuaBUQjsdtIm7XW0jz5cU4uA8=; b=Jwcc171u8K6/
 11k4UJu5Dgq2A69IQaglC0ruF1zNprITfehSOz2s+r7JiFNmGaxW3IBXTgTU0dcW1JgZQACJCH7cx
 gNHMVuLdpfz9dSHvAvKDiRsDMfYzWSpvCYIN2mD04P9kmrw714joqhCn92uWKAoH7OGEsuG6dDV3n
 C7x91Py7irRt4fGDT3uXoDpQ8k8x3yNiuGFTHOIbdLODD+n6gysN/I6EncdruM50tN2p2Dw7LBf7X
 S0tv8eviYNTJgf4vKs0haaUO19i1UlELgRKPZQcQ+Qga5cy22D+C2KDoczjoQbjU8krYafZeZ28qm
 XK1UsVGKBgm8/Sds602HLw==;
Date: Mon, 08 Jul 2024 14:17:26 +0300
Message-Id: <868qyc16bd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <cVt0dZOYriBO6Tpo1lJSHrnbA6ttTZvZIClty3TCFUNMfHf66UhbHi7A329CLnWz5ueIn3ypvcKDLsBynBK8wzd41YA29AKEPDgokIrVsqs=@protonmail.com>
 (bug-gnu-emacs@HIDDEN)
References: <cVt0dZOYriBO6Tpo1lJSHrnbA6ttTZvZIClty3TCFUNMfHf66UhbHi7A329CLnWz5ueIn3ypvcKDLsBynBK8wzd41YA29AKEPDgokIrVsqs=@protonmail.com>
X-Spam-Score: -2.3 (--)
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 (---)

> Date: Mon, 08 Jul 2024 04:49:54 +0000
> From:  Pip Cet via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> This bug report is mostly to get a bug number to put in the patch :-).
> 
> The test `ert-test-run-tests-batch-expensive' overrides print settings
> and prints a full backtrace to a temporary buffer repeatedly. If a
> previous test, such as `ert-test-run-tests-batch', failed, this
> eventually runs out of memory even on a 64 GB system.
> 
> For example, one can add "(should nil)" to ert-test-run-tests-batch and
> run:
> 
> $ make -C test lisp/emacs-lisp/ert-tests
> 
> The problem is the ert--stats structure's tests vector is being printed,
> which recursively prints all previous tests' data.
> 
> A possible fix is to temporarily override cl-print-object for either
> vectors or the ert--stats object to print nothing.
> 
> Unfortunately, we don't appear to have an official mechanism for
> temporarily calling cl-defmethod, such as a generalized variable one can
> cl-letf to. The patch does that by running cl-defmethod inside a
> (cl-letf* (((symbol-function 'cl-print-object) (symbol-function
> 'cl-print-object))) ...) form. As future changes to cl-generic might
> break that, an additional test is added to make sure our binding is
> undone and die loudly if it hasn't been.
> 
> This also speeds up the test significantly and it might be possible to
> remove the :unstable tag.
> 
> 
> diff --git a/test/lisp/emacs-lisp/ert-tests.el b/test/lisp/emacs-lisp/ert-tests.el
> index 1aff73d66f6..2f8e7382bea 100644
> --- a/test/lisp/emacs-lisp/ert-tests.el
> +++ b/test/lisp/emacs-lisp/ert-tests.el
> @@ -583,6 +583,7 @@ ert-test-run-tests-batch
>  		   (setq found-long (string-match long-text msg)))
>  		 (unless found-complex
>  		   (setq found-complex (string-match complex-text msg))))
> +        (should nil)
>  	(should found-long)
>  	(should found-complex)))))

Stefan, any comments or suggestions?





Last modified: Mon, 8 Jul 2024 11:30:02 UTC

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