From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22526: 25.0.90; Crash starting gnus Date: Sun, 14 Feb 2016 18:55:08 +0200 Message-ID: <83a8n3z0yb.fsf@gnu.org> References: <56AFD88B.5040904@gmail.com> <87pow9cc0c.fsf@gnus.org> <83h9hkse78.fsf@gnu.org> <864mdk44q6.fsf@gmail.com> <83mvrcqli1.fsf@gnu.org> <86twlg2e69.fsf@gmail.com> <8360xv9ems.fsf@gnu.org> <8637sz7xmh.fsf@gmail.com> <83io1v7xcd.fsf@gnu.org> <83fuwx7vkv.fsf@gnu.org> <86fuwxk1l1.fsf@gmail.com> <837fi96mkq.fsf@gnu.org> <83vb5s6gas.fsf@gnu.org> <83d1s05zov.fsf@gnu.org> <83r3ggz2dt.fsf@gnu.org> <83povzzw5d.fsf@gnu.org> <86egcfs7f4.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455468992 24754 80.91.229.3 (14 Feb 2016 16:56:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2016 16:56:32 +0000 (UTC) Cc: 22526@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 14 17:56:21 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUzy3-0008JD-Dx for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 17:56:15 +0100 Original-Received: from localhost ([::1]:51943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzy2-0006W6-Sg for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2016 11:56:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzxt-0006OB-M9 for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUzxq-0006oz-FS for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzxq-0006ou-Bm for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aUzxq-0000fZ-6M for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2016 11:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2016 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22526-submit@debbugs.gnu.org id=B22526.14554689152499 (code B ref 22526); Sun, 14 Feb 2016 16:56:02 +0000 Original-Received: (at 22526) by debbugs.gnu.org; 14 Feb 2016 16:55:15 +0000 Original-Received: from localhost ([127.0.0.1]:38974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUzx5-0000eF-Ck for submit@debbugs.gnu.org; Sun, 14 Feb 2016 11:55:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38558) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aUzx3-0000e2-6L for 22526@debbugs.gnu.org; Sun, 14 Feb 2016 11:55:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUzwu-0006SB-Ts for 22526@debbugs.gnu.org; Sun, 14 Feb 2016 11:55:08 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUzwu-0006S0-RE; Sun, 14 Feb 2016 11:55:04 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3140 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aUzwu-0004ZF-7N; Sun, 14 Feb 2016 11:55:04 -0500 In-reply-to: <86egcfs7f4.fsf@gmail.com> (message from Andy Moreton on Sun, 14 Feb 2016 14:17:19 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113019 Archived-At: > From: Andy Moreton > Date: Sun, 14 Feb 2016 14:17:19 +0000 > > warning: realloc enlarge: VirtualAlloc (00000000001f0000 + 10000, 807) error 87 > > Emacs kept working normally at this point, so the latest patch improves things. > > Looking at the running emacs with vmmap (a Microsoft Sysinternals tool), > I see that the region it was trying to expand the block into was already > occupied: > > Address Type Size Committed Private Blocks Protection Details > 00000000001F0000 Private Data 4 4 4 1 Read/Write > 00000000001F0000 Private Data 4 4 4 Read/Write > 0000000000200000 Private Data 2,048 44 44 9 Read/Write Thread Environment Block ID: 1112 > 0000000000200000 Private Data 1,008 Reserved Thread Environment Block ID: 1112 I don't understand how it could have been occupied when the above message was shown, because of this condition: if (VirtualQuery (*var + memInfo.RegionSize, &m2, sizeof(m2)) == 0) DebPrint (("mmap_realloc: VirtualQuery error = %ld\n", GetLastError ())); /* If there is enough room in the current reserved area, then commit more pages as needed. */ if (m2.State == MEM_RESERVE <<<<<<<<<<<<<<<<<<<<<<<<<<<< && nbytes <= memInfo.RegionSize + m2.RegionSize) { This 'if' says that the region starting at 0x1f0000+0x10000 is in the "reserved" state, i.e. it cannot be used by any process, including the Emacs process (Emacs can only start using it after committing the region, which is exactly what the failed call to VirtualAlloc tried to do). Am I missing something? It's good to know the patch improves things. I will push it, and I will also add more debugging printouts to help us understand better what is going on here. Thanks.