all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Petr Hracek <phracek@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20614@debbugs.gnu.org
Subject: bug#20614: Segmentation fault when building on Power8 Little Endian
Date: Wed, 23 Sep 2015 13:00:03 +0200	[thread overview]
Message-ID: <56028633.3000303@redhat.com> (raw)
In-Reply-To: <838u7xlbsn.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3738 bytes --]

On 09/23/2015 11:34 AM, Eli Zaretskii wrote:
>> From: Petr Hracek <phracek@redhat.com>
>> Date: Wed, 23 Sep 2015 10:06:50 +0200
>>
>> Is there any possibility how to suppress dumping emacs?
>> Shall I add something to ./configure script or even to make?
> You could try adding -DCANNOT_DUMP=1 to preprocessor command-line
> switches.  But it would be much better if you try figuring out why it
> segfaults, then we might be able to come up with a solution that
> preserves the dumping capability.
Well, I will try to summarize it. And sorry for my english.
I would like to build emacs also under ppc64le architecture for RHEL-7 
system
All other architecture seems to be working well.

I have add a patch to our emacs downstream package which comments
row 
http://git.savannah.gnu.org/cgit/emacs.git/tree/src/unexelf.c?h=emacs-24#n869
so that I did not see message like:

Dumping under the name emacs
emacs: Program segment above .bss in /builddir/build/BUILD/emacs-24.3/build-gtk/src/temacs
make[2]: *** [bootstrap-emacs] Error 1


Patch looks like:

|diff --git a/src/unexelf.c b/src/unexelf.c index d365940..69b0237 100644 
--- a/src/unexelf.c +++ b/src/unexelf.c @@ -853,11 +853,15 @@ unexec 
(const char *new_name, const char *old_name) when the executable doesn't 
have an sbss section. */ if (old_sbss_index != -1) #endif /* __sgi */ - 
if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz + // This was 
commented out because we are not able to build it + // under PPC64LE. + 
/*if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > 
(old_sbss_index == -1 ? old_bss_addr : round_up (old_bss_addr, 
alignment))) fatal ("Program segment above .bss in %s\n", old_name, 0); 
+ */ + if (NEW_PROGRAM_H (n).p_type == PT_LOAD && (round_up 
((NEW_PROGRAM_H (n)).p_vaddr @@ -866,8 +870,8 @@ unexec (const char 
*new_name, const char *old_name) == round_up (old_bss_addr, alignment))) 
break; } - if (n < 0) - fatal ("Couldn't find segment next to .bss in 
%s\n", old_name, 0); + //if (n < 0) + //fatal ("Couldn't find segment 
next to .bss in %s\n", old_name, 0); /* Make sure that the size includes 
any padding before the old .bss section. */|


And I KNOW that this is TOTALLY wrong and weird workaround, though.

1) binutils-2.23.52.0.1-30.ael7b.ppc64le all works fine and emacs is 
packaged on ppc64le architecture
gcc-4.8.3-9.el7.ppc64le
glibc-2.17-102.el7.ppc64le
2) binutils-2.23.52.0.1-44.el7.ppc64le with "weird" patch I am able to 
packaged emacs on ppc64le architecture
gcc-4.8.3-9.el7.ppc64le
glibc-2.17-85.ael7b.ppc64le

Nowadays with binutils-2.23.52.0.1-54 I am not able to build emacs at all.

What I can do is to add several tracking information like traces which 
can be added to source code during the build.
Any advice would be welcome and I will do it really soon.
Question from my side, how to add traces so that I am able to see data?

I have seen that there were several patches done by Paul Eggert like:
http://git.savannah.gnu.org/cgit/emacs.git/commit/src/unexelf.c?h=emacs-24&id=f269bc61c10320cf020e0751e6643fbbb5f059a2
http://git.savannah.gnu.org/cgit/emacs.git/commit/src/unexelf.c?h=emacs-24&id=5ee94506f6ee4f5142bfeabc9409f95e370d38e3

But I don't think that there are relevant.

Unfortunately I don't have a deep knowledge about ELF and .data or .bss 
segments which are mentioned in file unexelf.c
My colleagues told me if there is any possibility to remove unexelf.c 
file and replace them with "mapping a file with pre-compiled byte code."
But I don't understand it at all. Sorry folks.

I would like to send a patch to upstream for solving it but I don't have 
an idea how.

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com


