Bug 1464806

Summary: eu-strip segfaults on complete (-g2) qt5-qtwebengine debuginfo
Product: [Fedora] Fedora Reporter: Kevin Kofler <kevin>
Component: elfutilsAssignee: Mark Wielaard <mjw>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 30CC: fche, jakub, me, mjw, roland
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-26 15:39:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Kofler 2017-06-25 23:02:03 UTC
Description of problem:
If I build QtWebEngine with -g2 (which is what -g normally defaults to in GCC), it links correctly on x86_64 (32-bit architectures run out of address space, I have not tried what happens on aarch64), but then the find-debuginfo.sh step fails because eu-strip segfaults on the generated binary (libQt5WebEngineCore.so.5.9.0, I assume: that is the one containing all the huge Chromium code).

I set the priority to low because there is an easy workaround: build with -g1 instead, which is the default in upstream QtWebEngine (since 5.9).

Version-Release number of selected component (if applicable):
elfutils-0.169-3.fc27

How reproducible:
No idea. It failed the one time I tried.

Steps to Reproduce:
1. Enable this snippet in qt5-qtwebengine.spec:
http://pkgs.fedoraproject.org/cgit/rpms/qt5-qtwebengine.git/tree/qt5-qtwebengine.spec?id=09a57d530ce6e89d75b43e1d73007b1b66a3bb8f#n397
2. Attempt to build the qt5-qtwebengine package with that change.

Actual results:
/usr/lib/rpm/find-debuginfo.sh: line 188:  3619 Segmentation fault
(core dumped) eu-strip --remove-comment $r $g -f "$1" "$2"

Expected results:
eu-strip should succeed in performing this operation. The linker can link the file after all, so I don't see a good reason why eu-strip shouldn't be able to process it, too.

Additional info:
Chromium's GN build system has a configure option for the -g level to use (symbol_level). QtWebEngine's QMake build system always passes symbol_level=1. The specfile snippet would change that to symbol_level=2 on x86_64.

Using -g2 for qt5-qtwebengine on x86_64 used to work until QtWebEngine 5.8.0 (the previous release – there was no QtWebEngine 5.8.1), but the binary was smaller back then, so I don't think this is a genuine regression in eu-strip, but rather just a longstanding latent bug or limitation that QtWebEngine 5.9.0 now triggers.

Comment 1 Mark Wielaard 2017-06-26 08:32:12 UTC
Wow, that is a giant package. I tried to mockbuild it but ran out of disk space because I had only 12GB free... Will try on a separate volume.

Do you happen to have the libQt5WebEngineCore.so available?

Comment 2 Kevin Kofler 2017-06-26 08:45:41 UTC
The one that triggers the segfault, no, unfortunately. I was running the build in Koji, so it was not possible to extract the file from the buildroot.

Comment 3 Mark Wielaard 2017-06-26 11:58:41 UTC
Replicated more or less. My build triggers a glibc abort in eu-strip instead of a SEGV.

Also a warning for thise trying this at home. The mockbuild root uses up lots of disk space. 39G at the time. And the link phase eats up 14G of memory... So it wouldn't surprise me if the eu-strip issue really is a bad out of disk or out of memory handling...

