From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65445: 29.1; Android emacs: False memory full condition, due to Java exception (?) Date: Tue, 22 Aug 2023 07:52:18 +0800 Message-ID: References: <878ra4m77d.fsf@gmail.com> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26445"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65445@debbugs.gnu.org To: Johan =?UTF-8?Q?Wid=C3=A9n?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 22 01:53:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qYEi3-0006h0-Bd for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Aug 2023 01:53:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYEhh-0002cm-Hm; Mon, 21 Aug 2023 19:53:01 -0400 Original-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 ) id 1qYEhf-0002cT-OQ for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2023 19:52:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYEhf-0008F6-GE for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2023 19:52:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYEhh-0002JA-Lj for bug-gnu-emacs@gnu.org; Mon, 21 Aug 2023 19:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2023 23:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65445 X-GNU-PR-Package: emacs Original-Received: via spool by 65445-submit@debbugs.gnu.org id=B65445.16926619628835 (code B ref 65445); Mon, 21 Aug 2023 23:53:01 +0000 Original-Received: (at 65445) by debbugs.gnu.org; 21 Aug 2023 23:52:42 +0000 Original-Received: from localhost ([127.0.0.1]:58093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYEhO-0002IQ-B8 for submit@debbugs.gnu.org; Mon, 21 Aug 2023 19:52:42 -0400 Original-Received: from sonic315-21.consmr.mail.ne1.yahoo.com ([66.163.190.147]:39673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYEhM-0002I5-74 for 65445@debbugs.gnu.org; Mon, 21 Aug 2023 19:52:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692661950; bh=rJRUN7zRtoUnVsaGPY+brElTaDzf+t8xfmkmZQ4q/Qw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=XbcROhFo7rJD9y2/QubIbwOgVApl3sbpCT1yEl4BdXq2piY6ktR2XfPXqynrW/xY0883N9xPxiWJDr+DukdqxFCdQG3bRFruHLzpDzGk4qPOVAp2X9C8BeHQob4vD3rvNetVNiDrvWAsaW+8N8+lgTtoUAPUu26Bkypmi0JwpE1rQjXPwB3TO9qVUhnt1uZxr4n9SesBzUK/QYz1XvZS6ifx8+6PkwHvpTXx5ZBgTO0DW7wmlluSKuelayJTBPDqTiT637Gt/T/gWNL+Q+kibP9+XpoUdJnX9AsRmumciViNX6z+bCcPSc+9fk8cxhaTFkuFbEJDI582TjScfkXcyA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692661950; bh=K9IGo45cB+gTdKVTr066CwZ65cHygtYeGZ6bdYMNZ/0=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=oBWGXrA0/6eboXJSDxtLkGXt7aslzJwJtPz3GQMVhPTGghf34bwjI2f4zVj4H+QqHukp/aP+HUkjPO6sbc1TztxEJ26Yt81qABiBEhFLG66Anr18hFC5G89rbzX0Rndmv95EaQnarg26l9ms1HYbq9pM0OoXB79UOjgL8cusSnir3XS6N1meD1nZ1OPknVaevzIPZkh3FGh/yQXh82hR8GHAeUog/r8jNba+2PQIql8i6hq5aEI4apRggqfMUkEY6BnBrzBkjSR6C4lHAgYXKplQRp+ikFf99LX/mkgxqpfiAfQo8DBYtFS3WMadkHcS0wX0OR6WWCVZHKKblKuOKA== X-YMail-OSG: x979YtUVM1nuBygUOWi4lpkrMjlrnvMgt4DaSfPTASsc9TtHWBc7hU6ZPF8wYih Xi_EpMB1x3zGTYApRiLpBXdZeom0mtdNmytOvtamwTj65JmcHRr6GdhdnpUl27sZt_FT0gMinchm uZO1Id5sa18pY8ofQehHHQW9LQb4pvlISHeL_JlbNJNhtlyB6UTmF5tJ5Lqa2.nZN8EErDBQe7HV qZimZDlJ1vUvi9hVR7ykTfMFSgsF0FSxVAl8wDwxjbdYmrRFrSrCus4Ndz5sQ6OmE_kUmth5ZFFc uLVFV1lOtHiwFjEP89nlrmoVP3PJCh4U4lNEobCB9goSBoU9k_RJPzY7oMFLpjJz0iazoD9uJq4w 6IJ8868BsXWKhwkrwgDJiONOtGUFhN91yCyZ3E1IVI3D9og.A.US12ngUVoGgxTm2h4VcdjeVhet IXpTIckrx4_yKGlpCd.gF8Wag785m8bnBf5HZEnCj2jJ1R_a81cyYfuPCwZp7yyYzZgH.i2w_QVA W8PfsQTKujpfDUpd9MQToAc_CRJtkzvz96xBrMBg7_Akg0RZ37gxsWdWjah3o4utcZkNdZfzaSgw p1qUmnvSt_eDB0qvlBVsDwUN.jbAoLEn5ANmsKhfFCZBO4aHU3nKtcv0NPnZ_5zPq.PzO8O6AUDz 601ZcCAOntBmy.NczWmNhuDenb.VNgLE0vqw9veoHAFKqGx7HhCIEHUvQAQNOgvrhS3qgS.NuboK vBi60NdTcY4HaNqfNwkspZC7TFQrxHVtvlbFh9LXfkQ8L9PbmB7M6dNMWrq4eZiviMmZJlZ1ZgCt ZO94Sw5GTYZrS1bt80VPENFldbZ2IuuMBq2M0XGE9D X-Sonic-MF: X-Sonic-ID: a427463c-c020-4429-89ec-e0178695445f Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.ne1.yahoo.com with HTTP; Mon, 21 Aug 2023 23:52:30 +0000 Original-Received: by hermes--production-sg3-69654d8bd-7fcnj (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f1de134b29b263c652aa6b0424e6c13a; Mon, 21 Aug 2023 23:52:25 +0000 (UTC) In-Reply-To: <878ra4m77d.fsf@gmail.com> ("Johan =?UTF-8?Q?Wid=C3=A9n?="'s message of "Mon, 21 Aug 2023 22:46:13 +0200") X-Mailer: WebService/1.1.21732 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268127 Archived-At: Johan Wid=C3=A9n writes: > This bug report is for Android emacs, but I am writing it in my Ubuntu > emacs, so the config of the Ubuntu emacs is irrelevant. I can send the > Android emacs figures later, if so desired. I currently have Android > emacs connected to a debugger, with the stacktrace active, so for now > I > would like to avoid executing report-emacs-bug there. > > The following bug, or similar, have appeared in all Android emacs > versions that I have downloaded from Sourceforge. The latest was > downloaded 20-aug-2023 15:38 UTC. > > I append a stacktrace. This is from my own build, but the only file > that is modifed relative to the repo is alloc.c where I have added 20 > lines or so before the place where I triggered an abort(). I put an > abort() in memory full, as I so far have not been able to set > functioning break points. > > What happens is that after some editing emacs reports that memory is > full. But (memory-info) and (memory-report) shows that there is a lot > of free memory. Emacs internal data allocation is about 150 megabyte, > and free memory is about 300 megabyte. > > I will try to analyze the stack trace more, but I thought it might be > of interest. I can trigger the bug fairly repeatable, in the > following manner: I use spacemacs in evil mode. I start spacemacs and > open a pdf book in pdf-tools. I then split the window and open a (non > empty) text file. At the beginning of the text file I enter the evil > commands: i0C-[yl which inserts a '0' and then copies it to evils two > 'yank' registers. That is when the memory full condition occurs. I > have triggered the bug or a similar bug several times in other editing > conditions, but I have not been able to repeat those. It was a bit of > phase of the moon. Callers of android_exception_check assume that the preceding call(s) to Java never signal exceptions, so that if an exception is signaled, it must be an OOM error. This assumption is made to avoid type comparisons or local reference allocation (both of which may culminate in more OOM errors) that would otherwise be necessary to establish the real cause of an exception. When an exception is registered by android_exception_check, it makes an attempt to print it to the log buffer. Piping it to `grep -A10 "Possible out of memory error"' should uncover the Java stack trace saved in the exception.