NetBSD Problem Report #48811

From wiz@yt.nih.at  Wed May 14 15:41:16 2014
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id CCF00A5853
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 14 May 2014 15:41:15 +0000 (UTC)
Message-Id: <20140514153952.C599E2AC0F0@yt.nih.at>
Date: Wed, 14 May 2014 17:39:52 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: running go(1) throws exec format error
X-Send-Pr-Version: 3.95

>Number:         48811
>Category:       pkg
>Synopsis:       running go(1) throws exec format error
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    bsiegert
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 14 15:45:00 +0000 2014
>Closed-Date:    Thu May 15 19:42:25 +0000 2014
>Last-Modified:  Fri May 30 08:20:00 +0000 2014
>Originator:     Thomas Klausner
>Release:        NetBSD 6.99.41
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:


Architecture: x86_64
Machine: amd64
>Description:
go from the go package doesn't run.

The package was built in a sandbox from scratch on 6.99.41,
but it didn't work in 6.99.40 either. Perhaps a gcc-4.8 related problem?

>How-To-Repeat:
/usr/pkg/go/bin> ./go
zsh: exec format error: ./go
/usr/pkg/go/bin> file go
go: ELF 64-bit LSB executable, x86-64, version 1 (NetBSD), dynamically linked (uses shared libs), for NetBSD 5.99, not stripped
>Fix:
No clue.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->bsiegert
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Wed, 14 May 2014 15:52:04 +0000
Responsible-Changed-Why:
Over to maintainer


From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/48811 (running go(1) throws exec format error)
Date: Wed, 14 May 2014 18:23:55 +0200

 gofmt from the same package does not have this problem.
  Thomas

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Thu, 15 May 2014 00:45:32 +0200

 On Wed, May 14, 2014 at 03:45:00PM +0000, Thomas Klausner wrote:
 > >How-To-Repeat:
 > /usr/pkg/go/bin> ./go
 > zsh: exec format error: ./go

 readelf -l go?

 Joerg

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: Joerg Sonnenberger <joerg@britannica.bec.de>
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Thu, 15 May 2014 09:20:13 +0200

 On Wed, May 14, 2014 at 10:50:01PM +0000, Joerg Sonnenberger wrote:
 >  On Wed, May 14, 2014 at 03:45:00PM +0000, Thomas Klausner wrote:
 >  > >How-To-Repeat:
 >  > /usr/pkg/go/bin> ./go
 >  > zsh: exec format error: ./go
 >  
 >  readelf -l go?

 /usr/pkg/go/bin> readelf -l go

 Elf file type is EXEC (Executable file)
 Entry point 0x476d10
 There are 8 program headers, starting at offset 64

 Program Headers:
   Type           Offset             VirtAddr           PhysAddr
                  FileSiz            MemSiz              Flags  Align
   PHDR           0x0000000000000040 0x0000000000400040 0x0000000000400040
                  0x00000000000001c0 0x00000000000001c0  R E    1000
   INTERP         0x0000000000000be9 0x0000000000400be9 0x0000000000400be9
                  0x0000000000000017 0x0000000000000017  R      1
       [Requesting program interpreter: /usr/libexec/ld.elf_so]
   NOTE           0x0000000000000bd0 0x0000000000400bd0 0x0000000000400bd0
                  0x0000000000000019 0x0000000000000019  R      4
   LOAD           0x0000000000000040 0x0000000000400040 0x0000000000400040
                  0x0000000000270030 0x0000000000270030  R E    1000
   LOAD           0x0000000000271000 0x0000000000671000 0x0000000000671000
                  0x00000000004ecc48 0x00000000004ecc48  R      1000
   LOAD           0x000000000075e000 0x0000000000b5e000 0x0000000000b5e000
                  0x0000000000020340 0x0000000000040218  RW     1000
   DYNAMIC        0x000000000075e0c0 0x0000000000b5e0c0 0x0000000000b5e0c0
                  0x0000000000000110 0x0000000000000110  RW     8
   TLS            0x0000000000000000 0x0000000000000000 0x0000000000000000
                  0x0000000000000000 0x0000000000000010  R      8

  Section to Segment mapping:
   Segment Sections...
    00
    01     .interp
    02     .note.netbsd.ident
    03     .text .plt .interp .note.netbsd.ident
    04     .rodata .typelink .gosymtab .gopclntab .gnu.version_r .rela .gnu.version .hash .dynstr .rela.plt .shstrtab .dynsym
    05     .got .got.plt .dynamic .noptrdata .data .bss .noptrbss
    06     .dynamic
    07     .tbss

  Thomas

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: bsiegert@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	Thomas Klausner <wiz@NetBSD.org>
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Thu, 15 May 2014 13:28:23 +0200

 On Thu, May 15, 2014 at 07:25:01AM +0000, Thomas Klausner wrote:
 >    LOAD           0x0000000000000040 0x0000000000400040 0x0000000000400040
 >                   0x0000000000270030 0x0000000000270030  R E    1000
 >    LOAD           0x0000000000271000 0x0000000000671000 0x0000000000671000
 >                   0x00000000004ecc48 0x00000000004ecc48  R      1000
 >    LOAD           0x000000000075e000 0x0000000000b5e000 0x0000000000b5e000
 >                   0x0000000000020340 0x0000000000040218  RW     1000

 That's the problem. We only support two PT_LOAD segments.

 Joerg

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, bsiegert@NetBSD.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, Thomas Klausner <wiz@NetBSD.org>
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Thu, 15 May 2014 08:47:28 -0400

 On May 15,  7:25am, wiz@NetBSD.org (Thomas Klausner) wrote:
 -- Subject: Re: pkg/48811: running go(1) throws exec format error

 | The following reply was made to PR pkg/48811; it has been noted by GNATS.
 | 
 | From: Thomas Klausner <wiz@NetBSD.org>
 | To: gnats-bugs@NetBSD.org
 | Cc: Joerg Sonnenberger <joerg@britannica.bec.de>
 | Subject: Re: pkg/48811: running go(1) throws exec format error
 | Date: Thu, 15 May 2014 09:20:13 +0200
 | 
 |  On Wed, May 14, 2014 at 10:50:01PM +0000, Joerg Sonnenberger wrote:
 |  >  On Wed, May 14, 2014 at 03:45:00PM +0000, Thomas Klausner wrote:
 |  >  > >How-To-Repeat:
 |  >  > /usr/pkg/go/bin> ./go
 |  >  > zsh: exec format error: ./go
 |  >  
 |  >  readelf -l go?
 |  
 |  /usr/pkg/go/bin> readelf -l go
 |  
 |  Elf file type is EXEC (Executable file)
 |  Entry point 0x476d10
 |  There are 8 program headers, starting at offset 64

 The kernel used to be able to only handle 2 load sections.

 christos