+ /usr/lib/rpm/find-debuginfo.sh -j8 --strict-build-id -m --ver-rel 5.9.0-3.fc27 --unique-debug-arch x86_64 --unique-debug-src-base qt5-qtwebengine --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /builddir/build/BUILD/qtwebengine-opensource-src-5.9.0
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/qml/QtWebEngine/libqtwebengineplugin.so
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/libexec/QtWebEngineProcess
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webengine/minimal/minimal
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/plugins/designer/libqwebengineview.so
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/bin/qwebengine_convert_dict
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webengine/quicknanobrowser/quicknanobrowser
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/minimal/minimal
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webengine/customdialogs/customdialogs
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/cookiebrowser/cookiebrowser
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/demobrowser/demobrowser
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/markdowneditor/markdowneditor
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/contentmanipulation/contentmanipulation
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/videoplayer/videoplayer
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/spellchecker/spellchecker
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/qt5/examples/webenginewidgets/simplebrowser/simplebrowser
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/libQt5WebEngineCore.so.5.9.0
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/libQt5WebEngine.so.5.9.0
extracting debug info from /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib64/libQt5WebEngineWidgets.so.5.9.0
hard linked /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib/debug/usr/lib64/qt5/bin/qwebengine_convert_dict-5.9.0-3.fc27.x86_64.debug to /builddir/build/BUILDROOT/qt5-qtwebengine-5.9.0-3.fc27.x86_64/usr/lib/debug/usr/bin/qwebengine_convert_dict-5.9.0-3.fc27.x86_64.debug
*** Error in `eu-strip': munmap_chunk(): invalid pointer: 0x00007f58304c8010 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7d40c)[0x7f593779640c]
/lib64/libc.so.6(cfree+0x12c)[0x7f59377a7ddc]
/lib64/libelf.so.1(elf_end+0x1c5)[0x7f5937f40b75]
eu-strip(+0x86f9)[0x7f59383866f9]
eu-strip(+0x415b)[0x7f593838215b]
/lib64/libc.so.6(__libc_start_main+0xea)[0x7f5937739dca]
eu-strip(+0x420a)[0x7f593838220a]
======= Memory map: ========
7f58302b1000-7f58302c7000 r-xp 00000000 fd:03 409585975                  /usr/lib64/libgcc_s-7-20170526.so.1
7f58302c7000-7f58304c6000 ---p 00016000 fd:03 409585975                  /usr/lib64/libgcc_s-7-20170526.so.1
7f58304c6000-7f58304c7000 r--p 00015000 fd:03 409585975                  /usr/lib64/libgcc_s-7-20170526.so.1
7f58304c7000-7f58304c8000 rw-p 00016000 fd:03 409585975                  /usr/lib64/libgcc_s-7-20170526.so.1
7f58304c8000-7f5936ead000 rw-p 00000000 00:00 0 
7f5936ead000-7f5936ec6000 r-xp 00000000 fd:03 413104265                  /usr/lib64/libpthread-2.25.90.so
7f5936ec6000-7f59370c6000 ---p 00019000 fd:03 413104265                  /usr/lib64/libpthread-2.25.90.so
7f59370c6000-7f59370c7000 r--p 00019000 fd:03 413104265                  /usr/lib64/libpthread-2.25.90.so
7f59370c7000-7f59370c8000 rw-p 0001a000 fd:03 413104265                  /usr/lib64/libpthread-2.25.90.so
7f59370c8000-7f59370cc000 rw-p 00000000 00:00 0 
7f59370cc000-7f59370db000 r-xp 00000000 fd:03 409586553                  /usr/lib64/libbz2.so.1.0.6
7f59370db000-7f59372da000 ---p 0000f000 fd:03 409586553                  /usr/lib64/libbz2.so.1.0.6
7f59372da000-7f59372db000 r--p 0000e000 fd:03 409586553                  /usr/lib64/libbz2.so.1.0.6
7f59372db000-7f59372dc000 rw-p 0000f000 fd:03 409586553                  /usr/lib64/libbz2.so.1.0.6
7f59372dc000-7f5937301000 r-xp 00000000 fd:03 409586562                  /usr/lib64/liblzma.so.5.2.3
7f5937301000-7f5937500000 ---p 00025000 fd:03 409586562                  /usr/lib64/liblzma.so.5.2.3
7f5937500000-7f5937501000 r--p 00024000 fd:03 409586562                  /usr/lib64/liblzma.so.5.2.3
7f5937501000-7f5937502000 rw-p 00000000 00:00 0 
7f5937502000-7f5937518000 r-xp 00000000 fd:03 409588003                  /usr/lib64/libz.so.1.2.11
7f5937518000-7f5937717000 ---p 00016000 fd:03 409588003                  /usr/lib64/libz.so.1.2.11
7f5937717000-7f5937718000 r--p 00015000 fd:03 409588003                  /usr/lib64/libz.so.1.2.11
7f5937718000-7f5937719000 rw-p 00000000 00:00 0 
7f5937719000-7f59378e6000 r-xp 00000000 fd:03 413104249                  /usr/lib64/libc-2.25.90.so
7f59378e6000-7f5937ae6000 ---p 001cd000 fd:03 413104249                  /usr/lib64/libc-2.25.90.so
7f5937ae6000-7f5937aea000 r--p 001cd000 fd:03 413104249                  /usr/lib64/libc-2.25.90.so
7f5937aea000-7f5937aec000 rw-p 001d1000 fd:03 413104249                  /usr/lib64/libc-2.25.90.so
7f5937aec000-7f5937af0000 rw-p 00000000 00:00 0 
7f5937af0000-7f5937af3000 r-xp 00000000 fd:03 413104253                  /usr/lib64/libdl-2.25.90.so
7f5937af3000-7f5937cf2000 ---p 00003000 fd:03 413104253                  /usr/lib64/libdl-2.25.90.so
7f5937cf2000-7f5937cf3000 r--p 00002000 fd:03 413104253                  /usr/lib64/libdl-2.25.90.so
7f5937cf3000-7f5937cf4000 rw-p 00003000 fd:03 413104253                  /usr/lib64/libdl-2.25.90.so
7f5937cf4000-7f5937d39000 r-xp 00000000 fd:03 409588042                  /usr/lib64/libdw-0.169.so
7f5937d39000-7f5937f39000 ---p 00045000 fd:03 409588042                  /usr/lib64/libdw-0.169.so
7f5937f39000-7f5937f3b000 r--p 00045000 fd:03 409588042                  /usr/lib64/libdw-0.169.so
7f5937f3b000-7f5937f3c000 rw-p 00047000 fd:03 409588042                  /usr/lib64/libdw-0.169.so
7f5937f3c000-7f5937f53000 r-xp 00000000 fd:03 409586574                  /usr/lib64/libelf-0.169.so
7f5937f53000-7f5938152000 ---p 00017000 fd:03 409586574                  /usr/lib64/libelf-0.169.so
7f5938152000-7f5938153000 r--p 00016000 fd:03 409586574                  /usr/lib64/libelf-0.169.so
7f5938153000-7f5938154000 rw-p 00017000 fd:03 409586574                  /usr/lib64/libelf-0.169.so
7f5938154000-7f593817c000 r-xp 00000000 fd:03 413104245                  /usr/lib64/ld-2.25.90.so
7f5938310000-7f5938370000 rw-p 00000000 00:00 0 
7f5938378000-7f593837b000 rw-p 00000000 00:00 0 
7f593837b000-7f593837c000 r--p 00027000 fd:03 413104245                  /usr/lib64/ld-2.25.90.so
7f593837c000-7f593837d000 rw-p 00028000 fd:03 413104245                  /usr/lib64/ld-2.25.90.so
7f593837d000-7f593837e000 rw-p 00000000 00:00 0 
7f593837e000-7f593838a000 r-xp 00000000 fd:03 8942949                    /usr/bin/eu-strip
7f5938589000-7f593858b000 r--p 0000b000 fd:03 8942949                    /usr/bin/eu-strip
7f593858b000-7f593858c000 rw-p 0000d000 fd:03 8942949                    /usr/bin/eu-strip
7f59390b9000-7f59390fb000 rw-p 00000000 00:00 0                          [heap]
7fffdb8df000-7fffdba00000 rw-p 00000000 00:00 0                          [stack]
7fffdbba5000-7fffdbba7000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
/usr/lib/rpm/find-debuginfo.sh: line 198:  4284 Aborted                 (core dumped) eu-strip --remove-comment $r $g -f "$1" "$2"
dwz: dwz.c:9899: read_dwarf: Assertion `data != NULL && data->d_buf != NULL' failed.
/usr/lib/rpm/find-debuginfo.sh: line 490:  4350 Aborted                 (core dumped) dwz $dwz_opts $dwz_files

Comment 4 Jan Kurik 2017-08-15 07:03:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 5 Ben Cotton 2018-11-27 18:37:58 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Mark Wielaard 2018-11-28 19:44:16 UTC
I still would like to understand what was going on here. Lets keep it open for now.

Comment 7 Ben Cotton 2019-02-19 17:12:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.

Comment 8 Ben Cotton 2020-04-30 21:49:20 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2020-05-26 15:39:27 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.