Your message dated Sun, 03 Mar 2024 19:49:51 +0000
with message-id <[email protected]>
and subject line Bug#1064453: fixed in fdupes 1:2.3.0-1
has caused the Debian Bug report #1064453,
regarding fdupes: Mistakenly assumes duplicates to have changed on armhf due to
conflicting off_t definition
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1064453: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064453
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: fdupes
Version: 1:2.2.1-1
Severity: normal
Dear Maintainer,
A script I am running on an armhf machine produces database snapshots.
Frequently, the snapshot is identical to the previous one, so I would
like to remove those using fdupes -qdN /path/to/dumps/.
After upgrading from Stretch to Bookworm (hitting all intermediate
releases in process), I started receiving the following output:
[+] /path/to/dumps/dump.2024-01-17_04:15:01.sql.xz
[!] /path/to/dumps/dump.2024-01-24_04:15:01.sql.xz -- unable to delete file:
File contents changed during processing!
[!] /path/to/dumps/dump.2024-01-31_04:15:01.sql.xz -- unable to delete file:
File contents changed during processing!
[!] /path/to/dumps/dump.2024-02-07_04:15:01.sql.xz -- unable to delete file:
File contents changed during processing!
[!] /path/to/dumps/dump.2024-02-21_04:15:01.sql.xz -- unable to delete file:
File contents changed during processing!
[!] /path/to/dumps/dump.2024-02-22_12:47:16.sql.xz -- unable to delete file:
File contents changed during processing!
Using GDB, I have traced this to the following situation: from fdupes.c, the
contents of dupelist look exactly right:
(gdb) frame 1
#1 0x004037e8 in deletefiles (files=0x42c7f8, prompt=0, tty=<optimized out>,
logfile=<optimized out>) at fdupes.c:1010
1010 if (removeifnotchanged(dupelist[x], &errorstring) == 0) {
(gdb) p *dupelist[x]
$47 = {d_name = 0x42c4d8 "/path/to/dumps/dump.2024-01-24_04:15:01.sql.xz", size
= 45664,
crcpartial = 0x423c68 "BD}\005\a\203\265H\004\204\206n\301T\343.15:0\031",
crcsignature = 0x423c98
"\232W\f\230B\2045\226\252\355\232Q\276\256\272ב\347U\342A\001", device = 2050,
inode = 41419299, mtime = 1706058902,
ctime = 1706058902, hasdupes = 0, duplicates = 0x42c390, next = 0x42c410}
The moment the execution reaches the function removeifnotchanged(), the
contents of dupelist start looking corrupted:
(gdb) frame 0
#0 removeifnotchanged (file=file@entry=0x42c490,
errorstring=errorstring@entry=0xbefff2d4) at removeifnotchanged.c:7
7 {
(gdb) p *file
$48 = {d_name = 0x42c4d8 "/path/to/dumps/dump.2024-01-24_04:15:01.sql.xz", size
= 0, crcpartial = 0xb260 <error: Cannot access memory at address 0xb260>,
crcsignature = 0x0, device = 18643971999939688, inode = 2050, mtime = 0,
ctime = 41419299, hasdupes = 0, duplicates = 0x65b06496, next = 0x65b06496}
The inode field now holds the value of the device field, and all the
pointers except the first one are plain wrong. This happens due to the
differences in the off_t type:
(gdb) frame 1
#1 0x004037e8 in deletefiles (files=0x42c7f8, prompt=0, tty=<optimized out>,
logfile=<optimized out>) at fdupes.c:1010
1010 if (removeifnotchanged(dupelist[x], &errorstring) == 0) {
(gdb) ptype /o dupelist[x]
type = struct _file {
/* 0 | 4 */ char *d_name;
/* XXX 4-byte hole */
/* 8 | 8 */ off_t size;
/* 16 | 4 */ md5_byte_t *crcpartial;
/* 20 | 4 */ md5_byte_t *crcsignature;
/* 24 | 8 */ dev_t device;
/* 32 | 8 */ ino_t inode;
/* 40 | 4 */ time_t mtime;
/* 44 | 4 */ time_t ctime;
/* 48 | 4 */ int hasdupes;
/* 52 | 4 */ struct _file *duplicates;
/* 56 | 4 */ struct _file *next;
/* XXX 4-byte padding */
/* total size (bytes): 64 */
} *
(gdb) frame 0
#0 removeifnotchanged (file=file@entry=0x42c490,
errorstring=errorstring@entry=0xbefff2d4) at removeifnotchanged.c:7
7 {
(gdb) ptype /o file
type = const struct _file {
/* 0 | 4 */ char *d_name;
/* 4 | 4 */ off_t size;
/* 8 | 4 */ md5_byte_t *crcpartial;
/* 12 | 4 */ md5_byte_t *crcsignature;
/* 16 | 8 */ dev_t device;
/* 24 | 4 */ ino_t inode;
/* 28 | 4 */ time_t mtime;
/* 32 | 4 */ time_t ctime;
/* 36 | 4 */ int hasdupes;
/* 40 | 4 */ struct _file *duplicates;
/* 44 | 4 */ struct _file *next;
/* total size (bytes): 48 */
} *
I think that fdupes.h must #include "config.h" in order to provide the
proper definition of off_t to every user of struct _file:
$ diff -u <(cpp removeifnotchanged.c) <((echo '#include "config.h"'; cat
removeifnotchanged.c) | cpp) | grep off_t
-typedef __off_t off_t;
+typedef __off64_t off_t;
- __off_t st_size;
-extern int fseeko (FILE *__stream, __off_t __off, int __whence);
-extern __off_t ftello (FILE *__stream) ;
The same problem may be present on other 32-bit architectures.
-- System Information:
Debian Release: 12.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'oldoldstable'), (500, 'stable')
Architecture: armhf (armv7l)
Kernel: Linux 4.14.180+ (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages fdupes depends on:
ii libc6 2.36-9+deb12u4
ii libncursesw6 6.4-4
ii libpcre2-32-0 10.42-1
ii libtinfo6 6.4-4
fdupes recommends no packages.
fdupes suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: fdupes
Source-Version: 1:2.3.0-1
Done: Sandro Tosi <[email protected]>
We believe that the bug you reported is fixed in the latest version of
fdupes, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sandro Tosi <[email protected]> (supplier of updated fdupes package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 03 Mar 2024 14:27:17 -0500
Source: fdupes
Architecture: source
Version: 1:2.3.0-1
Distribution: unstable
Urgency: medium
Maintainer: Sandro Tosi <[email protected]>
Changed-By: Sandro Tosi <[email protected]>
Closes: 1043587 1064453
Changes:
fdupes (1:2.3.0-1) unstable; urgency=medium
.
* New upstream release; Closes: #1043587, #1064453
* debian/control
- add libsqlite3-dev to b-d
Checksums-Sha1:
05288a6bbf91b92c7228ee31761d01c9e4b2de7c 1879 fdupes_2.3.0-1.dsc
e3306885ddfdff5afab159d2d0615a950ea975c9 45560 fdupes_2.3.0.orig.tar.xz
90082918e2c402694c2e36e3a16242ed9ce878d4 5148 fdupes_2.3.0-1.debian.tar.xz
171614e425ca2a6a67fbdcab2d2f95da3d00db4e 6908 fdupes_2.3.0-1_source.buildinfo
Checksums-Sha256:
383bbd4e4c6c8fd507eefd1b00088dd678de57b117491093963ac2b7f8938338 1879
fdupes_2.3.0-1.dsc
e196d307ec7ea2accae30392af2e4646a81f2e0832dc0ab306d70dd4794e93fe 45560
fdupes_2.3.0.orig.tar.xz
2c1e9f56e8407c02979028df6a4f8b1ef1f4139a967d31171d75da8add838fc0 5148
fdupes_2.3.0-1.debian.tar.xz
7affd710c4e9553cefc068ef29cfc4ebdc68a108c6058660f40e07f48efc21eb 6908
fdupes_2.3.0-1_source.buildinfo
Files:
3c60e3be1648352818b56368980f0980 1879 utils optional fdupes_2.3.0-1.dsc
1789dd2374d04a7f13cd71b5843d6679 45560 utils optional fdupes_2.3.0.orig.tar.xz
552af06babc224c3394392876c020532 5148 utils optional
fdupes_2.3.0-1.debian.tar.xz
d4e84e3e818cf99bfc87ccddef8708d9 6908 utils optional
fdupes_2.3.0-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEufrTGSrz5KUwnZ05h588mTgBqU8FAmXkzzMACgkQh588mTgB
qU9XbQ/+Mrhmg5D2ALs/Jc6xUR+wmbmdSuegbDE0s5oo08pcuPIi9AxGXK86rix9
lGZC1z6+OFW9z+GJBiTovJ1OqN6tkmpUEdU7sE4ANQ6P58AeEHrgQG7WzNE8XQXw
zAR4SaCUMLmlV5ruYmyOOdcSkziYg4ddJ4DPTUVvlmN6A35tCr1jcOHzsOjaIvyW
wW1/wnE3x21iE+lHb7Zknw+PO8RAJIFGS20xdjYs4kQMec8BPYkc058qtpy/BHbi
NclrNJDN8RZ/1ef/vKf+LcnAl5hUo/PqN89URKNjrepvk8ow0cYI/3wH+ewyXXsr
4FiW41rOMOUG2zA849lbrI6MWFR2mvjE2gZyxoFPXkyvBmBX+O01xSIhQeiDrj+1
crIjNVGMctD2n/XBibK7LhwGQl2VYxndGDzviPR26BRTdljgx+ADHq6eCpMrsBk5
5cOUfVCnaFWkjR/rpd5lwHFNlNFhyX/dA6tXqNMu3KIYFg+kZpvtiWznobBZE/72
o5vgP9kpqQwrkFs6y07bpfTbZO24fcABtDGM/1zTox0iine5EuqI2697fOX1umsj
/xCutz6WXN976mBNOGYzny8ZZSIs30l7meCJUhUer9ME7IF1lC64KRiXtO8x1YsP
SUs5RbGo/7v4Nd1FyKUgN4Xm28mgJfiPTES2v0wO/dbiERPOoxo=
=+VZf
-----END PGP SIGNATURE-----
pgpncdftzgerS.pgp
Description: PGP signature
--- End Message ---