Bug 2423200 - Consider using something more efficient than dd for member extraction - e.g ddpt
Summary: Consider using something more efficient than dd for member extraction - e.g ddpt
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: debugedit
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mark Wielaard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-17 16:16 UTC by Yanko Kaneti
Modified: 2026-01-14 14:45 UTC (History)
3 users (show)

Fixed In Version: debugedit-5.2-4.fc44
Clone Of:
Environment:
Last Closed: 2026-01-14 13:27:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2390105 0 unspecified CLOSED Massively increased debuginfo generation time with debugedit 5.2 2026-01-08 10:16:35 UTC
Sourceware 33771 0 P2 NEW Use ddpt or gnu dd iflag=skip_bytes,count_bytes for ar member extraction 2026-01-07 23:21:05 UTC

Internal Links: 2390105

Description Yanko Kaneti 2025-12-17 16:16:14 UTC
While I was looking for why "Extracting debug info ..." takes so long while building tdlib-1.8.0-8.fc43 in mock (fedora-rawhide-x86_64) and it was apparent that dd with bs=1 seems to be taking quite a while while dealing with the enormous libtdcore.a (around 2Gs)

So I tried replacing dd with ddpt just to see what will happen:

diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
index 40cd182..4e3ef64 100755
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -539,7 +539,7 @@ do_ar_file()
           # is hard, in case the same name exists multiple times.  A
           # distinct instance-number would have to be given to ar ("N ###"),
           # kept on a per-name basis.
-          (cd "$tmpdir"; dd status=none if="$f" of="$member_dn$member_bn" bs=1 skip="$offset" count="$size")
+          (cd "$tmpdir"; ddpt status=none if="$f" of="$member_dn$member_bn" bs=1 skip="$offset" count="$size")
           if [ $? -ne 0 ]; then
               res=1
           fi

With debugedit patched like that and trying the same tdlib mock build on my 8 core zen3 machine:
- without patch   
   INFO: Done(tdlib-1.8.0-8.fc44.src.rpm) Config(fedora-rawhide-x86_64) 62 minutes 18 seconds
- with patch
   INFO: Done(tdlib-1.8.0-8.fc44.src.rpm) Config(fedora-rawhide-x86_64) 15 minutes 50 seconds


Reproducible: Always

Comment 1 Mark Wielaard 2026-01-14 13:27:19 UTC
Thanks for the suggestion. I went for a slightly different fix using "plain" dd.
See https://sourceware.org/bugzilla/show_bug.cgi?id=33771

This is now in debugedit-5.2-4.fc44

I checked that it reduces the tdlib build. With the fix a local mockbuild took 25 minutes.
I am still waiting for it finish without the old variant. Going for 45 minutes now...

Please let me know how it compares to your fix.

Comment 2 Yanko Kaneti 2026-01-14 14:45:39 UTC
Thanks.

For a rough comparison with the previous observations.
With todays rawhide + debugedit-5.2-4.fc44.x86_64.rpm on the same machine as before

 INFO: Done(tdlib-1.8.0-8.fc44.src.rpm) Config(fedora-rawhide-x86_64) 16 minutes 7 seconds

For the extracting debuginfo part of the build most of the time was spent in ar and not dd as before. 
I think we are good.


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