Subject: Re: bug#33174: 27.0.50; Dump fails on GNU/Linux ppc64le

From: Paul Eggert <[email-masked]>
Date: Mon, 29 Oct 2018 00:22:15 -0700

Thomas Fitzsimmons wrote:
> Paul Eggert <[email-masked]> writes:
> 
>> Wonderful. Yet another reason we need to get the pdumper branch working. Anyway:
>>
>> 1. Can you use strace and/or GDB to investigate how ./temacs is
>> disabling address randomization? In the emacs-26 branch, if you run
>> this command in src:
>>
>> strace -f -o /tmp/tr ./temacs --batch  --load loadup bootstrap
>>
>> the output file /tmp/tr should contain something like this:
>>
>> 18406 personality(0xffffffff)           = 0 (PER_LINUX)
>> 18406 personality(PER_LINUX|ADDR_NO_RANDOMIZE) = 0 (PER_LINUX)
>> 18406 personality(0xffffffff)           = 0x40000 (PER_LINUX|ADDR_NO_RANDOMIZE)
> 
> I see the above personality calls exactly as you've shown them.
> 
> strace never gets to the next execve; the crash happens before the next
> execve is run, see below.
> 
>> 18406 execve("./temacs", ["./temacs", "--batch", "--load", "loadup",
>> "bootstrap"], 0xc521b0 /* 80 vars */) = 0

So there are no more system calls after personality(0xffffffff)? That is, the 
crash happens immediately before any other system calls? What does 'strace' say 
about the crash?

For me, the execve is the first syscall after the 'personality(0xffffffff) = 
0x40000'. If you're seeing some other syscall there (or are seeing a crash), 
please investigate why, presumably with GDB.

> When I run the command under gdb, it succeeds, so I had to enable core
> dumps to get the backtrace:

Core dumps won't help us much I'm afraid. Instead, when debugging ./temacs, 
please use the GDB command "set disable-randomization off" before issuing the 
GDB command "run --batch  --load loadup bootstrap".