[-- Attachment #2: Type: text/html, Size: 6842 bytes --]

  reply	other threads:[~2015-09-23 11:00 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  7:56 bug#20614: Segmentation fault when building on Power8 Little Endian Petr Hracek
2015-05-20 14:45 ` Eli Zaretskii
2015-05-20 16:12 ` Glenn Morris
2015-05-21 12:55   ` Petr Hracek
2015-07-13 11:27     ` Petr Hracek
2015-07-13 13:16       ` Andreas Schwab
2015-07-14  7:52         ` Petr Hracek
2015-07-14  8:14           ` Andreas Schwab
2015-09-16 11:28           ` Petr Hracek
2015-09-22 10:17             ` Petr Hracek
2015-09-23  8:06               ` Petr Hracek
2015-09-23  9:34                 ` Eli Zaretskii
2015-09-23 11:00                   ` Petr Hracek [this message]
2015-09-23 11:14                     ` Eli Zaretskii
2015-09-23 12:11                       ` Petr Hracek
2015-09-23 12:23                         ` Eli Zaretskii
2015-09-24 11:04                           ` Petr Hracek
2015-09-24 15:32                             ` Eli Zaretskii
2015-09-24 17:56                               ` Petr Hracek
2015-09-26  7:58                                 ` Eli Zaretskii
2015-09-30 10:39                                   ` Petr Hracek
2015-10-01  7:43                                     ` Eli Zaretskii
2015-10-01  8:46                                       ` Petr Hracek
2015-10-01 11:44                                       ` Petr Hracek
2015-10-01 11:53                                       ` Petr Hracek
2015-10-01 12:22                                         ` Eli Zaretskii
2015-10-01 14:05                                           ` Petr Hracek
2015-10-01 16:01                                             ` Eli Zaretskii
2015-10-02  8:36                                               ` Petr Hracek
2015-10-02  8:49                                                 ` Eli Zaretskii
2015-10-02 12:58                                                   ` Petr Hracek
2015-10-02 13:46                                                     ` Eli Zaretskii
2015-10-05  7:40                                                       ` Petr Hracek
2015-10-05  8:27                                                         ` Eli Zaretskii
2015-10-05  9:16                                                           ` Petr Hracek
2015-10-05  9:39                                                             ` Eli Zaretskii
2015-10-05 11:23                                                               ` Petr Hracek
2015-10-05 11:40                                                                 ` Eli Zaretskii
2015-10-05 14:07                                                                   ` Petr Hracek
2015-10-05 16:52                                                                     ` Eli Zaretskii
2015-10-06  8:41                                                                       ` Petr Hracek
2015-10-06 11:52                                                                         ` Petr Hracek
2015-10-06 14:55                                                                           ` Eli Zaretskii
2015-10-07  8:17                                                                             ` Petr Hracek
2015-10-07 10:56                                                                               ` YAMAMOTO Mitsuharu
2015-10-07 12:26                                                                                 ` Petr Hracek
2015-10-08  0:54                                                                                   ` YAMAMOTO Mitsuharu
2015-10-08 13:27                                                                                     ` Jaromir Capik
2015-10-10  1:40                                                                                       ` YAMAMOTO Mitsuharu
2015-10-10 15:44                                                                                         ` Andreas Schwab
2015-10-13  7:30                                                                                           ` Petr Hracek
2015-10-13  8:30                                                                                             ` Andreas Schwab
2015-10-16 15:24                                                                                               ` Jaromir Capik
2015-10-19  7:20                                                                                                 ` Andreas Schwab
2015-09-23 12:10                   ` Petr Hracek
2015-09-23 12:21                     ` Eli Zaretskii
2015-09-23 13:10                       ` Petr Hracek
2015-09-23 13:38                       ` Petr Hracek
2015-09-23 13:57                         ` Eli Zaretskii
2015-09-23 17:25                           ` Glenn Morris
2015-09-23 17:47               ` Glenn Morris
2015-09-29  8:15                 ` Florian Weimer
2015-07-13 12:17   ` bug#20614: Segmentation fault when building on Power8 Little Endian (ppc64le) Petr Hracek
2015-11-17  1:59 ` bug#20614: alignment problem with recent Emacs unexelf.c changes Paul Eggert
2015-11-17  9:03   ` Alan Modra

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=56028633.3000303@redhat.com \
    --to=phracek@redhat.com \
    --cc=20614@debbugs.gnu.org \
    --cc=eliz@gnu.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.