Package: coreutils
Version: 9.7-3
Severity: normal
X-Debbugs-Cc: [email protected]
Dear Maintainer,
In Trixie, dd status=progress doesn't ever print status like it used to.
For instance, I'm testing this with
dd if=bigfile.img of=/dev/null status=progress
But it also happens when of is an SD card or other slow device, so this isn't
just an issue of /dev/null being fast.
On my system, the reason progress isn't shown is that in line 2181 of dd.c:
if (next_time <= progress_time)
one or both of these numbers is frequently negative, and at least on my system,
next_time is almost always greater than progress_time. So print_xfer_stats() is
never called.
This also means that next_time hardly ever gets incremented, because it only
gets incremented in the case where it's <= progress_time, which is almost never
true.
I'm not sure why it's going by time anyway; shouldn't it go by bytes copied?
If I change the line to
if (1 || next_time <= progress_time)
then I do see a progress indication. But obviously this isn't the best solution.
next_time and progress_time are type xtime_t, defined in lib/xtime.h as:
typedef long long int xtime_t;
Shouldn't they be declared as something unsigned, so they can't overflow and go
negative?
I wondered if that was the ultimate source of the problem, but I tried
redefininxtime_t as unsigned long long and it didn't fix the problem; next_time
was still usually greater than progress_time so next_time never got updated and
print_xfer_stats still never got called.
Some people apparently see progress, other people don't (a web search found
lots of people complaining about status=progress not working). I'm not sure
what the difference is, but I never see any progress indicators on my system (a
fairly vanilla x86_64-based Lenovo Carbon X1). Maybe some systems have a longer
"long long" than I do, for whatever reason?
-- System Information:
Debian Release: 13.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.86+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages coreutils depends on:
ii libacl1 2.3.2-2+b1
ii libattr1 1:2.5.2-3
ii libc6 2.41-12+deb13u2
ii libcap2 1:2.75-10+b8
ii libgmp10 2:6.3.0+dfsg-3
ii libselinux1 3.8.1-1
ii libssl3t64 3.5.5-1~deb13u2
ii libsystemd0 257.9-1~deb13u1
coreutils recommends no packages.
coreutils suggests no packages.
-- no debconf information