Received: (at 71988) by debbugs.gnu.org; 8 Jul 2024 11:17:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 08 07:17:48 2024 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> To: Pip Cet <pipcet@HIDDEN>, Stefan Monnier <monnier@HIDDEN> In-Reply-To: <cVt0dZOYriBO6Tpo1lJSHrnbA6ttTZvZIClty3TCFUNMfHf66UhbHi7A329CLnWz5ueIn3ypvcKDLsBynBK8wzd41YA29AKEPDgokIrVsqs=@protonmail.com> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#71988: 31.0.50; ert-test-run-tests-batch-expensive runs out of memory if previous tests failed References: <cVt0dZOYriBO6Tpo1lJSHrnbA6ttTZvZIClty3TCFUNMfHf66UhbHi7A329CLnWz5ueIn3ypvcKDLsBynBK8wzd41YA29AKEPDgokIrVsqs=@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71988 Cc: 71988 <at> debbugs.gnu.org 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?
bug-gnu-emacs@HIDDEN
:bug#71988
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 8 Jul 2024 04:50:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 08 00:50:15 2024 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 To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN> From: Pip Cet <pipcet@HIDDEN> Subject: 31.0.50; ert-test-run-tests-batch-expensive runs out of memory if previous tests failed 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-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: -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--
Pip Cet <pipcet@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#71988
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.