NetBSD Problem Report #39182
From oster@scrooge.localdomain Mon Jul 21 14:46:52 2008
Return-Path: <oster@scrooge.localdomain>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 236F563BD06
for <gnats-bugs@gnats.NetBSD.org>; Mon, 21 Jul 2008 14:46:52 +0000 (UTC)
Message-Id: <20080721144651.35E2D113FCD@scrooge.localdomain>
Date: Mon, 21 Jul 2008 08:46:51 -0600 (CST)
From: oster@netbsd.org
Reply-To: oster@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: vax port fails to build 20080715 -current sources
X-Send-Pr-Version: 3.95
>Number: 39182
>Category: port-vax
>Synopsis: vax port fails to build 20080715 -current
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: mhitch
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jul 21 14:50:00 +0000 2008
>Closed-Date: Tue May 05 18:33:53 +0000 2009
>Last-Modified: Tue May 05 18:33:53 +0000 2009
>Originator: oster@netbsd.org
>Release: NetBSD 4.99.70
>Organization:
>Environment:
System: NetBSD floyd 4.99.70 NetBSD 4.99.70 (GENERIC) #0: Sat Jul 19 00:35:03 CST 2008 oster@thog:/b1/vax/src/sys/arch/vax/compile/obj/GENERIC vax
Architecture: vax
Machine: vax
>Description:
Attempt to build 20080715 -current from source on a vax using cross-built
binaries from 20080715 sources. Watch the build go up in flames
thusly:
...
chmod +x grog
Making grog.n from /build/b/src/gnu/dist/groff/src/roff/grog/grog.man
mkdir src/roff/nroff
rm -f nroff
sed -f /build/b/src/tools/groff/build/arch/misc/shdeps.sed -e 1s/a/a/ -e "s|@VERSION@|1.19.2|" /build/b/src/gnu/dist/groff/src/roff/nroff/nroff.sh >nroff
chmod +x nroff
Making nroff.n from /build/b/src/gnu/dist/groff/src/roff/nroff/nroff.man
GROFF_COMMAND_PREFIX=''; export GROFF_COMMAND_PREFIX; GROFF_BIN_PATH=`echo /build/b/src/tools/groff/build/src/roff/groff /build/b/src/tools/groff/build/src/roff/troff /build/b/src/tools/groff/build/src/preproc/pic /build/b/src/tools/groff/build/src/preproc/eqn /build/b/src/tools/groff/build/src/preproc/tbl /build/b/src/tools/groff/build/src/preproc/grn /build/b/src/tools/groff/build/src/preproc/refer /build/b/src/tools/groff/build/src/preproc/soelim /build/b/src/tools/groff/build/src/preproc/html /build/b/src/tools/groff/build/src/devices/grops /build/b/src/tools/groff/build/src/devices/grohtml | sed -e 's| *|:|g'`; export GROFF_BIN_PATH; sed -e "s;@VERSION@;1.19.2;" /build/b/src/gnu/dist/groff/doc/meref.me | /build/b/src/tools/groff/build/src/roff/groff/groff -M/build/b/src/tools/groff/build/tmac -M/build/b/src/tools/groff/../../gnu/dist/groff/tmac -F/build/b/src/tools/groff/build/font -F/build/b/src/tools/groff/../../gnu/dist/groff/font -Upet -ww -Tps -ge -m
e >meref.ps
pic: Unsupported relocation type 168 in non-PLT relocations
grops: Unsupported relocation type 136 in non-PLT relocations
/build/b/src/tools/groff/build/src/roff/groff/groff: grn: Segmentation fault
*** Failed target: meref.ps
*** Failed command: GROFF_COMMAND_PREFIX=''; export GROFF_COMMAND_PREFIX; GROFF_BIN_PATH=`echo /build/b/src/tools/groff/build/src/roff/groff /build/b/src/tools/groff/build/src/roff/troff /build/b/src/tools/groff/build/src/preproc/pic /build/b/src/tools/groff/build/src/preproc/eqn /build/b/src/tools/groff/build/src/preproc/tbl /build/b/src/tools/groff/build/src/preproc/grn /build/b/src/tools/groff/build/src/preproc/refer /build/b/src/tools/groff/build/src/preproc/soelim /build/b/src/tools/groff/build/src/preproc/html /build/b/src/tools/groff/build/src/devices/grops /build/b/src/tools/groff/build/src/devices/grohtml | sed -e 's| *|:|g'`; export GROFF_BIN_PATH; sed -e "s;@VERSION@;1.19.2;" /build/b/src/gnu/dist/groff/doc/meref.me | /build/b/src/tools/groff/build/src/roff/groff/groff -M/build/b/src/tools/groff/build/tmac -M/build/b/src/tools/groff/../../gnu/dist/groff/tmac -F/build/b/src/tools/groff/build/font -F/build/b/src/tools/groff/../../gnu/dist/groff/font -Upet -ww -Tps -g
e -me >meref.ps
*** Error code 3
Stop.
nbmake: stopped in /build/b/src/tools/groff/build/doc
...
>How-To-Repeat:
extract 20080715 -current sources into /build/b/ and do:
./build.sh -U -u -o -m vax -D /build/b/install \
-R /build/b/release -T /build/b/tools release
machine used for build:
VAXstation 4000/60
total memory = 32372 KB
avail memory = 28200 KB
timecounter: Timecounters tick every 10.000 msec
mainbus0 (root)
cpu0 at mainbus0: KA46, Mariah, 2KB L1 cache, 256KB L2 cache
vsbus0 at mainbus0
vsbus0: 32K entry DMA SGMAP at PA 0x420000 (VA 0x80420000)
vsbus0: interrupt mask 0
w/ 200MB of swap available.
>Fix:
unknown.
>Release-Note:
>Audit-Trail:
From: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
To: gnats-bugs@NetBSD.org
Cc: port-vax-maintainer@netbsd.org
Subject: Re: port-vax/39182: vax port fails to build 20080715 -current sources
Date: Fri, 13 Feb 2009 12:29:03 -0700 (MST)
On Mon, 21 Jul 2008, oster@netbsd.org wrote:
>> Synopsis: vax port fails to build 20080715 -current
...
> Making nroff.n from /build/b/src/gnu/dist/groff/src/roff/nroff/nroff.man
> GROFF_COMMAND_PREFIX=''; export GROFF_COMMAND_PREFIX; GROFF_BIN_PATH=`echo /build/b/src/tools/groff/build/src/roff/groff /build/b/src/tools/groff/build/src/roff/troff /build/b/src/tools/groff/build/src/preproc/pic /build/b/src/tools/groff/build/src/preproc/eqn /build/b/src/tools/groff/build/src/preproc/tbl /build/b/src/tools/groff/build/src/preproc/grn /build/b/src/tools/groff/build/src/preproc/refer /build/b/src/tools/groff/build/src/preproc/soelim /build/b/src/tools/groff/build/src/preproc/html /build/b/src/tools/groff/build/src/devices/grops /build/b/src/tools/groff/build/src/devices/grohtml | sed -e 's| *|:|g'`; export GROFF_BIN_PATH; sed -e "s;@VERSION@;1.19.2;" /build/b/src/gnu/dist/groff/doc/meref.me | /build/b/src/tools/groff/build/src/roff/groff/groff -M/build/b/src/tools/groff/build/tmac -M/build/b/src/tools/groff/../../gnu/dist/groff/tmac -F/build/b/src/tools/groff/build/font -F/build/b/src/tools/groff/../../gnu/dist/groff/font -Upet -ww -Tps -ge
-m
> e >meref.ps
> pic: Unsupported relocation type 168 in non-PLT relocations
> grops: Unsupported relocation type 136 in non-PLT relocations
>
>
> /build/b/src/tools/groff/build/src/roff/groff/groff: grn: Segmentation fault
This problem is still occuring with the HEAD branch as well as the
netbsd-5 branch.
In addition, a simliar thing can occur on the cross-built binaries.
I've been testing NetBSD-5_* and ran into a problem building a package
that used troff. The troff binary I built on my amd64 system had the same
problem.
Checking the netbsd-5_RC1 and netbsd-5_RC2 autobuilds shows that both
builds (I think also on amd64) have the same problem.
From the RC1 autobuild:
vlc1$ readelf -r usr-RC1/bin/troff|grep -3 unrec
0006feac 00015214 R_VAX_GLOB_DAT 0006ed5c _ZTV12hmotion_node + 0
0006feb0 00015314 R_VAX_GLOB_DAT 0007587c env_dictionary + 0
0006feb4 00015414 R_VAX_GLOB_DAT 000758b4 language_dictionary + 0
08439dc8 08439e08 unrecognized: 8 bad symbol index: 0008439e
Relocation section '.rela.plt' at offset 0x4280 contains 71 entries:
Offset Info Type Sym.Value Sym. Name + Addend
From the RC2 autobuild:
vlc1$ readelf -r usr-RC2/bin/troff|grep -3 unrec
0006fc64 00007d14 R_VAX_GLOB_DAT 0006d75c _ZTV9nargs_reg + 0
0006fc68 00007e14 R_VAX_GLOB_DAT 0006d284 _ZTV15macro_diversion + 0
0006fc6c 00007f14 R_VAX_GLOB_DAT 00075880 curdiv + 0
fd9838d0 00007f7f unrecognized: 7f 00075880 curdiv + fd983da0
0006fc70 00008014 R_VAX_GLOB_DAT 0007696c font_dictionary + 0
0006fc74 00008114 R_VAX_GLOB_DAT 0006d06c _ZTV17page_ejecting_re + 0
0006fc78 00008214 R_VAX_GLOB_DAT 00076088 _ZN8charinfo10next_ind + 0
And from my build:
vlc1$ readelf -r /usr/bin/troff|grep -3 unrec
0006fbe8 00007d14 R_VAX_GLOB_DAT 0006d6e0 _ZTV9nargs_reg + 0
0006fbec 00007e14 R_VAX_GLOB_DAT 0006d208 _ZTV15macro_diversion + 0
0006fbf0 00007f14 R_VAX_GLOB_DAT 00075800 curdiv + 0
fd9838d0 00007f7f unrecognized: 7f 00075800 curdiv + fd983da0
0006fbf4 00008014 R_VAX_GLOB_DAT 000768ec font_dictionary + 0
0006fbf8 00008114 R_VAX_GLOB_DAT 0006cff0 _ZTV17page_ejecting_re + 0
0006fbfc 00008214 R_VAX_GLOB_DAT 00076008 _ZN8charinfo10next_ind + 0
My build was (probably) from sources between RC1 and RC2, but I'm not
sure why the addresses or so different between my build and the RC2 build.
I don't think I have any build options set or changes that should affect
how troff gets built.
The two tools that fail on the native vax build shows the same type of
problem:
vlc1$ readelf -r tools.vax/lib/groff/pic|grep -1 unrec
00050c18 00006713 R_VAX_COPY 00050c18 _ZTVN10__cxxabiv117__c + 0
7f3adc28 7f3076a8 unrecognized: a8 bad symbol index: 007f3076
vlc1$ readelf -r tools.vax/lib/groff/grops|grep -1 unrec
0003b980 00005d13 R_VAX_COPY 0003b980 _ZTVN10__cxxabiv117__c + 0
7f389548 7f389f88 unrecognized: 88 bad symbol index: 007f389f
I guess the next step would be to figure out where the relocation
entries are done in 'ld' and start adding code to check for valid entries
and try to figure out where they are coming from and why they are
occuring.
--
Michael L. Hitch mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University Bozeman, MT USA
From: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
To: gnats-bugs@NetBSD.org
Cc: port-vax-maintainer@netbsd.org
Subject: Re: port-vax/39182: vax port fails to build 20080715 -current sources
Date: Fri, 13 Feb 2009 21:15:10 -0700 (MST)
On Fri, 13 Feb 2009, Michael L. Hitch wrote:
> Checking the netbsd-5_RC1 and netbsd-5_RC2 autobuilds shows that both
> builds (I think also on amd64) have the same problem.
A vax build on i386 resulted in an executable file. The only difference
in the relocation entries is that the good file has a R_VAX_NONE at the
beginning instead of the garbage entry later:
==> /tmp/troff.net3 <==
Relocation section '.rela.dyn' at offset 0x35b4 contains 273 entries:
Offset Info Type Sym.Value Sym. Name + Addend
00000000 00000000 R_VAX_NONE 00000000
00074d88 00000114 R_VAX_GLOB_DAT 0007c6a8 csdigit + 0
00074d8c 00000214 R_VAX_GLOB_DAT 000722e8 _ZTV19constant_vunits_ + 0
00074d90 00000314 R_VAX_GLOB_DAT 0007520c _ZN11input_stack3topE + 0
00074d94 00000414 R_VAX_GLOB_DAT 00072438 _ZTV21vertical_positio + 0
00074d98 00000614 R_VAX_GLOB_DAT 0007c38c _ZN4font5sizesE + 0
00074d9c 00000714 R_VAX_GLOB_DAT 000724c8 _ZTV9diversion + 0
==> /tmp/troff.vlc <==
Relocation section '.rela.dyn' at offset 0x35b4 contains 273 entries:
Offset Info Type Sym.Value Sym. Name + Addend
0006fa60 00000114 R_VAX_GLOB_DAT 00077380 csdigit + 0
0006fa64 00000214 R_VAX_GLOB_DAT 0006cfc0 _ZTV19constant_vunits_ + 0
0006fa68 00000314 R_VAX_GLOB_DAT 0006fee4 _ZN11input_stack3topE + 0
0006fa6c 00000414 R_VAX_GLOB_DAT 0006d110 _ZTV21vertical_positio + 0
0006fa70 00000614 R_VAX_GLOB_DAT 00077064 _ZN4font5sizesE + 0
0006fa74 00000714 R_VAX_GLOB_DAT 0006d1a0 _ZTV9diversion + 0
0006fa78 00000814 R_VAX_GLOB_DAT 00077280 cslower + 0
A vax build on an alpha also shows the same R_VAX_NONE entry. If the
R_VAX_NONE is a valid entry, something is corrupting that on the amd64
cross-build of troff, and the native build of pic and grops.
The relocation entries of the amd64 cross-build of pic and grops show
the same R_VAX_NONE entry:
vlc$ readelf -r /usr/bin/pic|head
Relocation section '.rela.dyn' at offset 0x1d08 contains 122 entries:
Offset Info Type Sym.Value Sym. Name + Addend
00000000 00000000 R_VAX_NONE 00000000
00052788 00000114 R_VAX_GLOB_DAT 00053c0c csdigit + 0
0005278c 00000214 R_VAX_GLOB_DAT 00052f88 old_context_buffer + 0
00052790 00000414 R_VAX_GLOB_DAT 00053b0c cslower + 0
00052794 00000714 R_VAX_GLOB_DAT 00052c7c safer_flag + 0
00052798 00000914 R_VAX_GLOB_DAT 0005430c cscntrl + 0
0005279c 00000b14 R_VAX_GLOB_DAT 0005420c csgraph + 0
vlc$ readelf -r /usr/bin/grops|head
Relocation section '.rela.dyn' at offset 0x19f8 contains 105 entries:
Offset Info Type Sym.Value Sym. Name + Addend
00000000 00000000 R_VAX_NONE 00000000
0003f59c 00000114 R_VAX_GLOB_DAT 00041008 csdigit + 0
0003f5a0 00000314 R_VAX_GLOB_DAT 00040cf0 _ZN4font5sizesE + 0
0003f5a4 00000414 R_VAX_GLOB_DAT 00040f08 cslower + 0
0003f5a8 00000714 R_VAX_GLOB_DAT 00041708 cscntrl + 0
0003f5ac 00000814 R_VAX_GLOB_DAT 0003f894 version_string + 0
0003f5b0 00000914 R_VAX_GLOB_DAT 0004010c use_short_postfix + 0
--
Michael L. Hitch mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University Bozeman, MT USA
From: David Holland <dholland-bugs@netbsd.org>
To: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
Cc: port-vax-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, oster@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: port-vax/39182: vax port fails to build 20080715 -current
sources
Date: Sat, 21 Feb 2009 07:57:35 +0000
On Sat, Feb 14, 2009 at 04:20:03AM +0000, Michael L. Hitch wrote:
> A vax build on an alpha also shows the same R_VAX_NONE entry. If the
> R_VAX_NONE is a valid entry, something is corrupting that on the amd64
> cross-build of troff, and the native build of pic and grops.
In general tables in ELF files are supposed to have a blanked out/null
entry at the beginning, so that's probably the problem.
--
David A. Holland
dholland@netbsd.org
From: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
To: David Holland <dholland-bugs@netbsd.org>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-vax/39182: vax port fails to build 20080715 -current sources
Date: Sun, 22 Feb 2009 14:42:39 -0700 (MST)
On Sat, 21 Feb 2009, David Holland wrote:
> In general tables in ELF files are supposed to have a blanked out/null
> entry at the beginning, so that's probably the problem.
Are you sure about that? Most executables don't have that, and the ones
that do appear to only be c++ programs from the few I looked at.
--
Michael L. Hitch mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University Bozeman, MT USA
From: David Holland <dholland-bugs@netbsd.org>
To: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
Cc: David Holland <dholland-bugs@netbsd.org>, gnats-bugs@netbsd.org
Subject: Re: port-vax/39182: vax port fails to build 20080715 -current
sources
Date: Tue, 24 Mar 2009 21:13:44 +0000
On Sun, Feb 22, 2009 at 02:42:39PM -0700, Michael L. Hitch wrote:
>> In general tables in ELF files are supposed to have a blanked out/null
>> entry at the beginning, so that's probably the problem.
>
> Are you sure about that? Most executables don't have that, and the ones
> that do appear to only be c++ programs from the few I looked at.
Reasonably, but it's been a while since I looked at ELF docs.
--
David A. Holland
dholland@netbsd.org
From: "Michael L. Hitch" <mhitch@lightning.msu.montana.edu>
To: gnats-bugs@NetBSD.org
Cc: oster@netbsd.org
Subject: Re: port-vax/39182: vax port fails to build 20080715 -current sources
Date: Mon, 4 May 2009 11:15:18 -0600 (MDT)
On Fri, 13 Feb 2009, Michael L. Hitch wrote:
> I guess the next step would be to figure out where the relocation
> entries are done in 'ld' and start adding code to check for valid entries
> and try to figure out where they are coming from and why they are
> occuring.
I found a fairly simple test case for a native vax compile - addftinfo.
It links addftinfo.o, version.o, and libgroff.a with some shared libraries
and resulted in a bad relocation.
I looked at the elf32-vax.c file for libbfd, and started adding some
debug output. I found that it allocates space for the relocation section,
and later outputs the relocations, but did not output all the slots that
had been allocated. Since it was using bfd_alloc(), that left a possible
garbage entry at the end. By changing that to bfd_zalloc(), the unused
relocation entry shows up as R_VAX_NONE. I haven't determined what
particular relocation is allocated but not used yet. I see that a number
of other elf32-* files do the same thing.
--
Michael L. Hitch mhitch@montana.edu
Computer Consultant
Information Technology Center
Montana State University Bozeman, MT USA
Responsible-Changed-From-To: port-vax-maintainer->mhitch
Responsible-Changed-By: mhitch@NetBSD.org
Responsible-Changed-When: Mon, 04 May 2009 17:58:12 +0000
Responsible-Changed-Why:
I'm taking it.
State-Changed-From-To: open->analyzed
State-Changed-By: mhitch@NetBSD.org
State-Changed-When: Mon, 04 May 2009 17:58:12 +0000
State-Changed-Why:
I've figured out where the problem is.
From: "Michael L. Hitch" <mhitch@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39182 CVS commit: src/gnu/dist/binutils/bfd
Date: Mon, 4 May 2009 17:56:36 +0000
Module Name: src
Committed By: mhitch
Date: Mon May 4 17:56:36 UTC 2009
Modified Files:
src/gnu/dist/binutils/bfd: elf32-vax.c
Log Message:
Allocate relocation section using bfd_zalloc() to ensure no garbage
relocations when not all the entries are used. Fixes PR port-vax/39182.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/gnu/dist/binutils/bfd/elf32-vax.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: analyzed->pending-pullups
State-Changed-By: mhitch@NetBSD.org
State-Changed-When: Tue, 05 May 2009 17:28:22 +0000
State-Changed-Why:
pullup to netbsd-5 branches requested - ticket #738
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39182 CVS commit: [netbsd-5] src/gnu/dist/binutils/bfd
Date: Tue, 5 May 2009 18:23:10 +0000
Module Name: src
Committed By: bouyer
Date: Tue May 5 18:23:10 UTC 2009
Modified Files:
src/gnu/dist/binutils/bfd [netbsd-5]: elf32-vax.c
Log Message:
Pull up following revision(s) (requested by mhitch in ticket #738):
gnu/dist/binutils/bfd/elf32-vax.c: revision 1.9
Allocate relocation section using bfd_zalloc() to ensure no garbage
relocations when not all the entries are used. Fixes PR port-vax/39182.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.18.1 src/gnu/dist/binutils/bfd/elf32-vax.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39182 CVS commit: [netbsd-5-0] src/gnu/dist/binutils/bfd
Date: Tue, 5 May 2009 18:24:10 +0000
Module Name: src
Committed By: bouyer
Date: Tue May 5 18:24:09 UTC 2009
Modified Files:
src/gnu/dist/binutils/bfd [netbsd-5-0]: elf32-vax.c
Log Message:
Pull up following revision(s) (requested by mhitch in ticket #738):
gnu/dist/binutils/bfd/elf32-vax.c: revision 1.9
Allocate relocation section using bfd_zalloc() to ensure no garbage
relocations when not all the entries are used. Fixes PR port-vax/39182.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.20.1 src/gnu/dist/binutils/bfd/elf32-vax.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: mhitch@NetBSD.org
State-Changed-When: Tue, 05 May 2009 18:33:53 +0000
State-Changed-Why:
Fixed it and now pulled up into the netbsd-5 and netbsd-5-0 branches.
>Unformatted:
(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.