GNU bug report logs - #39817
Using cross compiled .go from amd64 to powerpc64 segfaults

Previous Next

Package: guile;

Reported by: dftxbs3e <dftxbs3e <at> free.fr>

Date: Fri, 28 Feb 2020 01:08:01 UTC

Severity: normal

Done: Chris Marusich <cmmarusich <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39817 in the body.
You can then email your comments to 39817 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#39817; Package guile. (Fri, 28 Feb 2020 01:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to dftxbs3e <dftxbs3e <at> free.fr>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Fri, 28 Feb 2020 01:08:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dftxbs3e <dftxbs3e <at> free.fr>
To: bug-guile <at> gnu.org
Subject: Using cross compiled .go from amd64 to powerpc64 segfaults
Date: Fri, 28 Feb 2020 02:07:12 +0100
[Message part 1 (text/plain, inline)]
Hello!

I built GNU Guix's `bootstrap-tarballs` package which includes Guile 2.2
with `guix build --target=powerpc64-linux-gnu bootstrap-tarballs` and
when I run that compiled Guile on powerpc64, it crashes.

I tried replacing the .go files with natively built ones and it works,
with the same cross compiled copy of the GNU Guile binaries.

I used this GNU Guix's tree:

https://gitlab.com/lle-bout/guix - commit
f47e761a10675b05b07107035d5024618267a3ad

And bootstrap binaries are:

https://gitlab.com/lle-bout/guix-bootstrap/-/commit/8e464405c0ba76b29e11c3b60af4d6ea9c83c188

After that copy of GNU Guix is built, to experience the crash you can
run on a powerpc64 machine:

./pre-inst-env guix build hello

And it will try to run the bootstrap GNU Guile after some time and segfault.

Let me know if I can help in any way with this!

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#39817; Package guile. (Thu, 21 May 2020 07:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 39817 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: dftxbs3e <dftxbs3e <at> free.fr>
Cc: 39817 <at> debbugs.gnu.org
Subject: Re: bug#39817: Using cross compiled .go from amd64 to powerpc64
 segfaults
Date: Thu, 21 May 2020 00:06:35 -0700
[Message part 1 (text/plain, inline)]
Hi,

dftxbs3e <dftxbs3e <at> free.fr> writes:

> I built GNU Guix's `bootstrap-tarballs` package which includes Guile 2.2
> with `guix build --target=powerpc64-linux-gnu bootstrap-tarballs` and
> when I run that compiled Guile on powerpc64, it crashes.
>
> I tried replacing the .go files with natively built ones and it works,
> with the same cross compiled copy of the GNU Guile binaries.
>
> I used this GNU Guix's tree:
>
> https://gitlab.com/lle-bout/guix - commit
> f47e761a10675b05b07107035d5024618267a3ad
>
> And bootstrap binaries are:
>
> https://gitlab.com/lle-bout/guix-bootstrap/-/commit/8e464405c0ba76b29e11c3b60af4d6ea9c83c188
>
> After that copy of GNU Guix is built, to experience the crash you can
> run on a powerpc64 machine:
>
> ./pre-inst-env guix build hello
>
> And it will try to run the bootstrap GNU Guile after some time and segfault.

What was the architecture of the system on which you ran the command
"guix build --target=powerpc64-linux-gnu bootstrap-tarballs"?  That may
help me reproduce the issue.

Can you remind me why bootstrap-tarballs uses Guile 2.2?  Is there any
possibility we can use Guile 3 instead?  Maybe doing so could work
around this problem.  Or maybe I'm just confused.  :-)

It sounds like you're saying that one could reproduce this issue by
doing the following:

- Do a "guix pull" to install Guix commit
  f47e761a10675b05b07107035d5024618267a3ad (from your repo).

- Use this newly pulled Guix to build the bootstrap binaries:

    guix build --target=powerpc64-linux-gnu bootstrap-tarballs

- This should produce the same binaries that are found here:

  https://gitlab.com/lle-bout/guix-bootstrap/-/commit/8e464405c0ba76b29e11c3b60af4d6ea9c83c188

- Update the Guix source so that Guix will use those newly built
  bootstrap binaries (it looks like you did this in commit
  bb7d8f3b2ec469c6b3f460e4731871e8e2314dc4 in your repo).

- On a POWER9 machine, get the new Guix source (e.g., commit
  bb7d8f3b2ec469c6b3f460e4731871e8e2314dc4 from your repo), and build
  Guix from source using the foreign distribution's native libraries
  (i.e., build Guix without using Guix, since it isn't available yet on
  POWER9).

- Once you've built Guix in your local checkout, run "./pre-inst-env
  guix build hello" to observe the crash.

Is that basically right?

I will try to reproduce this and poke at it a bit.  Please let me know
if I have misunderstood anything.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#39817; Package guile. (Sun, 24 May 2020 07:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 39817 <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: dftxbs3e <dftxbs3e <at> free.fr>
Cc: 39817 <at> debbugs.gnu.org
Subject: Re: bug#39817: Using cross compiled .go from amd64 to powerpc64
 segfaults
Date: Sun, 24 May 2020 00:56:46 -0700
[Message part 1 (text/plain, inline)]
Chris Marusich <cmmarusich <at> gmail.com> writes:

> What was the architecture of the system on which you ran the command
> "guix build --target=powerpc64-linux-gnu bootstrap-tarballs"?  That may
> help me reproduce the issue.

I realize that the answer to my question was in the subject of your bug
report.  You said you built these on an amd64 system.  That's the same
architecture as my system.

I think I was able to reproduce the bug.  First, like you suggested, I
built Guix using commit f47e761a10675b05b07107035d5024618267a3ad (from
your repo).  Then I ran:

  guix build --target=powerpc64-linux-gnu bootstrap-tarballs

I found guile-static-stripped-2.2.6-powerpc64-linux-gnu.tar.xz in the
output of that build.  I extracted it and used qemu-ppc64 to run it,
which produced a segfault:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/dilkq36pawdqh050gd09d1incskpqjj7-qemu-5.0.0/bin/qemu-ppc64 bin/guile 
guile: warning: failed to install locale
Segmentation fault (core dumped)
--8<---------------cut here---------------end--------------->8---

I wonder if this is the same segfault you're seeing?

I had to use QEMU because I don't have a powerpc64 system.  Maybe this
will enable me to debug further, even though I don't have any powerpc64
hardware.  I will keep investigating.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

Reply sent to Chris Marusich <cmmarusich <at> gmail.com>:
You have taken responsibility. (Tue, 02 Jun 2020 00:56:01 GMT) Full text and rfc822 format available.

Notification sent to dftxbs3e <dftxbs3e <at> free.fr>:
bug acknowledged by developer. (Tue, 02 Jun 2020 00:56:01 GMT) Full text and rfc822 format available.

Message #16 received at 39817-close <at> debbugs.gnu.org (full text, mbox):

From: Chris Marusich <cmmarusich <at> gmail.com>
To: dftxbs3e <dftxbs3e <at> free.fr>
Cc: 39817-close <at> debbugs.gnu.org
Subject: Re: bug#39817: Using cross compiled .go from amd64 to powerpc64
 segfaults
Date: Mon, 01 Jun 2020 17:55:09 -0700
[Message part 1 (text/plain, inline)]
Hi,

Using a recent version of Guix, the segfault no longer occurs.  I'm
closing this bug report.

-- 
Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 30 Jun 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.