From: Masao Uebayashi <uebayasi@gmail.com>
To: Benny Siegert <bsiegert@gmail.com>, Thomas Klausner <wiz@netbsd.org>,
        pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Fri, 16 May 2014 00:06:36 +0900

 I also noticed that .note.netbsd.ident section has size 0x19 instead
 of 0x18.  I suspect go's internal linker has a problem?

 On Thu, May 15, 2014 at 12:45 AM, Thomas Klausner <wiz@netbsd.org> wrote:
 >>Number:         48811
 >>Category:       pkg
 >>Synopsis:       running go(1) throws exec format error
 >>Confidential:   no
 >>Severity:       critical
 >>Priority:       medium
 >>Responsible:    pkg-manager
 >>State:          open
 >>Class:          sw-bug
 >>Submitter-Id:   net
 >>Arrival-Date:   Wed May 14 15:45:00 +0000 2014
 >>Originator:     Thomas Klausner
 >>Release:        NetBSD 6.99.41
 >>Organization:
 > Curiosity is the very basis of education and if you tell me that
 > curiosity killed the cat, I say only that the cat died nobly.
 > - Arnold Edinborough
 >>Environment:
 >
 >
 > Architecture: x86_64
 > Machine: amd64
 >>Description:
 > go from the go package doesn't run.
 >
 > The package was built in a sandbox from scratch on 6.99.41,
 > but it didn't work in 6.99.40 either. Perhaps a gcc-4.8 related problem?
 >
 >>How-To-Repeat:
 > /usr/pkg/go/bin> ./go
 > zsh: exec format error: ./go
 > /usr/pkg/go/bin> file go
 > go: ELF 64-bit LSB executable, x86-64, version 1 (NetBSD), dynamically linked (uses shared libs), for NetBSD 5.99, not stripped
 >>Fix:
 > No clue.
 >
 >>Unformatted:
 >
 >

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Thu, 15 May 2014 20:36:36 +0200

 I've tried the latest hg version of go -- it works (except for one
 self-test).

 I've summed up the findings and written to the golang-dev mailing
 list, see

 https://groups.google.com/forum/#!topic/golang-dev/VhYzkwIHyDE

 Thanks for your help!
  Thomas

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, bsiegert@NetBSD.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, Thomas Klausner <wiz@NetBSD.org>
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Thu, 15 May 2014 15:36:01 -0400

 On May 15,  6:40pm, wiz@NetBSD.org (Thomas Klausner) wrote:
 -- Subject: Re: pkg/48811: running go(1) throws exec format error

 | The following reply was made to PR pkg/48811; it has been noted by GNATS.
 | 
 | From: Thomas Klausner <wiz@NetBSD.org>
 | To: gnats-bugs@NetBSD.org
 | Cc: 
 | Subject: Re: pkg/48811: running go(1) throws exec format error
 | Date: Thu, 15 May 2014 20:36:36 +0200
 | 
 |  I've tried the latest hg version of go -- it works (except for one
 |  self-test).
 |  
 |  I've summed up the findings and written to the golang-dev mailing
 |  list, see
 |  
 |  https://groups.google.com/forum/#!topic/golang-dev/VhYzkwIHyDE
 |  

 I just fixed it.

 christos

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 15 May 2014 19:42:25 +0000
State-Changed-Why:
Christos fixed the problem. Thanks, Christos!


