Bug 2310828 - failures when processing webkitgtk binary files with DW_UT_type
Summary: failures when processing webkitgtk binary files with DW_UT_type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: debugedit
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2024-09-09 11:39 UTC by Dan Horák
Modified: 2024-10-26 02:52 UTC (History)
3 users (show)

Fixed In Version: debugedit-5.0-18.fc40 debugedit-5.0-18.fc41
Clone Of:
Environment:
Last Closed: 2024-10-23 01:33:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 32157 0 P2 NEW Handle DW_UT_TYPE units (Unit type 2) 2024-09-09 16:52:06 UTC
WebKit Project 279360 0 None None None 2024-09-09 15:18:01 UTC

Description Dan Horák 2024-09-09 11:39:12 UTC
debugedit fails to process binary files that webkitgtk's build produces

from a manual run

<mock-chroot> sh-5.2# RPM_PACKAGE_NAME=webkitgtk RPM_BUILD_DIR=/builddir/build/BUILD RPM_BUILD_ROOT=/builddir/build/ /usr/bin/find-debuginfo -j160 --strict-build-id -m -i --build-id-seed 2.45.92-2.fc42 --unique-debug-suffix -2.45.92-2.fc42.ppc64le --unique-debug-src-base webkitgtk-2.45.92-2.fc42.ppc64le --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -j30 -S debugsourcefiles.list /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92
find-debuginfo: starting
Extracting debug info from 29 files
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/bin/WebKitNetworkProcess: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/bin/WebKitWebProcess: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/bin/MiniBrowser: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/MiniBrowser: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/WebKitNetworkProcess: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/WebKitWebProcess: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/lib/libwebkit2gtkinjectedbundle.so: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/bin/jsc: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/lib/libwebkitgtkinjectedbundle.so: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/LLIntSettingsExtractor: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/jsc: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/bin/LLIntSettingsExtractor: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/bin/LLIntOffsetsExtractor: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/LLIntOffsetsExtractor: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/bin/WebKitWebDriver: Unit type 2 unhandled
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: readelf: Error: Unable to find program interpreter name
Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/lib/libjavascriptcoregtk-6.0.so.1.3.8: Unit type 2 unhandled
readelf: Error: readelf: Error: Unable to find program interpreter name
Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/lib/libjavascriptcoregtk-4.1.so.0.6.8: Unit type 2 unhandled
readelf: Error: Unable to find program interpreter name
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkit2gtk-4.1/lib/libwebkit2gtk-4.1.so.0.16.1: Unit type 2 unhandled
debugedit: /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92/redhat-linux-build/webkitgtk-6.0/lib/libwebkitgtk-6.0.so.4.10.1: Unit type 2 unhandled
Creating .debug symlinks for symlinks to ELF files
Copying sources found by 'debugedit -l' to /usr/src/debug/webkitgtk-2.45.92-2.fc42.ppc64le
cpio: redhat-linux-build/webkit2gtk-4.1/CMakeFiles/CMakeScratch/TryCompile-742Wh2/: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkit2gtk-4.1/CMakeFiles/CMakeScratch/TryCompile-742Wh2/INT128_VALUE.c: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkit2gtk-4.1/CMakeFiles/CMakeScratch/TryCompile-8RsyBV/: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkit2gtk-4.1/CMakeFiles/CMakeScratch/TryCompile-lAaDwP/: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkitgtk-6.0/CMakeFiles/CMakeScratch/TryCompile-HdemfQ/: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkitgtk-6.0/CMakeFiles/CMakeScratch/TryCompile-YEkcQC/: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkitgtk-6.0/CMakeFiles/CMakeScratch/TryCompile-YEkcQC/INT128_VALUE.c: Cannot stat: No such file or directory
cpio: redhat-linux-build/webkitgtk-6.0/CMakeFiles/CMakeScratch/TryCompile-jJ5dsV/: Cannot stat: No such file or directory
211 blocks
find: ‘debug’: No such file or directory
find-debuginfo: done

but the same issues are reported during a build in koji, please see 
    https://koji.fedoraproject.org/koji/taskinfo?taskID=123037888
    https://koji.fedoraproject.org/koji/taskinfo?taskID=123037874

