Bug 233733 - Possible build race: crtbeginS.o: invalid string offset
Summary: Possible build race: crtbeginS.o: invalid string offset
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Andrew Turner
URL: https://reviews.freebsd.org/D18428
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-02 21:08 UTC by Li-Wen Hsu
Modified: 2019-09-16 17:32 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable12+
koobs: mfc-stable11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer freebsd_triage 2018-12-02 21:08:54 UTC
Failed runs:

https://ci.freebsd.org/job/FreeBSD-head-powerpc-build/8655/console
https://ci.freebsd.org/job/FreeBSD-head-mips64-build/5256/console
https://ci.freebsd.org/job/FreeBSD-head-mips-build/5314/console
https://ci.freebsd.org/job/FreeBSD-head-mips-build/5347/console

Console output:

00:03:44.800 --- cddl/lib__L ---
00:03:44.800 /usr/obj/usr/src/powerpc.powerpc/tmp/usr/bin/ld: /usr/obj/usr/src/powerpc.powerpc/tmp/usr/lib/crtbeginS.o: invalid string offset 1852112942 >= 253 for section `.strtab'
00:03:44.800 /usr/obj/usr/src/powerpc.powerpc/tmp/usr/bin/ld: /usr/obj/usr/src/powerpc.powerpc/tmp/usr/lib/crtbeginS.o: invalid string offset 1936916526 >= 253 for section `.strtab'
00:03:44.800 /usr/obj/usr/src/powerpc.powerpc/tmp/usr/bin/ld: /usr/obj/usr/src/powerpc.powerpc/tmp/usr/lib/crtbeginS.o: invalid string offset 1701060707 >= 253 for section `.strtab'
00:03:44.800 /usr/obj/usr/src/powerpc.powerpc/tmp/usr/bin/ld: /usr/obj/usr/src/powerpc.powerpc/tmp/usr/lib/crtbeginS.o: invalid string offset 1852112942 >= 253 for section `.strtab'

...

00:03:44.821 --- cddl/lib__L ---
00:03:44.821 cc: Internal error: Segmentation fault (program ld)
00:03:44.821 Please submit a full bug report.
00:03:44.821 See <URL:http://www.freebsd.org/support.html> for instructions.
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2018-12-04 07:45:14 UTC
https://ci.freebsd.org/job/FreeBSD-head-mips-build/5374/console

With slightly different log:

00:04:50.042 --- kerberos5/lib__L ---
00:04:50.042 --- libgssapi_spnego.so.10.full ---
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: /usr/obj/usr/src/mips.mips/tmp/usr/lib/crtbeginS.o: invalid string offset 1852252277 >= 166 for section `.strtab'
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: /usr/obj/usr/src/mips.mips/tmp/usr/lib/crtbeginS.o: invalid string offset 1852252277 >= 166 for section `.strtab'
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: /usr/obj/usr/src/mips.mips/tmp/usr/lib/crtbeginS.o: invalid string offset 1852252277 >= 166 for section `.strtab'
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: /usr/obj/usr/src/mips.mips/tmp/usr/lib/crtbeginS.o: invalid string offset 1852252277 >= 166 for section `.strtab'
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: BFD 2.17.50 [FreeBSD] 2007-07-03 assertion fail /usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elfxx-mips.c:4197
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: BFD 2.17.50 [FreeBSD] 2007-07-03 assertion fail /usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elfxx-mips.c:4197
00:04:50.042 --- lib__L ---
00:04:50.042 --- realinstall_subdir_lib/libcompiler_rt ---
00:04:50.042 sh /usr/src/tools/install.sh  -C -o root -g wheel -m 444   libcompiler_rt.a /usr/obj/usr/src/mips.mips/tmp/usr/lib/
00:04:50.042 --- kerberos5/lib__L ---
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: not enough GOT space for local GOT entries
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: BFD 2.17.50 [FreeBSD] 2007-07-03 internal error, aborting at /usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elfxx-mips.c line 8052 in bfd_boolean _bfd_mips_elf_relocate_section(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)
00:04:50.042 
00:04:50.042 /usr/obj/usr/src/mips.mips/tmp/usr/bin/ld: Please report this bug.
00:04:50.042 
00:04:50.042 --- lib__L ---
Comment 4 Andrew Turner freebsd_committer freebsd_triage 2018-12-04 10:57:31 UTC
I think this should be fixed by review D18428.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-12-04 18:52:25 UTC
A commit references this bug:

Author: andrew
Date: Tue Dec  4 18:51:28 UTC 2018
New revision: 341489
URL: https://svnweb.freebsd.org/changeset/base/341489

Log:
  Only gnu/lib/csu when MK_BSD_CRTBEGIN is off.

  We were still building it from Makefile.inc1. Disable it there so we don't
  try to build the GNU crtbegin/crtend when the BSD version was asked for.

  PR:		233733
  Reported by:	lwhsu
  Reviewed by:	emaste
  MFC with:	r339738
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D18428

Changes:
  head/Makefile.inc1
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-09-16 14:43:13 UTC
A commit references this bug:

Author: andrew
Date: Mon Sep 16 14:42:14 UTC 2019
New revision: 352400
URL: https://svnweb.freebsd.org/changeset/base/352400

Log:
  MFC r341489:

  Only gnu/lib/csu when MK_BSD_CRTBEGIN is off.

  We were still building it from Makefile.inc1. Disable it there so we don't
  try to build the GNU crtbegin/crtend when the BSD version was asked for.

  PR:		233733
  Reported by:	lwhsu
  Reviewed by:	emaste
  MFC with:	r339738
  Sponsored by:	DARPA, AFRL
  Differential Revision:	https://reviews.freebsd.org/D18428

Changes:
_U  stable/12/
  stable/12/Makefile.inc1
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-16 17:32:34 UTC
^Triage: Assign to committer that resolved and track merges (and non-merges)