From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#33174: 27.0.50; Dump fails on GNU/Linux ppc64le Date: Mon, 29 Oct 2018 19:16:41 -0700 Organization: UCLA Computer Science Department Message-ID: References: <784dd857-cde9-d13d-0afb-234f5cdafb79@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540865716 4414 195.159.176.226 (30 Oct 2018 02:15:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2018 02:15:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: 33174@debbugs.gnu.org To: Thomas Fitzsimmons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 30 03:15:12 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1gHJYl-0000z6-Cw for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Oct 2018 03:15:11 +0100 Original-Received: from localhost ([::1]:50245 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHJar-0006Fs-R2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Oct 2018 22:17:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHJad-0006DW-Jg for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2018 22:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHJaY-0002qw-LG for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2018 22:17:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48326) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHJaY-0002qq-Gv for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2018 22:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gHJaY-0002wX-BJ for bug-gnu-emacs@gnu.org; Mon, 29 Oct 2018 22:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Oct 2018 02:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33174 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33174-submit@debbugs.gnu.org id=B33174.154086581110748 (code B ref 33174); Tue, 30 Oct 2018 02:17:02 +0000 Original-Received: (at 33174) by debbugs.gnu.org; 30 Oct 2018 02:16:51 +0000 Original-Received: from localhost ([127.0.0.1]:52583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHJaM-0002mx-NC for submit@debbugs.gnu.org; Mon, 29 Oct 2018 22:16:51 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHJaK-0002he-9q for 33174@debbugs.gnu.org; Mon, 29 Oct 2018 22:16:48 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6A71B160056; Mon, 29 Oct 2018 19:16:42 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id GqmU8u9nZ6pj; Mon, 29 Oct 2018 19:16:41 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9A6AE160060; Mon, 29 Oct 2018 19:16:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xVeD4AFjrPjx; Mon, 29 Oct 2018 19:16:41 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7C9AB160056; Mon, 29 Oct 2018 19:16:41 -0700 (PDT) Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECH In-Reply-To: Content-Language: en-US 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" Xref: news.gmane.org gmane.emacs.bugs:151800 Archived-At: On 10/29/18 6:28 PM, Thomas Fitzsimmons wrote: > I guess I could experiment with adding the PaX patches to my kernel so > that XATTR_PAX would take effect, but I'm surprised Emacs can't complet= e > the bootstrap step when the kernel is in a default configuration. You're right, the XATTR_PAX stuff is likely a red herring. Emacs should=20 be able to bootstrap without it by using the reexec trick, and=20 bootstrapping does work on Fedora 28 (kernel 4.18.16-200.fc28.x86_64)=20 without XATTR_PAX being used. The main issue now, as I see it, is why Emacs is crashing on re-exec.=20 That is, on my system after I run 'make SETFATTR=3D: bootstrap-emacs' to=20 simulate a system without XATTR_PAX, the command strace -o /tmp/tr ./temacs --batch=C2=A0 --load loadup bootstrap generates the syscalls: ... personality(0xffffffff)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0 (PER_LINUX) personality(PER_LINUX|ADDR_NO_RANDOMIZE) =3D 0 (PER_LINUX) personality(0xffffffff)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 0x40000=20 (PER_LINUX|ADDR_NO_RANDOMIZE) execve("./temacs", ["./temacs", "--batch", "--load", "loadup",=20 "bootstrap"], 0x852ee10 /* 73 vars */) =3D 0 ... whereas on your system Emacs is crashing instead of issuing the execve.=20 I suspect that something like the following may help you debug: $ cd src $ make clean $ make CFLAGS=3D'-g3 -O0' SETFATTR=3D: temacs $ gdb temacs (gdb) set disable-randomization off (gdb) b personality (gdb) r --batch=C2=A0 --load loadup bootstrap and then poke around to see what 'personality' is returning and whether=20 'disable_address_randomization' succeeds and how 'execve' is being=20 called. I guess on your host, personality (0xffffffff) returns 0, then=20 personality (0x40000) returns 0, then personality (0xffffffff) returns=20 0x40000, then disable_address_randomization () returns true, but it=20 would be helpful to check this. The next thing should be that getenv=20 ("EMACS_HEAP_EXEC") returns NULL; is that what actually happens? And=20 then xputenv ("EMACS_HEAP_EXEC=3Dtrue") should work without crashing; is=20 that right? And is execvp being called and with what arguments? That=20 sort of thing.