[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#762743: apt: apt-get update race(?)/issue leading to unexpected upgrades



Package: apt
Version: 0.9.7.9+deb7u5

Hi,

I noticed (a couple times now) that apt-get sometimes ends up trying to
upgrade all my stable packages to their wheezy-backports versions on
debian.org systems.

The default policy is mostly the same over all debian.org systems, but
I've attached one example to this report.

I could reproduce the behavior like this:

| root@arm-arm-02:~# find /var/lib/apt -type f | xargs rm
| root@arm-arm-02:~# apt-get update
| Get:1 http://db.debian.org lenny Release.gpg [198 B]
| Get:2 http://security.debian.org wheezy/updates Release.gpg [836 B]
| Get:3 http://db.debian.org lenny Release [17.8 kB]
| Get:4 http://security.debian.org wheezy/updates Release [102 kB]
| Get:5 http://ftp.uk.debian.org wheezy-backports Release.gpg [836 B]
| Get:6 http://db.debian.org lenny/main armhf Packages [19.3 kB]
| Get:7 http://ftp.uk.debian.org wheezy Release.gpg [1655 B]
| Get:8 http://ftp.uk.debian.org wheezy-updates Release.gpg [836 B]
| Get:9 http://ftp.uk.debian.org wheezy-backports Release [147 kB]
| Get:10 https://buildd.debian.org wheezy Release.gpg [490 B]
| Get:11 https://buildd.debian.org wheezy Release [52.4 kB]
| Get:12 http://security.debian.org wheezy/updates/main armhf Packages [258 kB]
| Ign http://db.debian.org lenny/main Translation-en
| Get:13 https://buildd.debian.org wheezy/main armhf Packages [6131 B]
| Get:14 http://ftp.uk.debian.org wheezy Release [168 kB]
| Get:15 http://ftp.uk.debian.org wheezy-updates Release [124 kB]
| Ign https://buildd.debian.org wheezy/main Translation-en
| Get:16 http://security.debian.org wheezy/updates/contrib armhf Packages [20 B]
| Get:17 http://security.debian.org wheezy/updates/non-free armhf Packages [20 B]
| Get:18 http://security.debian.org wheezy/updates/contrib Translation-en [14 B]
| Get:19 http://security.debian.org wheezy/updates/main Translation-en [122 kB]
| Get:20 http://ftp.uk.debian.org wheezy-backports/main armhf Packages [591 kB]
| Get:21 http://security.debian.org wheezy/updates/non-free Translation-en [14 B]
| Get:22 http://ftp.uk.debian.org wheezy-backports/contrib armhf Packages [5456 B]
| Get:23 http://ftp.uk.debian.org wheezy-backports/non-free armhf Packages [5324 B]
| Get:24 http://ftp.uk.debian.org wheezy-backports/contrib Translation-en [6023 B]
| Get:25 http://ftp.uk.debian.org wheezy-backports/main Translation-en [313 kB]
| Get:26 http://ftp.uk.debian.org wheezy-backports/non-free Translation-en [19.9 kB]
| Get:27 http://ftp.uk.debian.org wheezy/main armhf Packages [7433 kB]
| 58% [27 Packages 3497 kB/7433 kB 47%]                                                                                                           683 kB/s 5s^C
[^C'ed apt-get update]

| root@arm-arm-02:~# apt-get -s dist-upgrade
| Reading package lists... Done
| Building dependency tree... Done
| Calculating upgrade... Done
| The following NEW packages will be installed:
|   init-system-helpers iproute2 libjson-c2 libserf-1-1 libudev1 monitoring-plugins-basic monitoring-plugins-common openssh-sftp-server
| The following packages will be upgraded:
|   debootstrap facter git git-core git-man git-svn iproute ipython libgeoip1 libgpg-error0 libjson0 libldns1 libp11-kit0 libsvn-perl libsvn1 libunbound2
|   libxapian22 mercurial mercurial-common mksh monit nagios-plugins-basic nagios-plugins-common openssh-client openssh-server pdksh rcs ssh subversion
|   subversion-tools tar tmux udev unbound unbound-anchor unbound-host whois
| 37 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
| Inst tar [1.26+dfsg-0.1] (1.27.1-1~bpo70+1 Debian Backports:/wheezy-backports [armhf])
| Conf tar (1.27.1-1~bpo70+1 Debian Backports:/wheezy-backports [armhf])
...

apt-cache policy tar then reports:
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.27.1-1~bpo70+1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://ftp.uk.debian.org/debian/ wheezy-backports/main armhf Packages
}  *** 1.26+dfsg-0.1 0
}         100 /var/lib/dpkg/status

Note: stable is missing.


In the cases I observed "in the wild", I obviously didn't abort
apt-get's update run.

I suspect the issue there might be something else, like a different apt-get
update run running by somebody else or some monitoring script.


Another way to reproduce this:

} root@bm-bl11:~# while : ; do apt-cache policy tar; sleep 0.2; done

Now run apt-get update in a second shell.

