From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Thu, 15 Feb 2018 18:36:11 -0800 Message-ID: <810f778f-a3b3-2cb1-ccbe-36e5a29679ca@dancol.org> References: <321afd9b-15d6-e028-4aac-c646147883b4@cornell.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1518748688 17983 195.159.176.226 (16 Feb 2018 02:38:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 02:38:08 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ken Brown Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 16 03:38:03 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emVu6-0002qN-4S for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2018 03:37:38 +0100 Original-Received: from localhost ([::1]:57882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emVw8-0005xg-5A for ged-emacs-devel@m.gmane.org; Thu, 15 Feb 2018 21:39:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emVst-0002ny-3J for emacs-devel@gnu.org; Thu, 15 Feb 2018 21:36:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emVss-0004ta-0q for emacs-devel@gnu.org; Thu, 15 Feb 2018 21:36:23 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:60314) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emVsr-0004tH-My; Thu, 15 Feb 2018 21:36:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=zqya67WPcLT+XMw6xAm7kKBBtC3/tvHKJcM1K5y4kM8=; b=XmRxDDY1on2+74Pb3bQeNGe26RdVcuII0yF0Z2Tcp/wZQ0/BIaZGu5vZibt3LBJl19h9TdA7q4gWys+5BUDzTgnZXQylyl1yXf3EO+EL75ZDUvilO8JnNMrx7VZa/27L4i9yxPZPJeb02qsbUn7pc2SrSHNXD//kXKHlhZWCUAgg+MEaFgAIJadGOMZvhwa54SBZzGhrWjfhpiZYsV0PjBJdbGDpS59r4JouB40ndIq8XXtBwcinkTtq9PT3HsS2XTWuACCHRUlcQC0MhziJsWtuuHK8HR19atxAmrf7FSKkaS+X9Io+UP64OGIwC5N0+f84476J1GOALcnQFTGSLQ==; Original-Received: from [2604:4080:1321:8ab0:4543:45e5:5340:8450] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1emVso-0003hM-LO; Thu, 15 Feb 2018 18:36:18 -0800 In-Reply-To: <321afd9b-15d6-e028-4aac-c646147883b4@cornell.edu> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222801 Archived-At: On 02/15/2018 05:56 PM, Ken Brown wrote: > On 2/15/2018 6:36 PM, Daniel Colascione wrote: >> On Feb 15, 2018 3:31 PM, Ken Brown wrote: >> >>     On 2/13/2018 11:37 AM, Eli Zaretskii wrote: >>      >> From: Daniel Colascione >>      >> Date: Mon, 12 Feb 2018 12:18:36 -0800 >>      >> >>      >> I've pushed the portable dumper to the pdumper Savannah >> branch. It >>      >> should support a fully PIC Emacs. >>      > >>      > Thanks.  I'd urge people to try this branch and report any issues >>     they >>      > see. >> >>     I just tried to build on 64-bit Cygwin, and the build fails as >> follows: >> >>     [...] >>     Dumping under the name bootstrap-emacs.pdmp >>     dumping fingerprint: >>     923050a9f611ad7ead76eea704308e4d05f152601a9134cf8d1b5ff3e0e1a986 >>     Dump complete >>     Byte counts: header=80 hot=13187392 discardable=119424 cold=9086640 >>     Reloc counts: hot=919268 discardable=5790 >>     make -C ../lisp compile-first EMACS="../src/bootstrap-emacs.exe" >>     make[2]: Entering directory >>     '/home/kbrown/src/emacs/x86_64-pdumper/lisp' >>         ELC      ../../pdumper/lisp/emacs-lisp/macroexp.elc >>         ELC      ../../pdumper/lisp/emacs-lisp/cconv.elc >>         ELC      ../../pdumper/lisp/emacs-lisp/byte-opt.elc >>         ELC      ../../pdumper/lisp/emacs-lisp/bytecomp.elc >>     emacs: could not load dump file "../src/bootstrap-emacs.pdmp": out >>     of memory >> >>     There's probably some obvious explanation, but I don't see it at the >>     moment. >> >> >> I'm not entirely surprised to see Cygwin fall over here. We could just >> use the Windows memory mapping functions directly, but I'd prefer to >> stick with the POSIX API if we can make it work. > > I agree. > >> Any idea where in the mmap sequence we fail? > > I haven't looked at the code yet, so I don't understand the question. If > you give me some guidance, I'll try to investigate. Thanks. I think the trouble must be in dump_mmap_contiguous. We report all errors from this function as "out of memory". dump_mmap_contiguous takes an array of mapping descriptors (think ELF segments or something) and maps them all into a single contiguous region of virtual memory. On POSIX systems, we reserve a chunk of address space with a big PROT_NONE anonymous mapping, then carve it up into the separate mappings that we really want. Windows doesn't support atomic mmap replacement, so Cygwin has to emulate it, and I wouldn't be surprised if something's going wrong in this emulation. That you're able to compile a few elisp files before bootstrap starts failing makes me wonder whether we're dealing with Cygwin's perennial problem with address space collisions and some kind of dynamic-base DLL.