Your message dated Sat, 12 Apr 2014 10:05:23 +0000
with message-id <[email protected]>
and subject line Bug#655334: fixed in par2cmdline 0.6.5-1
has caused the Debian Bug report #655334,
regarding par2 chooses inefficient block size (algorithm bug)
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.)
--
655334: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655334
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: par2
Version: 0.4-11
Severity: normal
Tags: upstream patch
A bug exists in the algorithm used by par2 to choose the best blocksize for a
recovery set.
If I request a certain block count, then the software tries to determine the
smallest block size that will satisfy this request.
It performs a binary search in par2creator.cpp lines 261 to 342, however it
then throws the result of the search away.
As a result, the algorithm always picks the mean of the upper bound and the
lower bound as the block size, unless all the input files are identical size.
This block size can be quite a bit bigger than required, which causes par2 to
generate bigger parity files than necessary.
This recently increased the number of DVDs that my backups consumed, which was
annoying.
I have created a patch that corrects the binary search algorithm.
It now returns the smallest block size that results in no more than the
requested number of blocks.
This patch should be passed upstream.
Matthew
-- System Information:
Debian Release: 6.0.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages par2 depends on:
ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.4.5-8 GCC support library
ii libstdc++6 4.6.1-4 GNU Standard C++ Library v3
par2 recommends no packages.
par2 suggests no packages.
-- no debconf information
--- orig/par2cmdline-0.4/par2creator.cpp 2004-04-15 14:48:41.000000000 +0100
+++ par2cmdline-0.4/par2creator.cpp 2012-01-10 13:20:47.000000000 +0000
@@ -263,8 +263,6 @@
u64 lowerBound = totalsize / sourceblockcount;
u64 upperBound = (totalsize + sourceblockcount - extrafiles.size() - 1) / (sourceblockcount - extrafiles.size());
- u64 bestsize = lowerBound;
- u64 bestdistance = 1000000;
u64 bestcount = 0;
u64 count;
@@ -280,34 +278,11 @@
count += ((i->FileSize()+3)/4 + size-1) / size;
}
- if (bestdistance > (count>sourceblockcount ? count-sourceblockcount : sourceblockcount-count))
- {
- bestdistance = (count>sourceblockcount ? count-sourceblockcount : sourceblockcount-count);
- bestcount = count;
- bestsize = size;
- }
- }
-
- // Work out how many blocks you get for the upper bound block size
- {
- size = upperBound;
-
- count = 0;
- for (ExtraFileIterator i=extrafiles.begin(); i!=extrafiles.end(); i++)
- {
- count += ((i->FileSize()+3)/4 + size-1) / size;
- }
-
- if (bestdistance > (count>sourceblockcount ? count-sourceblockcount : sourceblockcount-count))
- {
- bestdistance = (count>sourceblockcount ? count-sourceblockcount : sourceblockcount-count);
- bestcount = count;
- bestsize = size;
- }
+ bestcount = count;
}
// Use binary search to find best block size
- while (lowerBound+1 < upperBound)
+ while (lowerBound < upperBound)
{
size = (lowerBound + upperBound)/2;
@@ -317,28 +292,18 @@
count += ((i->FileSize()+3)/4 + size-1) / size;
}
- if (bestdistance > (count>sourceblockcount ? count-sourceblockcount : sourceblockcount-count))
- {
- bestdistance = (count>sourceblockcount ? count-sourceblockcount : sourceblockcount-count);
- bestcount = count;
- bestsize = size;
- }
-
- if (count < sourceblockcount)
- {
- upperBound = size;
- }
- else if (count > sourceblockcount)
+ if (count > sourceblockcount)
{
- lowerBound = size;
+ lowerBound = size + 1;
}
else
{
upperBound = size;
+ bestcount = count;
}
}
- size = bestsize;
+ size = lowerBound;
count = bestcount;
if (count > 32768)
--- End Message ---
--- Begin Message ---
Source: par2cmdline
Source-Version: 0.6.5-1
We believe that the bug you reported is fixed in the latest version of
par2cmdline, 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.
JCF Ploemen (jcfp) <[email protected]> (supplier of updated par2cmdline 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: Fri, 07 Mar 2014 15:24:21 +0100
Source: par2cmdline
Binary: par2
Architecture: source amd64
Version: 0.6.5-1
Distribution: unstable
Urgency: low
Maintainer: JCF Ploemen (jcfp) <[email protected]>
Changed-By: JCF Ploemen (jcfp) <[email protected]>
Description:
par2 - PAR 2.0 compatible file verification and repair tool
Closes: 655334 673225 724427
Changes:
par2cmdline (0.6.5-1) unstable; urgency=low
.
* New upstream release:
+ Switch sources to Github-based fork; the original project
(on Sourceforge) has been inactive for almost a decade.
+ Remove all patches: included upstream.
+ Fixes selection of inefficient block size (Closes: #655334).
* New maintainer (Closes: #673225).
* Switch to 3.0 (quilt) source format.
* Set priority to optional.
* Bump standards-version to 3.9.5 (from 3.8.3).
* Switch debian/rules to dh sequencer with autoreconf.
* Update build-deps:
+ Add dh-autoreconf.
+ Remove cdbs, autotools-dev, automake1.9 (Closes: #724427).
+ Set debhelper version and compat level to 9.
* Docs:
+ Replace PORTING and ROADMAP files with README.
+ Install upstream changelog.
* Man page:
+ Fix numerous instances of hyphens used as minus signs.
+ Install links to a single manpage instead of keeping around
multiple copies in the packaging.
* Refresh copyright:
+ List new upstream developers.
+ Add myself as a copyright holder for the packaging.
+ Switch to machine-readable format.
* Add Vcs-* fields.
Checksums-Sha1:
c0bf184380deb965c579767c13b794d1cf4852d5 1870 par2cmdline_0.6.5-1.dsc
eea4428711b52a6a729f6e2f82b518aca92cd47e 1142005 par2cmdline_0.6.5.orig.tar.gz
40e679ef836576ba836800cfe64de7ff16aae266 6536 par2cmdline_0.6.5-1.debian.tar.xz
8c9494fedcb821fa9e4ac402c1060991914d93a8 93168 par2_0.6.5-1_amd64.deb
Checksums-Sha256:
335426966e88ee5035f985736b0b1d87b53a87aa8d6bcd8ba261f6a55cc3a8b8 1870
par2cmdline_0.6.5-1.dsc
727d668fa932dda6a013248dc8b73e6c8805ccfa45fed6bf8d99b718bbaf44a1 1142005
par2cmdline_0.6.5.orig.tar.gz
14f5a1ebd36619bb64c26392b28885d2ad2857e794c3ff0cfcd9beb76d349dfa 6536
par2cmdline_0.6.5-1.debian.tar.xz
0b56a045903180de4200dad20bb0ef8e5c14c894e4cd69d199face7764bfdbc4 93168
par2_0.6.5-1_amd64.deb
Files:
1c01ba21c8c3e1da8888114c54b18f08 1870 utils optional par2cmdline_0.6.5-1.dsc
31fe6f6daea6644c2a5c0a50ff403c10 1142005 utils optional
par2cmdline_0.6.5.orig.tar.gz
deed477dfd3809fced8dd3e849f07439 6536 utils optional
par2cmdline_0.6.5-1.debian.tar.xz
4ecd0eaa93b3a703b7c47f7320ca8ce9 93168 utils optional par2_0.6.5-1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJTSQxvAAoJEI7tzBuqHzL/saoQAKWO9e2CNOi2Ucv4emm3VL4M
gcGvGMD27GRHcQm2e7dujfUO15Q//BwI8rqOJVPV99EKmwPupWnzoSWsDyNQMgIT
LyduoSz5rCo2uSVYsB8EXYkqSoH01XVrxEg4Aco+jxRAwuDA653xdT+MroTCuugw
xp3WHEv8e0OMqQEfZsPvDpbW6kDTrhBvHY4BklTBrJcRTvmLJhGZISBqkDdzK9De
RJ1D5sVkdyMRvqURZ9ON0lF26MOLaxM/+ScqpgOBwejFqo9+CQbUyEODms3I0JO3
SbSKbKS5K+B2Kw9cniqbVfgA2nq063g8AnTY3x9nrWfMxKIwzpCvN8GUWm0eB5fF
wlovqfNdJSYW2Q0NfDGGKcYIz5Yex+LvJgl34yDSskVcr75ZwLVYPJYEOh5Uv3P4
GkQ9XbTkC49HO00RQgnyEvQzEHvbQNzd0vUW6DatFQNePju5ZQKBWAguuVJu6gMP
O39zNFsaRo4BfZCcZFHwU1BWcGwD+Q0QB1j480HvQaXt1dcgYEBpnrmzbSkHKbC2
jlysWhSbKaqhKAuLjMFLmpjiUPpfL/kRXGgxintdsQR1ypLezsTlFIzBV5ocXeTw
8mmRbAO/f6/FFgvnAkiZeoWJ+KW/BktatgCMGCBcUqlF9/c+bOC6qN1kxERHXGj4
X73lWVqb0OM9mG9xjjid
=/vtO
-----END PGP SIGNATURE-----
--- End Message ---