The output is:
...
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.26+dfsg-0.1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         500 http://mirror.bm.debian.org/debian/ wheezy/main amd64 Packages
}         100 /var/lib/dpkg/status
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.27.1-1~bpo70+1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         100 /var/lib/dpkg/status
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.27.1-1~bpo70+1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         100 /var/lib/dpkg/status
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.27.1-1~bpo70+1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         100 /var/lib/dpkg/status
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.26+dfsg-0.1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         100 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         500 http://mirror.bm.debian.org/debian/ wheezy/main amd64 Packages
}         100 /var/lib/dpkg/status
} E: Problem renaming the file /var/cache/apt/pkgcache.bin.cTZxL4 to /var/cache/apt/pkgcache.bin - rename (2: No such file or directory)
} W: You may want to run apt-get update to correct these problems
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.26+dfsg-0.1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         500 http://mirror.bm.debian.org/debian/ wheezy/main amd64 Packages
}         100 /var/lib/dpkg/status
} tar:
}   Installed: 1.26+dfsg-0.1
}   Candidate: 1.26+dfsg-0.1
}   Version table:
}      1.27.1-1~bpo70+1 0
}         200 http://mirror.bm.debian.org/debian/ wheezy-backports/main amd64 Packages
}  *** 1.26+dfsg-0.1 0
}         500 http://mirror.bm.debian.org/debian/ wheezy/main amd64 Packages
}         100 /var/lib/dpkg/status
...

So there's a window where wheezy-backports has the most preferred version.

Cheers,
weasel
-- 
                           |  .''`.       ** Debian **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/
weasel@master:~$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://debian.netcologne.de/debian/ wheezy-updates/non-free Translation-en
 500 http://debian.netcologne.de/debian/ wheezy-updates/main Translation-en
 500 http://debian.netcologne.de/debian/ wheezy-updates/contrib Translation-en
 500 http://debian.netcologne.de/debian/ wheezy-updates/non-free amd64 Packages
     release o=Debian,a=stable-updates,n=wheezy-updates,l=Debian,c=non-free
     origin debian.netcologne.de
 500 http://debian.netcologne.de/debian/ wheezy-updates/contrib amd64 Packages
     release o=Debian,a=stable-updates,n=wheezy-updates,l=Debian,c=contrib
     origin debian.netcologne.de
 500 http://debian.netcologne.de/debian/ wheezy-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=wheezy-updates,l=Debian,c=main
     origin debian.netcologne.de
 500 http://security.debian.org/ wheezy/updates/non-free Translation-en
 500 http://security.debian.org/ wheezy/updates/main Translation-en
 500 http://security.debian.org/ wheezy/updates/contrib Translation-en
 500 http://security.debian.org/ wheezy/updates/non-free amd64 Packages
     release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=non-free
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/contrib amd64 Packages
     release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=contrib
     origin security.debian.org
 500 http://security.debian.org/ wheezy/updates/main amd64 Packages
     release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=main
     origin security.debian.org
 500 http://debian.netcologne.de/debian/ wheezy/non-free Translation-en
 500 http://debian.netcologne.de/debian/ wheezy/main Translation-nb
 500 http://debian.netcologne.de/debian/ wheezy/main Translation-en
 500 http://debian.netcologne.de/debian/ wheezy/contrib Translation-en
 500 http://debian.netcologne.de/debian/ wheezy/non-free amd64 Packages
     release v=7.6,o=Debian,a=stable,n=wheezy,l=Debian,c=non-free
     origin debian.netcologne.de
 500 http://debian.netcologne.de/debian/ wheezy/contrib amd64 Packages
     release v=7.6,o=Debian,a=stable,n=wheezy,l=Debian,c=contrib
     origin debian.netcologne.de
 500 http://debian.netcologne.de/debian/ wheezy/main amd64 Packages
     release v=7.6,o=Debian,a=stable,n=wheezy,l=Debian,c=main
     origin debian.netcologne.de
 500 http://db.debian.org/debian-admin/ lenny/main amd64 Packages
     release o=debian-admin@lists.debian.org,a=stable,n=lenny,c=main
     origin db.debian.org
 500 http://debian.netcologne.de/debian/ wheezy-backports/non-free Translation-en
 500 http://debian.netcologne.de/debian/ wheezy-backports/main Translation-en
 500 http://debian.netcologne.de/debian/ wheezy-backports/contrib Translation-en
 200 http://debian.netcologne.de/debian/ wheezy-backports/non-free amd64 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=non-free
     origin debian.netcologne.de
 200 http://debian.netcologne.de/debian/ wheezy-backports/contrib amd64 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=contrib
     origin debian.netcologne.de
 200 http://debian.netcologne.de/debian/ wheezy-backports/main amd64 Packages
     release v=,o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports,c=main
     origin debian.netcologne.de
 500 http://mirror.ayous.org/debian/ wheezy/main Translation-nb
 500 http://mirror.ayous.org/debian/ wheezy/main Translation-en
 500 http://mirror.ayous.org/debian/ wheezy/main amd64 Packages
     release v=7.6,o=Debian,a=stable,n=wheezy,l=Debian,c=main
     origin mirror.ayous.org
Pinned packages:
     sbuild -> (not found)
     libsbuild-perl -> (not found)
     buildd -> (not found)

Reply to: