Debian Bug report logs - #577756
dpkg: rename deferral broken

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg.

Reported by: Colin Watson <cjwatson@ubuntu.com>

Date: Wed, 14 Apr 2010 09:06:01 UTC

Severity: important

Tags: patch

Found in version dpkg/1.15.6.1

Fixed in version dpkg/1.15.7

Done: Guillem Jover <guillem@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#577756; Package dpkg. (Wed, 14 Apr 2010 09:06:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <cjwatson@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 14 Apr 2010 09:06:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Colin Watson <cjwatson@ubuntu.com>
To: submit@bugs.debian.org
Subject: dpkg: rename deferral broken
Date: Wed, 14 Apr 2010 10:02:52 +0100
[Message part 1 (text/plain, inline)]
Package: dpkg
Version: 1.15.6.1
Severity: important
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch lucid

The fsync/rename deferral in 1.15.6.1 doesn't actually seem to work
properly; strace doesn't show fsync at all for tarobjects.  No wonder it
performed well!  Admittedly I'm testing with my attempt to backport this
change to Ubuntu, but nevertheless I think I found a real bug:

  if (ti->Type == NormalFile0 || ti->Type == NormalFile0) {

The second of those should be NormalFile1.  Since modern tar files
generally use NormalFile1 rather than NormalFile0, the rename-deferral
path is never taken.

Performance testing will need to be repeated after fixing this bug.  On
ext3, using Ubuntu's linux-headers-2.6.32-20_2.6.32-20.30_all.deb as a
test case, unpack times are within noise before and after the
fsync/rename deferral change with this bug fixed.  I'm seeking testing
on ext4.

Patch attached.

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]
[0001-dpkg-fix-rename-deferral.patch (text/x-diff, attachment)]

Added tag(s) pending. Request was from Raphaël Hertzog <hertzog@debian.org> to control@bugs.debian.org. (Wed, 14 Apr 2010 09:33:09 GMT) Full text and rfc822 format available.

Message sent on to Colin Watson <cjwatson@ubuntu.com>:
Bug#577756. (Wed, 14 Apr 2010 09:33:12 GMT) Full text and rfc822 format available.

Message #10 received at 577756-submitter@bugs.debian.org (full text, mbox):

From: Raphaël Hertzog <hertzog@debian.org>
To: 577756-submitter@bugs.debian.org
Subject: Bug#577756 marked as pending
Date: Wed, 14 Apr 2010 09:32:22 +0000
tag 577756 pending
thanks

Hello,

Bug #577756 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:

    http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=3927a9d

---
commit 3927a9d6e64297330b61a38755bee20d45c7b166
Author: Colin Watson <cjwatson@ubuntu.com>
Date:   Wed Apr 14 10:00:18 2010 +0100

    dpkg: fix rename deferral
    
    Modern tar files typically use NormalFile1 rather than NormalFile0 for
    file objects.  A typo meant that the former never triggered rename
    deferral.

diff --git a/debian/changelog b/debian/changelog
index 3c14cc8..ab6ce47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,11 @@ dpkg (1.15.6.2) UNRELEASED; urgency=low
     should now start using dpkg-buildflags instead. Closes: #560070
   * For Ubuntu set default value of LDFLAGS to -Wl,-Bsymbolic-functions.
 
+  [ Colin Watson ]
+  * Modern tar files typically use NormalFile1 rather than NormalFile0 for
+    file objects. A typo meant that the former never triggered rename
+    deferral. Closes: #577756
+
   [ Updated dpkg translations ]
   * German (Sven Joachim).
 




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#577756; Package dpkg. (Wed, 14 Apr 2010 09:45:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Raphael Hertzog <hertzog@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 14 Apr 2010 09:45:09 GMT) Full text and rfc822 format available.

Message #15 received at 577756@bugs.debian.org (full text, mbox):