(copied from https://pagure.io/fedora-infrastructure/issue/11839, fails both in F-41 and Rawhide)

Reproducible: Always




The issue has been reproduced in Rawhide (mock) with debugedit-5.0-17.fc41.ppc64le

Comment 1 Mark Wielaard 2024-09-09 11:50:34 UTC
The error messages show the binaries containing DW_UT_TYPE units (Unit type 2), which aren't supported by debugedit (and also not by dwz).

Comment 2 Mark Wielaard 2024-09-09 11:55:25 UTC
Try removing the -fdebug-types-section compile flag.

Comment 3 Dan Horák 2024-09-09 11:57:23 UTC
Thanks, will try, seems the flag is inserted by WebKit's build system ...

Comment 4 Dan Horák 2024-09-09 12:04:47 UTC
Currently the webkitgtk build disables LTO on ppc64le, because it OOMs on the builders. Could it be related?

Comment 5 Mark Wielaard 2024-09-09 12:26:58 UTC
(In reply to Dan Horák from comment #4)
> Currently the webkitgtk build disables LTO on ppc64le, because it OOMs on
> the builders. Could it be related?

I don't really know how -fdebug-types-section and LTO interact for g++ (CCed jakub who might).
But if you are only seeing this on ppc64le and not on other arches then I suspect it might.
Do your other arch builds also use -fdebug-types-section and are you seeing any issue there?

Comment 6 Jakub Jelinek 2024-09-09 12:31:35 UTC
For the LTO vs. -fdebug-types-section interaction, I've recently filed and fixed https://gcc.gnu.org/PR116614
(but so far on trunk only and it isn't in any Fedora rpm yet).
I think dwz doesn't handle -fdebug-types-section and gives up with that though (could be wrong on that).

Comment 7 Dan Horák 2024-09-09 14:01:28 UTC
With -fdebug-types-section dropped the build passes. The "Unable to find program interpreter name" remains there.

...
+ /usr/bin/find-debuginfo -j160 --strict-build-id -m -i --build-id-seed 2.45.92-3.fc42 --unique-debug-suffix -2.45.92-3.fc42.ppc64le --unique-debug-src-base webkitgtk-2.45.92-3.fc42.ppc64le --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -j30 -S debugsourcefiles.list /builddir/build/BUILD/webkitgtk-2.45.92-build/webkitgtk-2.45.92
find-debuginfo: starting
Extracting debug info from 15 files
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
readelf: Error: Unable to find program interpreter name
DWARF-compressing 15 files
dwz: ./usr/lib64/libwebkit2gtk-4.1.so.0.16.1-2.45.92-3.fc42.ppc64le.debug: Too many DIEs, not optimizing
dwz: ./usr/lib64/libwebkitgtk-6.0.so.4.10.1-2.45.92-3.fc42.ppc64le.debug: Too many DIEs, not optimizing
sepdebugcrcfix: Updated 15 CRC32s, 0 CRC32s did match.
Creating .debug symlinks for symlinks to ELF files
...

Comment 8 Michael Catanzaro 2024-09-09 14:03:04 UTC
(In reply to Mark Wielaard from comment #5)
> Do your other arch builds also use -fdebug-types-section and are you seeing
> any issue there?

It's used on every architecture, but this build failure only occurs for ppc64le.

I can remove -fdebug-types-section, but I think we should understand why the error is specific to ppc64le. LTO is also disabled on i686, but this error isn't happening there.

Comment 9 Dan Horák 2024-09-09 14:08:59 UTC
Also "-fdebug-types-section" is a new option passed to the build in webkitgtk-2.45.92, it wasn't there in webkitgtk-2.45.91 if I see right.

Comment 10 Michael Catanzaro 2024-09-09 14:13:01 UTC
Correct, the flag was added recently to "avoid linker relocation errors on Debug/RelWithDebInfo builds" https://bugs.webkit.org/show_bug.cgi?id=278861

"Currently RelWithDebInfo/Debug builds fail to link on aarch64 - relocation errors appear: relocation R_AARCH64_ABS32 out of range: 4312197985 is not in [-2147483648, 4294967295]. Adding -fdebug-types-section as compiler flag helps to migitate the problem."

which doesn't look good either. I wonder what that error message means.

I thought I actually *did* test this change quite recently with a scratch build on all Fedora architectures specifically because I was nervous about any changes that affect debuginfo, but perhaps I messed up or am misremembering.

Comment 11 Jakub Jelinek 2024-09-09 14:24:45 UTC
That means you have too large debug info that some debug section doesn't fit in 32-bit DWARF anymore.
You could always try -gdwarf-64 and use 64-bit DWARF (which admittedly is significantly less tested and larger).
That said, if dwz gives up on the compression anyway (see the
dwz: ./usr/lib64/libwebkit2gtk-4.1.so.0.16.1-2.45.92-3.fc42.ppc64le.debug: Too many DIEs, not optimizing
dwz: ./usr/lib64/libwebkitgtk-6.0.so.4.10.1-2.45.92-3.fc42.ppc64le.debug: Too many DIEs, not optimizing
; dwz has some limits so that it doesn't consume too much memory; those can be obviously increased also on a per package basis))
perhaps using -fdebug-types-section offers at least some possibility to reduce the debug info size.

Comment 12 Michael Catanzaro 2024-09-09 14:32:17 UTC
We already have bug #2017171 for the DIE limit problem. The settings in webkitgtk.spec are:

# Increase the DIE limit so our debuginfo packages can be size-optimized.
# This previously decreased the size for x86_64 from ~5G to ~1.1G, but as of
# 2022 it's more like 850 MB -> 675 MB. This requires lots of RAM on the
# builders, so only do this for x86_64 and aarch64 to avoid overwhelming
# builders with less RAM.
# https://bugzilla.redhat.com/show_bug.cgi?id=1456261
%global _dwz_max_die_limit_x86_64 250000000
%global _dwz_max_die_limit_aarch64 250000000

I guess we could try raising the limit on all 64-bit architectures now that https://pagure.io/fedora-infrastructure/issue/11839 is fixed. (Could also try reenabling LTO.)

Comment 13 Michael Catanzaro 2024-09-09 14:36:21 UTC
Wait, sorry, the DIE limit is already raised for aarch64, and the build there is not hitting the DIE limit.

Comment 14 Dan Horák 2024-09-09 14:37:26 UTC
I am going to open another bug for failed LTO

...
lto-wrapper: fatal error: Too many copied sections: Operation not supported
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Comment 15 Jakub Jelinek 2024-09-09 14:44:41 UTC
lto-wrapper: fatal error: Too many copied sections: Operation not supported
is most likely that https://gcc.gnu.org/PR116614 I was talking about.
Running into the DWZ limits is fromk that
dwz: ./usr/lib64/libwebkit2gtk-4.1.so.0.16.1-2.45.92-3.fc42.ppc64le.debug: Too many DIEs, not optimizing
dwz: ./usr/lib64/libwebkitgtk-6.0.so.4.10.1-2.45.92-3.fc42.ppc64le.debug: Too many DIEs, not optimizing
in #c7, so on ppc64le where the limit isn't increased.
The aarch64 error presumably happens during linking, so dwz can't help with that, one needs to successfully link and only after that it can be dwz optimized.
dwz can't e.g. optimize relocatable objects, so you can't relocatably link say 4 parts of the library, optimize them separately and then link together.
And right now I believe dwz can't deal with -fdebug-types-section, so you can choose that or dwz but not both; if both work, you want to pick the
one which gives you smaller debug info.
One way to decrease size of debug info without -fdebug-types-section might be try to link fewer larger objects instead of many small ones.
Kind of what e.g. Qt/KDE does, creating *.all.cpp which includes all or most source files in each directory in a single larger one.  Then
debug info for stuff included in large C++ headers is emitted just once rather than 50 times or how many sources one has in a directory (provided
you include usually same or very similar set of headers).

Comment 16 Michael Catanzaro 2024-09-09 14:54:40 UTC
(In reply to Jakub Jelinek from comment #15)
> And right now I believe dwz can't deal with -fdebug-types-section, so you
> can choose that or dwz but not both; if both work, you want to pick the
> one which gives you smaller debug info.

What does this mean for Fedora and other distro builds? Should the package not use -fdebug-types-section?

> One way to decrease size of debug info without -fdebug-types-section might
> be try to link fewer larger objects instead of many small ones.
> Kind of what e.g. Qt/KDE does, creating *.all.cpp which includes all or most
> source files in each directory in a single larger one.  Then
> debug info for stuff included in large C++ headers is emitted just once
> rather than 50 times or how many sources one has in a directory (provided
> you include usually same or very similar set of headers).

We generally #include approximately 8 C++ source files together into each "source bundle" which is what actually gets submitted to the compiler, although the number varies. E.g. the first example file I checked, UnifiedSource-0e543b66-1.cpp, only has 5:

#include "interpreter/CLoopStack.cpp"
#include "interpreter/CallFrame.cpp"
#include "interpreter/Interpreter.cpp"
#include "interpreter/ShadowChicken.cpp"
#include "interpreter/StackVisitor.cpp"

Increasing the number is possible, but awkward. We use the same bundles for all platforms and architectures, and the number is chosen to optimize build performance for macOS, not for Linux. Also, the higher the number of #included source files per source bundle, the greater the RAM required to build WebKit.

Comment 17 Michael Catanzaro 2024-09-09 14:58:16 UTC
(In reply to Jakub Jelinek from comment #15)
> And right now I believe dwz can't deal with -fdebug-types-section, so you
> can choose that or dwz but not both; if both work, you want to pick the
> one which gives you smaller debug info.

I'm confused. It looks like we unconditionally use both -fdebug-types-section and also dwz, yes? And this works everywhere except ppc64le?

Comment 18 Michael Catanzaro 2024-09-09 15:00:47 UTC
(In reply to Jakub Jelinek from comment #15)
> lto-wrapper: fatal error: Too many copied sections: Operation not supported
> is most likely that https://gcc.gnu.org/PR116614 I was talking about.

Are you sure? We are building with Clang. Won't lto-wrapper come from Clang instead of GCC?

Comment 19 Michael Catanzaro 2024-09-09 15:01:27 UTC
Oops, sorry. I forgot about this part of the spec file:

# Clang is preferred: https://skia.org/docs/user/build/#supported-and-preferred-compilers
# However, it crashes on ppc64le.
%ifnarch ppc64le
%global toolchain clang
%endif

So ppc64le is special once again.

Comment 20 Jakub Jelinek 2024-09-09 15:04:02 UTC
(In reply to Michael Catanzaro from comment #16)
> What does this mean for Fedora and other distro builds? Should the package
> not use -fdebug-types-section?

-fdebug-types-section is simply one way to decrease redundancies in DWARF (one way
in DWARF 4 where it used special .debug_types section, hence the switch name, in DWARF 5
it uses DW_UT_type units of .debug_info instead; and with various problems around the
DWARF design of that feature), dwz is another one.  The reason dwz doesn't have
-fdebug-types-section support is mostly that normally -fdebug-types-section only brings
pain and generally can't do what dwz does, so it wasn't something we'd be recommending.
Of course, when you trigger link limits without -fdebug-types-section, that is a different
thing.
dwz isn't done during linking because it needs a lot of RAM and sharing that RAM
together with the linker would make it worse, and because it has a mode in which it
optimizes debug info from multiple shared libraries/binaries in the same package.
Adding dwz support for -fdebug-types-section is theoretically possible, ideally it would
just undo the mess it added (e.g. the huge 16-byte references it uses).

> We generally #include approximately 8 C++ source files together into each
> "source bundle" which is what actually gets submitted to the compiler,
> although the number varies. E.g. the first example file I checked,
> UnifiedSource-0e543b66-1.cpp, only has 5:
> 
> #include "interpreter/CLoopStack.cpp"
> #include "interpreter/CallFrame.cpp"
> #include "interpreter/Interpreter.cpp"
> #include "interpreter/ShadowChicken.cpp"
> #include "interpreter/StackVisitor.cpp"
> 
> Increasing the number is possible, but awkward. We use the same bundles for
> all platforms and architectures, and the number is chosen to optimize build
> performance for macOS, not for Linux. Also, the higher the number of
> #included source files per source bundle, the greater the RAM required to
> build WebKit.

I'm just surprised that even when you do it you run into clearly largest debug info from any Fedora packages.
How many *.o files are linked together?

Comment 21 Jakub Jelinek 2024-09-09 15:09:08 UTC
(In reply to Michael Catanzaro from comment #17)
> (In reply to Jakub Jelinek from comment #15)
> > And right now I believe dwz can't deal with -fdebug-types-section, so you
> > can choose that or dwz but not both; if both work, you want to pick the
> > one which gives you smaller debug info.
> 
> I'm confused. It looks like we unconditionally use both
> -fdebug-types-section and also dwz, yes? And this works everywhere except
> ppc64le?

dwz is used always, but if it sees something it doesn't handle (like DW_UT_type),
it just bails out and doesn't optimize anything.

As for the aarch64 linking errors, might be interesting to try using gcc instead of clang if you still run into it.

Comment 22 Michael Catanzaro 2024-09-09 15:17:27 UTC
(In reply to Jakub Jelinek from comment #21)
> As for the aarch64 linking errors, might be interesting to try using gcc
> instead of clang if you still run into it.

I don't know what compiler was used in that case. https://bugs.webkit.org/show_bug.cgi?id=278861 is not an error I've encountered myself.

Comment 23 Michael Catanzaro 2024-09-09 15:27:12 UTC
(In reply to Jakub Jelinek from comment #20)
> I'm just surprised that even when you do it you run into clearly largest
> debug info from any Fedora packages.
> How many *.o files are linked together?

I copied the link command for libwebkitgtk-6.0.so.4.11.0 from my personal development build (not identical to the Fedora build configuration) and did a search for ".o" and there are 2221 results. That should be approximately correct; it looks like it's not matching anything else.

(It looks like there are an additional ~800 .o files linked into lib/libjavascriptcoregtk-6.0.so.1.4.0.)

Comment 24 Michael Catanzaro 2024-09-09 15:31:51 UTC
So I still don't know what to do here. For now I've patched the Fedora package to just not use this flag anymore, but I also can't confidently land that change upstream. My best explanation at this point is "the flag is incompatible with dwz and debugedit," but these tools are surely used on all architectures, and it's only a problem for ppc64le.

Comment 25 Mark Wielaard 2024-09-09 16:52:07 UTC
File an upstream bug for debugedit to support DW_UT_type. https://sourceware.org/bugzilla/show_bug.cgi?id=32157

Comment 26 Dan Horák 2024-09-10 09:39:16 UTC
for the record, webkit builds OK on aarch64 in Rawhide with gcc and without the -fdebug-types-section option

Comment 27 Michael Catanzaro 2024-09-10 12:36:31 UTC
I assume the aarch64 build failure probably only affects WPE WebKit, though I'm not certain. WPE has only one shared library, instead of the two shared libraries installed by WebKitGTK, so the largest shared library is going to be bigger.

Comment 28 Michael Catanzaro 2024-09-10 12:37:18 UTC
(In reply to Michael Catanzaro from comment #24)
> So I still don't know what to do here. For now I've patched the Fedora
> package to just not use this flag anymore, but I also can't confidently land
> that change upstream. My best explanation at this point is "the flag is
> incompatible with dwz and debugedit," but these tools are surely used on all
> architectures, and it's only a problem for ppc64le.

Does anybody have any ideas why the -fdebug-types failure is specific to ppc64le only?

Comment 29 Jakub Jelinek 2024-09-10 12:45:10 UTC
(In reply to Michael Catanzaro from comment #28)
> Does anybody have any ideas why the -fdebug-types failure is specific to
> ppc64le only?

If https://bugzilla.redhat.com/show_bug.cgi?id=2310828#c19 is in, then ppc64le would be built by a different compiler, which emits different debug info, for which LTO means something significantly different, etc.

If it is the
lto-wrapper: fatal error: Too many copied sections: Operation not supported
error, I can have a fix within 2-3 days, if it is something different (like debugedit not handling it), Mark needs to answer that.
Does clang default to DWARF 5 (i.e. does it use DW_UT_type for -fdebug-types-section) or DWARF 4 (so .debug_types sections)?

Comment 30 Mark Wielaard 2024-09-10 12:57:45 UTC
(In reply to Jakub Jelinek from comment #29)
> (In reply to Michael Catanzaro from comment #28)
> > Does anybody have any ideas why the -fdebug-types failure is specific to
> > ppc64le only?
> 
> If https://bugzilla.redhat.com/show_bug.cgi?id=2310828#c19 is in, then
> ppc64le would be built by a different compiler, which emits different debug
> info, for which LTO means something significantly different, etc.

Right. I suspect that ppc64le is special because it uses g++ and -fdebug-types-section
I don't know what clang++ and -fdebug-types-section produces.

> If it is the
> lto-wrapper: fatal error: Too many copied sections: Operation not supported
> error, I can have a fix within 2-3 days, if it is something different (like
> debugedit not handling it), Mark needs to answer that.

I filed an upstream bug for debugedit to support DW_UT_type https://sourceware.org/bugzilla/show_bug.cgi?id=32157 but haven't worked on it yet assuming the removal of -fdebug-types from the compile flags did the trick already.

Comment 31 Dan Horák 2024-09-10 12:58:50 UTC
for the record, the clang issue has been reported as https://github.com/llvm/llvm-project/issues/108014, internal clang/llvm team is aware

Comment 32 Michael Catanzaro 2024-09-10 13:13:13 UTC
(In reply to Jakub Jelinek from comment #29)
> If https://bugzilla.redhat.com/show_bug.cgi?id=2310828#c19 is in, then
> ppc64le would be built by a different compiler, which emits different debug
> info, for which LTO means something significantly different, etc.

Good point. You're right. That explains it.
 
> If it is the
> lto-wrapper: fatal error: Too many copied sections: Operation not supported
> error, I can have a fix within 2-3 days,

Thank you! But the issue with LTO is a different bug.

> if it is something different (like
> debugedit not handling it), Mark needs to answer that.
> Does clang default to DWARF 5 (i.e. does it use DW_UT_type for
> -fdebug-types-section) or DWARF 4 (so .debug_types sections)?

Found https://www.phoronix.com/news/LLVM-Clang-DWARFv5-Default so this particular mystery remains.

Comment 33 Dan Horák 2024-09-10 14:55:08 UTC
for the record, aarch64 is hitting the same issue as ppc64le when building with gcc and -fdebug-types-section (and disabled LTO due "too many sections"), so this problem isn't ppc64le specific

Comment 34 Dan Horák 2024-09-13 07:38:55 UTC
I have opened https://src.fedoraproject.org/rpms/webkitgtk/pull-request/12 to enable clang builds for ppc64le.

Comment 35 Mark Wielaard 2024-09-28 23:11:53 UTC
Lets keep this bug for debugedit not handling DW_UT_type.
There is a patch for that now:
https://inbox.sourceware.org/debugedit/20240928230445.390836-1-mark@klomp.org/

Can we open new bugs for any of the other issues?

Comment 36 Michael Catanzaro 2024-09-29 23:18:07 UTC
I don't think we have any other remaining issues here? The LLVM musttail issue is tracked as https://github.com/llvm/llvm-project/issues/98859.

Comment 37 Dan Horák 2024-09-30 20:03:56 UTC
ack, the gcc/lto fix should be in gcc-14.2.1-3, needs rechecking ...

Comment 38 Dan Horák 2024-10-01 12:28:10 UTC
And rechecked, neither aarch64 or ppc64le fail due LTO issues, so https://gcc.gnu.org/PR116614 should be fixed now. This is with -fdebug-types-section enabled (the default in webkitgtk).

Comment 39 Fedora Update System 2024-10-07 18:30:49 UTC
FEDORA-2024-d0c875e1ea (debugedit-5.0-18.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-d0c875e1ea

Comment 40 Fedora Update System 2024-10-07 22:50:07 UTC
FEDORA-2024-520747442e (debugedit-5.0-18.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-520747442e

Comment 41 Fedora Update System 2024-10-08 01:45:53 UTC
FEDORA-2024-d0c875e1ea has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-d0c875e1ea`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-d0c875e1ea

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 42 Fedora Update System 2024-10-08 03:07:47 UTC
FEDORA-2024-520747442e has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-520747442e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-520747442e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 43 Dan Horák 2024-10-10 10:51:11 UTC
I have checked webkit build with gcc and -fdebug-types-section and updated debugedit and is builds OK.

Comment 44 Fedora Update System 2024-10-23 01:33:23 UTC
FEDORA-2024-520747442e (debugedit-5.0-18.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 45 Fedora Update System 2024-10-26 02:52:35 UTC
FEDORA-2024-d0c875e1ea (debugedit-5.0-18.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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