Hi Stephen,

On 1/6/25 20:59, Stephen Kitt wrote:
On Sun, Jan 05, 2025 at 11:17:33PM +0100, Helge Deller wrote:
On 1/4/25 10:27, Niels Thykier wrote:
On Sat, 4 Jan 2025 07:49:05 +0100 Helge Deller <del...@gmx.de>
wrote:
Package: dpkg Version: 1.22.11

dpkg-buildpackage has become incredible slow. This seems to have
started around end of 2024.

I was able to narrow the issue down.
make-dfsg (4.4.1-1) is introducing the issue.

Reverting "make" back down to version 4.3-4.1 solves the issue
and lets "dpkg-buildpackage" run lightning fast again.

Looking at the make changelog, this seems related:
    * New upstream version 4.4. Closes: #1029106.
      - Exports variables to commands started by $(shell ...).

That is indeed probably the reason; I’ve seen more significant speed
degradation in gcc-mingw-w64 for example (fixed by avoiding recursive
expansions).

Could you qualify “incredible slow”? In my tests, vim fails its tests
so I can’t measure the speed difference, and neomutt went from a 1 min
build in testing (on my 10-year-old system) to 1:30, which is
significant but not incredibly slow in my book. There is a noticeable
pause whenever debian/rules is loaded, so Make is definitely doing too
much work.

True.

You probably won't notice on x86 and other fast machines.
Sometimes there the build takes 2 minutes instead of prior 1 minute.
So, it's 100% slower, but not a real problem.

That's different on parisc:
Physical parisc machines need to flush caches when a processes is spawned.
Cache flushes are generally slow and I think this is a problem on other
architectures (e.g. sparc?) as well.
It's even worse is on those buildds which are running linux-user.
Everytime a process is spawned, linux-user needs to assembly the file again,
and the build gets slowed down a lot.
Example:
https://buildd.debian.org/status/logs.php?pkg=neomutt&arch=hppa
On the physical machine "parisc" build time went up from 20 minutes (2024-11-24)
to 1:10 hours (2025-01-05).

I’ll try to come up with a minimal reproducer and forward the issue
upstream.

Btw, I got some numbers how often dpkg_buildflags is called by running 
something like:
strace -f dpkg-buildpackage -B -nc 2>&1 | grep buildflags > some_file
wc -l some_file

Thanks!
Helge

Reply via email to