From: Masao Uebayashi <uebayasi@gmail.com>
To: gnats-bugs@netbsd.org
Cc: bsiegert@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	Thomas Klausner <wiz@netbsd.org>
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Fri, 16 May 2014 10:53:30 +0900

 What changed behavior?  NetBSD?  Go?  GCC?

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, bsiegert@NetBSD.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, Thomas Klausner <wiz@NetBSD.org>
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Fri, 16 May 2014 12:05:28 -0400

 On May 16,  1:55am, uebayasi@gmail.com (Masao Uebayashi) wrote:
 -- Subject: Re: pkg/48811: running go(1) throws exec format error

 | The following reply was made to PR pkg/48811; it has been noted by GNATS.
 | 
 | From: Masao Uebayashi <uebayasi@gmail.com>
 | To: gnats-bugs@netbsd.org
 | Cc: bsiegert@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
 | 	Thomas Klausner <wiz@netbsd.org>
 | Subject: Re: pkg/48811: running go(1) throws exec format error
 | Date: Fri, 16 May 2014 10:53:30 +0900
 | 
 |  What changed behavior?  NetBSD?  Go?  GCC?

 Gcc 4.8 stopped putting notes at a % 4 address. The note generating code
 in go was buggy and created notes with inconsistent size in that case.
 Also the note generating code in go was using voodoo to figure out the note
 size (getting it right, but using the wrong calculation).
 The NetBSD kernel was changed recently to be pickier about notes than before.

 christos

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Sat, 17 May 2014 04:50:07 +0000

 On Thu, May 15, 2014 at 11:30:00AM +0000, Joerg Sonnenberger wrote:
  > On Thu, May 15, 2014 at 07:25:01AM +0000, Thomas Klausner wrote:
  > >    LOAD           0x0000000000000040 0x0000000000400040 0x0000000000400040
  > >                   0x0000000000270030 0x0000000000270030  R E    1000
  > >    LOAD           0x0000000000271000 0x0000000000671000 0x0000000000671000
  > >                   0x00000000004ecc48 0x00000000004ecc48  R      1000
  > >    LOAD           0x000000000075e000 0x0000000000b5e000 0x0000000000b5e000
  > >                   0x0000000000020340 0x0000000000040218  RW     1000
  >  
  >  That's the problem. We only support two PT_LOAD segments.

 Doesn't emacs normally have three?

 -- 
 David A. Holland
 dholland@netbsd.org

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48811: running go(1) throws exec format error
Date: Fri, 30 May 2014 08:17:05 +0000

 not sent to gnats

    ------

 From: Masao Uebayashi <uebayasi@gmail.com>
 To: Benny Siegert <bsiegert@gmail.com>, Thomas Klausner <wiz@netbsd.org>,
 	pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
 Subject: Re: pkg/48811: running go(1) throws exec format error
 Date: Fri, 16 May 2014 00:06:36 +0900

 I also noticed that .note.netbsd.ident section has size 0x19 instead
 of 0x18.  I suspect go's internal linker has a problem?

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.