From: Paul Eggert <eggert@cs.ucla.edu>
To: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: 33174@debbugs.gnu.org
Subject: bug#33174: 27.0.50; Dump fails on GNU/Linux ppc64le
Date: Mon, 29 Oct 2018 19:16:41 -0700 [thread overview]
Message-ID: <b5b8105b-e9ac-7472-f289-ae7012e9fb5d@cs.ucla.edu> (raw)
In-Reply-To: <m3bm7ccjf8.fsf@fitzsim.org>
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 complete
> 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
be able to bootstrap without it by using the reexec trick, and
bootstrapping does work on Fedora 28 (kernel 4.18.16-200.fc28.x86_64)
without XATTR_PAX being used.
The main issue now, as I see it, is why Emacs is crashing on re-exec.
That is, on my system after I run 'make SETFATTR=: bootstrap-emacs' to
simulate a system without XATTR_PAX, the command
strace -o /tmp/tr ./temacs --batch --load loadup bootstrap
generates the syscalls:
...
personality(0xffffffff) = 0 (PER_LINUX)
personality(PER_LINUX|ADDR_NO_RANDOMIZE) = 0 (PER_LINUX)
personality(0xffffffff) = 0x40000
(PER_LINUX|ADDR_NO_RANDOMIZE)
execve("./temacs", ["./temacs", "--batch", "--load", "loadup",
"bootstrap"], 0x852ee10 /* 73 vars */) = 0
...
whereas on your system Emacs is crashing instead of issuing the execve.
I suspect that something like the following may help you debug:
$ cd src
$ make clean
$ make CFLAGS='-g3 -O0' SETFATTR=: temacs
$ gdb temacs
(gdb) set disable-randomization off
(gdb) b personality
(gdb) r --batch --load loadup bootstrap
and then poke around to see what 'personality' is returning and whether
'disable_address_randomization' succeeds and how 'execve' is being
called. I guess on your host, personality (0xffffffff) returns 0, then
personality (0x40000) returns 0, then personality (0xffffffff) returns
0x40000, then disable_address_randomization () returns true, but it
would be helpful to check this. The next thing should be that getenv
("EMACS_HEAP_EXEC") returns NULL; is that what actually happens? And
then xputenv ("EMACS_HEAP_EXEC=true") should work without crashing; is
that right? And is execvp being called and with what arguments? That
sort of thing.
next prev parent reply other threads:[~2018-10-30 2:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-27 10:35 bug#33174: 27.0.50; Dump fails on GNU/Linux ppc64le Thomas Fitzsimmons
2018-10-27 13:16 ` Thomas Fitzsimmons
2018-10-27 20:26 ` Paul Eggert
2018-10-28 8:05 ` Paul Eggert
2018-10-28 12:56 ` Thomas Fitzsimmons
2018-10-28 19:22 ` Paul Eggert
2018-10-30 1:28 ` Thomas Fitzsimmons
2018-10-30 2:16 ` Paul Eggert [this message]
2018-10-29 1:47 ` Thomas Fitzsimmons
2018-10-29 7:22 ` Paul Eggert
2018-10-30 2:44 ` Thomas Fitzsimmons
2018-10-30 5:58 ` Paul Eggert
2018-10-30 9:30 ` Thomas Fitzsimmons
2018-11-12 6:39 ` Paul Eggert
2018-11-12 17:24 ` Andy Moreton
2018-11-13 2:29 ` Thomas Fitzsimmons
2018-11-13 14:42 ` Paul Eggert
2018-11-19 3:14 ` Thomas Fitzsimmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5b8105b-e9ac-7472-f289-ae7012e9fb5d@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=33174@debbugs.gnu.org \
--cc=fitzsim@fitzsim.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.