RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1969775 - /usr/bin/ld: Dwarf Error: Offset (2487097600) greater than or equal to .debug_str size (571933).
Summary: /usr/bin/ld: Dwarf Error: Offset (2487097600) greater than or equal to .debug...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: binutils
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 8.5
Assignee: Nick Clifton
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-09 08:59 UTC by Victor Stinner
Modified: 2021-11-10 07:05 UTC (History)
4 users (show)

Fixed In Version: binutils-2.30-105.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:31:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4364 0 None None None 2021-11-09 19:31:36 UTC
Sourceware 23425 0 P2 RESOLVED unresolved symbol diagnostic ends up calling find_abstract_instance with relocations applied causing spurious 'DWARF err... 2021-06-09 09:03:11 UTC

Description Victor Stinner 2021-06-09 08:59:43 UTC
I was told on OFTC #gcc that this bug is known and was fixed in 2018:
https://sourceware.org/bugzilla/show_bug.cgi?id=23425

Can you please backport it into RHEL 8?

Description of problem:
Building Python with LTO+PGO failed once on 200 builds with a linker error:


/usr/bin/ld: Dwarf Error: Offset (2487097600) greater than or equal to .debug_str size (571933).
/usr/bin/ld: Dwarf Error: Could not find abbrev number 12095.

Version-Release number of selected component (if applicable):

* binutils-2.30-93.el8.x86_64
* gcc-8.4.1-1.el8.x86_64
* RHEL 8.4

"gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)"

How reproducible:
Failure rate: 1/200

Steps to Reproduce:
1. git clone https://github.com/python/cpython/
2. cd cpython
3. ./configure --prefix '$(PWD)/target' --with-lto --enable-optimizations
4. make -j10 all

Actual results:
---
ar rcs libpython3.11.a Modules/getbuildinfo.o Parser/token.o  Parser/pegen.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/picklebufobject.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o Python/errors.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/suggestions.o Python/dynload_shlib.o    Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  Modules/_abc.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/signalmodule.o  Modules/_stat.o  Modules/timemodule.o  Modules/_threadmodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/faulthandler.o  Modules/_tracemalloc.o  Modules/symtablemodule.o  Modules/xxsubtype.o Python/frozen.o
gcc -pthread   -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate -Xlinker -export-dynamic -o python Programs/python.o libpython3.11.a -lcrypt -lpthread -ldl  -lutil -lm   -lm 
gcc -pthread   -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.11.a -lcrypt -lpthread -ldl  -lutil -lm   -lm 
/usr/bin/ld: Dwarf Error: Offset (2487097600) greater than or equal to .debug_str size (571933).
/usr/bin/ld: Dwarf Error: Could not find abbrev number 12095.
/tmp/cccV00H7.lto.o: In function `signal_pthread_sigmask':
<artificial>:(.text+0x292cbc): undefined reference to `_Py_Sigset_Converter'
/tmp/cccV00H7.lto.o: In function `fill_siginfo':
<artificial>:(.text+0x2930cb): undefined reference to `_PyLong_FromUid'
/tmp/cccV00H7.lto.o: In function `signal_sigwaitinfo':
<artificial>:(.text+0x29325e): undefined reference to `_Py_Sigset_Converter'
/tmp/cccV00H7.lto.o: In function `signal_sigtimedwait':
<artificial>:(.text+0x293566): undefined reference to `_Py_Sigset_Converter'
/tmp/cccV00H7.lto.o: In function `signal_sigwait':
<artificial>:(.text+0x293af0): undefined reference to `_Py_Sigset_Converter'
/tmp/cccV00H7.lto.o: In function `PyUnicode_FSDecoder':
<artificial>:(.text+0x315fed): undefined reference to `PyOS_FSPath'
/tmp/cccV00H7.lto.o: In function `mkpwent':
<artificial>:(.text+0x31a78c): undefined reference to `_PyLong_FromUid'
<artificial>:(.text+0x31a7a1): undefined reference to `_PyLong_FromGid'
/tmp/cccV00H7.lto.o: In function `pwd_getpwuid':
<artificial>:(.text+0x31afb6): undefined reference to `_Py_Uid_Converter'
<artificial>:(.text+0x31b1df): undefined reference to `_PyLong_FromUid'
/tmp/cccV00H7.lto.o: In function `PyUnicode_FSConverter':
<artificial>:(.text+0x349247): undefined reference to `PyOS_FSPath'
/tmp/cccV00H7.lto.o: In function `_io_open':
<artificial>:(.text+0x38781d): undefined reference to `PyOS_FSPath'
/tmp/cccV00H7.lto.o:(.data+0x74528): undefined reference to `PyInit_posix'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:603: python] Error 1
make[3]: *** Waiting for unfinished jobs....
/usr/bin/ld: Dwarf Error: Could not find abbrev number 6864.
/tmp/ccMUbctW.lto.o: In function `fill_siginfo':
<artificial>:(.text+0x1f010b): undefined reference to `_PyLong_FromUid'
/tmp/ccMUbctW.lto.o: In function `signal_sigwait':
<artificial>:(.text+0x2a6d80): undefined reference to `_Py_Sigset_Converter'
/tmp/ccMUbctW.lto.o: In function `signal_sigwaitinfo':
<artificial>:(.text+0x2a821e): undefined reference to `_Py_Sigset_Converter'
/tmp/ccMUbctW.lto.o: In function `signal_pthread_sigmask':
<artificial>:(.text+0x2b05bc): undefined reference to `_Py_Sigset_Converter'
/tmp/ccMUbctW.lto.o: In function `signal_sigtimedwait':
<artificial>:(.text+0x2b2536): undefined reference to `_Py_Sigset_Converter'
/tmp/ccMUbctW.lto.o: In function `PyUnicode_FSDecoder':
<artificial>:(.text+0x30d08d): undefined reference to `PyOS_FSPath'
/tmp/ccMUbctW.lto.o: In function `mkpwent':
<artificial>:(.text+0x30edac): undefined reference to `_PyLong_FromUid'
<artificial>:(.text+0x30edc1): undefined reference to `_PyLong_FromGid'
/tmp/ccMUbctW.lto.o: In function `pwd_getpwuid':
<artificial>:(.text+0x30f5d6): undefined reference to `_Py_Uid_Converter'
<artificial>:(.text+0x30f7ff): undefined reference to `_PyLong_FromUid'
/tmp/ccMUbctW.lto.o: In function `PyUnicode_FSConverter':
<artificial>:(.text+0x33b157): undefined reference to `PyOS_FSPath'
/tmp/ccMUbctW.lto.o: In function `_io_open':
<artificial>:(.text+0x377d0d): undefined reference to `PyOS_FSPath'
/tmp/ccMUbctW.lto.o:(.data+0x84748): undefined reference to `PyInit_posix'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:744: Programs/_testembed] Error 1
---

Expected results:
No compiler or linker error.


I first reported the build error (linker bug) in the Python bug tracker: https://bugs.python.org/issue44358

Comment 1 Nick Clifton 2021-06-15 16:38:51 UTC
Fixed in binutils-2.30-105.el8

Comment 6 Miloš Prchlík 2021-06-28 09:28:28 UTC
Reverting back to MODIFIED, to undo a mess I caused by adding the bug to a wrong erratum.

Comment 9 Miloš Prchlík 2021-08-17 13:36:49 UTC
Verified with binutils-2.30-108.el8.

Comment 12 errata-xmlrpc 2021-11-09 19:31:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: binutils security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4364


Note You need to log in before you can comment on or make changes to this bug.