From: Raphael Hertzog <hertzog@debian.org>
To: Colin Watson <cjwatson@ubuntu.com>, 577756@bugs.debian.org
Subject: Re: Bug#577756: dpkg: rename deferral broken
Date: Wed, 14 Apr 2010 11:32:54 +0200
On Wed, 14 Apr 2010, Colin Watson wrote:
> The fsync/rename deferral in 1.15.6.1 doesn't actually seem to work
> properly; strace doesn't show fsync at all for tarobjects.  No wonder it
> performed well!  Admittedly I'm testing with my attempt to backport this
> change to Ubuntu, but nevertheless I think I found a real bug:
> 
>   if (ti->Type == NormalFile0 || ti->Type == NormalFile0) {
> 
> The second of those should be NormalFile1.  Since modern tar files
> generally use NormalFile1 rather than NormalFile0, the rename-deferral
> path is never taken.

Good catch, I applied your patch.

Cheers,
-- 
Raphaël Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/




Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. (Wed, 21 Apr 2010 03:36:30 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <cjwatson@ubuntu.com>:
Bug acknowledged by developer. (Wed, 21 Apr 2010 03:36:30 GMT) Full text and rfc822 format available.

Message #20 received at 577756-close@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: 577756-close@bugs.debian.org
Subject: Bug#577756: fixed in dpkg 1.15.7
Date: Wed, 21 Apr 2010 03:34:28 +0000
Source: dpkg
Source-Version: 1.15.7

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.15.7_all.deb
  to main/d/dpkg/dpkg-dev_1.15.7_all.deb
dpkg_1.15.7.dsc
  to main/d/dpkg/dpkg_1.15.7.dsc
dpkg_1.15.7.tar.bz2
  to main/d/dpkg/dpkg_1.15.7.tar.bz2
dpkg_1.15.7_amd64.deb
  to main/d/dpkg/dpkg_1.15.7_amd64.deb
dselect_1.15.7_amd64.deb
  to main/d/dpkg/dselect_1.15.7_amd64.deb
libdpkg-dev_1.15.7_amd64.deb
  to main/d/dpkg/libdpkg-dev_1.15.7_amd64.deb
libdpkg-perl_1.15.7_all.deb
  to main/d/dpkg/libdpkg-perl_1.15.7_all.deb



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 577756@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated dpkg 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 21 Apr 2010 04:05:55 +0200
Source: dpkg
Binary: libdpkg-dev dpkg dpkg-dev libdpkg-perl dselect
Architecture: source amd64 all
Version: 1.15.7
Distribution: unstable
Urgency: low
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Description: 
 dpkg       - Debian package management system
 dpkg-dev   - Debian package development tools
 dselect    - Debian package management front-end
 libdpkg-dev - Debian package management static library
 libdpkg-perl - Dpkg perl modules
Closes: 514316 546577 553928 556889 559519 560070 568566 574599 575706 575891 577756 578162
Changes: 
 dpkg (1.15.7) unstable; urgency=low
 .
   [ Raphaël Hertzog ]
   * Clarify the plan concerning dpkg-source, debian/source/format and
     the default source format in dpkg-source(1). Add a warning
     in dpkg-source to invite people to always create debian/source/format.
     We deprecate the fallback to "1.0" (it's there for backwards compatibility
     only) and debian/source/format is going to be mandatory at some point in
     the future. Closes: #553928
   * Add .gitattributes to list of files ignored by dpkg-source.
   * Document most common warnings and errors of dpkg-source in its manual
     page.
   * Let dpkg-source read options from debian/source/local-options as well but
     do not include that file in the generated source package.
   * Improve explanation of --all option in dpkg-parsechangelog(1). Thanks to
     Jari Aalto. Closes: #575706
   * Fix dpkg to not lose package metadata on filesystems where readdir()
     returns new files added after the opendir() call, btrfs in particular
     triggered the problematic behaviour. Closes: #575891
   * Tigthen the regex used by dpkg-source to match the component name of
     supplementary tarballs so that undercore (_) are not allowed as it was
     supposed to be.
   * Introduce a new script called dpkg-buildflags: its purpose is to retrieve
     compilation flags and it should be used within debian/rules to pass
     the right compilation flags to the build process. dpkg-builpackage still
     exports them to not break packages currently relying on them but packages
     should now start using dpkg-buildflags instead. Closes: #560070
   * For Ubuntu set default value of LDFLAGS to -Wl,-Bsymbolic-functions.
   * Cleanup some old Conflicts/Replaces, thanks to Helge Kreutzmann.
   * Modify dselect to treat all unknown package as known and marked for purge.
     This is a temporary work-around so that dselect doesn't try to reinstall
     packages of priority > standard that were removed or not installed. Thanks
     to Robert Luderda for the patch. Closes: #559519, #556889
   * dpkg now exports DPKG_MAINTSCRIPT_NAME to maintainer scripts with the
     type of maintainer script currently running (preinst, postinst, prerm,
     postrm). Closes: #546577
   * dpkg now exports DPKG_LIBDIR to maintainer scripts pointing to the
     private directory containing internal programs like the upcoming
     maintscript-helper.
   * Add $DPKG_LIBDIR/maintscript-helper program that can be used in
     maintainer scripts to perform common operations working around
     current dpkg limitations: first version supports removing obsolete
     conffiles and renaming conffiles. Closes: #514316
   * Fix "dpkg-scansources -e", it was calling a non-existing function.
     Closes: #578162
   * Add new script dpkg-mergechangelogs to do 3-way merges of Debian
     changelogs. Add libalgorithm-merge-perl to Recommends for the
     benefit of this script.
 .
   [ Colin Watson ]
   * Modern tar files typically use NormalFile1 rather than NormalFile0 for
     file objects. A typo meant that the former never triggered rename
     deferral. Closes: #577756
   * Use the new list of files on rename deferral instead of old one, so that
     newly added files get installed.
 .
   [ Guillem Jover ]
   * Report deferred trigger errors on status-fd. Closes: #574599
     Thanks to Michael Vogt <michael.vogt@ubuntu.com>.
   * When creating hard links to normal files on extraction use the .dpkg-new
     filename for source as the file is not yet in place due to the rename
     deferral. Thanks to Colin Watson for the initial patch.
   * Do not output the Package-Type field on udeb.
   * Fix versioned Replaces to not produce file overwrite errors on downgrades.
     Closes: #568566
   * Fix installation of replaced and replacing packages in reverse order
     (first the replacing then the replaced) for which the replaced package
     is supposed to get disappeared, to disappear the correct package and not
     lose track of the ownership of the replaced files.
 .
   [ Updated dpkg translations ]
   * German (Sven Joachim).
 .
   [ Updated dselect translations ]
   * German (Sven Joachim).
 .
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
 .
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).
Checksums-Sha1: 
 2f096f1027105eb1a9950692cda75d338c4b52c7 1213 dpkg_1.15.7.dsc
 fdf14a74370fb9daac4a67d703f6e60c20eaec51 4872332 dpkg_1.15.7.tar.bz2
 ccc84900a91c120d260153f3095a43445013548e 371632 libdpkg-dev_1.15.7_amd64.deb
 41ab7052b7d606749f434dc519388b6d1821ae22 2062348 dpkg_1.15.7_amd64.deb
 4a5fbbf048151f1468a00155cf13daa0ce6aea86 828512 dselect_1.15.7_amd64.deb
 6760d76f7b085b8e2c2d7f6dfec4d69984413823 648164 dpkg-dev_1.15.7_all.deb
 6a28af1efa9b249a4536b4cc10d8e61d9dfb9925 578192 libdpkg-perl_1.15.7_all.deb
Checksums-Sha256: 
 d8d261e40d6d0f48dd39dee867cfcb0eb2385423fc9ee5948657a6785406bddd 1213 dpkg_1.15.7.dsc
 f8d0a779361f3fd7f89a138cd632a4ab47f62ca1ccd0f393f2e81be899605e4f 4872332 dpkg_1.15.7.tar.bz2
 e8470ce90649f17a05f1e9d47e440ae2568feb0946e514431ba579130afe9378 371632 libdpkg-dev_1.15.7_amd64.deb
 077c270b0f31181081751b8a66a98a9ca598d1b64a689218e882d2841f8b6bbe 2062348 dpkg_1.15.7_amd64.deb
 0e0d45a5001dcbafbfb36b789b3c6316ddd7cb4d9d4d4cf847912a7273932aa7 828512 dselect_1.15.7_amd64.deb
 ca757de11c7a65791e67d807068ef5d592605dbce7632ed4b83d94715fb9acd0 648164 dpkg-dev_1.15.7_all.deb
 05fc8150c8b8ea29315d8a5f1a48d8cb7453d1ce1a95a3af492f3e8acec7461d 578192 libdpkg-perl_1.15.7_all.deb
Files: 
 2df9bfed2c1c2342da2196925ab597fb 1213 admin required dpkg_1.15.7.dsc
 f4638fd8a623aa48efd62b48644b1ab3 4872332 admin required dpkg_1.15.7.tar.bz2
 508f4f97ac08d1e23f98fad3801535fe 371632 libdevel optional libdpkg-dev_1.15.7_amd64.deb
 c9d13d664114569a3884721f52a2b8b5 2062348 admin required dpkg_1.15.7_amd64.deb
 ca86a0334edbbaef23354ada093473a6 828512 admin optional dselect_1.15.7_amd64.deb
 e850c25f7e57b1b570181b94522259de 648164 utils optional dpkg-dev_1.15.7_all.deb
 2ff2c47b5e043f0704b90b1245fb3614 578192 perl optional libdpkg-perl_1.15.7_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvOZUkACgkQuW9ciZ2SjJt4TgCeNn227r3zWFjOyy/12jo6WH9z
XLwAoNjTBZAyEb30antcMbFdZvgtP1h8
=egWK
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 19 May 2010 07:35:37 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 09:33:23 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.