Debian Bug report logs - #715494
apt-pkg: out-of-date pkgcache.bin: /var/lib/dpkg/status updated more than once in one second

version graph

Package: apt; Maintainer for apt is APT Development Team <[email protected]>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Philipp Hahn <[email protected]>

Date: Tue, 9 Jul 2013 17:15:02 UTC

Severity: normal

Found in version apt/0.8.10

Full log


🔗 View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#715494: apt-pkg: out-of-date pkgcache.bin: /var/lib/dpkg/status updated more than once in one second
Reply-To: Philipp Hahn <[email protected]>, [email protected]
Resent-From: Philipp Hahn <[email protected]>
Resent-To: [email protected]
Resent-CC: APT Development Team <[email protected]>
X-Loop: [email protected]
Resent-Date: Tue, 09 Jul 2013 17:15:02 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: report 715494
X-Debian-PR-Package: apt
X-Debian-PR-Keywords: 
X-Debian-PR-Source: apt
Received: via spool by [email protected] id=B.13733899127166
          (code B); Tue, 09 Jul 2013 17:15:02 +0000
Received: (at submit) by bugs.debian.org; 9 Jul 2013 17:11:52 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02
	(2011-06-06) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-11.9 required=4.0 tests=BAYES_00,FOURLA,HAS_PACKAGE,
	MURPHY_DRUGS_REL8,T_RP_MATCHES_RCVD,XMAILER_REPORTBUG autolearn=ham
	version=3.3.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 15; hammy, 151; neutral, 147; spammy,
	0. spammytokens: hammytokens:0.000-+--H*M:reportbug, 0.000-+--H*MI:reportbug,
	0.000-+--H*x:reportbug, 0.000-+--H*UA:reportbug, 0.000-+--H*x:6.4.4
Received: from mail.univention.de ([82.198.197.8])
	by buxtehude.debian.org with esmtp (Exim 4.80)
	(envelope-from <[email protected]>)
	id 1UwbSC-0001qs-2a
	for [email protected]; Tue, 09 Jul 2013 17:11:52 +0000
Received: from localhost (localhost [127.0.0.1])
	by slugis.knut.univention.de (Postfix) with ESMTP id 092F2141B79A
	for <[email protected]>; Tue,  9 Jul 2013 19:05:22 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by slugis.knut.univention.de (Postfix) with ESMTP id E9A24141B7A1
	for <[email protected]>; Tue,  9 Jul 2013 19:05:21 +0200 (CEST)
X-Virus-Scanned: by amavisd-new-2.6.1 (20080629) (Debian) at
	knut.univention.de
Received: from mail.univention.de ([127.0.0.1])
	by localhost (slugis.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id JvI0cDbTIY38; Tue,  9 Jul 2013 19:05:21 +0200 (CEST)
Received: from stave.knut.univention.de (stave.knut.univention.de [192.168.0.191])
	by slugis.knut.univention.de (Postfix) with ESMTPSA id 6ECB2141B79A;
	Tue,  9 Jul 2013 19:05:21 +0200 (CEST)
Received: by stave.knut.univention.de (Postfix, from userid 2260)
	id 66B60412F5; Tue,  9 Jul 2013 19:05:23 +0200 (CEST)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Philipp Hahn <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Message-ID: <[email protected]>
X-Mailer: reportbug 6.4.4
Date: Tue, 09 Jul 2013 19:05:23 +0200
X-Greylist: delayed 380 seconds by postgrey-1.34 at buxtehude; Tue, 09 Jul 2013 17:11:51 UTC
Delivered-To: [email protected]
Package: apt
Version: 0.8.10
Severity: normal

Dear Maintainer,

we (Univention GmbH) provide a Debian based distribution called "UCS".
During automatic testing we noticed a suitable bug in APT:

If /var/lib/dpkg/status is updated more than once in one second, apt-pkg
does not detect that and does not update its /var/cache/apt/pkgcache.bin
file.
"dpkg-query -W" and "apt-cache policy" then display different versions
for the currently installed version.

I tracked it down to apt-pkg/pkgcache.cc and apt-pkg/deb/debindexfile.cc
only using 'stat.mtime' without the nano-second resolution in 'tv_nsec',
which more modern Linux kernels do provide.

Would you accept a patch which adds (conditional) support for that, or
do you prefer a different solution.


The bug is more likely to happen on fast machines and in virtual
machines, where the expensive disk sync get filtered out.

The full bug information is available in our public Bugzilla at
<https://forge.univention.org/bugzilla/show_bug.cgi?id=31773>

Sincerely
Philipp Hahn <[email protected]>
-- Package-specific info:

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt depends on:
ii  debian-archive-keyring  2012.4
ii  gnupg                   1.4.12-7
ii  libapt-pkg4.12          0.9.7.9
ii  libc6                   2.13-38
ii  libgcc1                 1:4.7.2-5
ii  libstdc++6              4.7.2-5

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc     <none>
ii  aptitude    0.6.8.2-1
ii  dpkg-dev    1.16.10
ii  python-apt  0.8.8.2
ii  xz-utils    5.1.1alpha+20120614-2

-- no debconf information

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 09:18:16 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.