Welcome! Log In Create A New Profile

Advanced

wheezy: apt fails to upgrade itself (segfaults)

Posted by TEN 
TEN
wheezy: apt fails to upgrade itself (segfaults)
February 17, 2016 03:24PM
As https://security-tracker.debian.org/tracker/CVE-2015-7547 is about to get fixed for wheezy, I tried to make sure apt-get update && apt-get upgrade have the latest info, however what could I do about the issue below?

Preparing to replace apt 0.9.7.9+deb7u2 (using .../apt_0.9.7.9+deb7u7_armel.deb) ...
Unpacking replacement apt ...
Processing triggers for man-db ...
Setting up apt (0.9.7.9+deb7u7) ...
Segmentation fault
Segmentation fault
dpkg: error processing apt (--configure):
subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
apt
E: Sub-process /usr/bin/dpkg returned an error code (1)
Re: wheezy: apt fails to upgrade itself (segfaults)
February 18, 2016 02:56AM
I just tried to upgrade apt myself and I believe I was successful. Here's my output:
Preparing to replace apt 0.9.7.9+deb7u2 (using .../apt_0.9.7.9+deb7u7_armel.deb) ...
Unpacking replacement apt ...
Processing triggers for man-db ...
Setting up apt (0.9.7.9+deb7u7) ...
gpg: key B98321F9: "Squeeze Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>" not changed
gpg: key 65FFB764: "Wheezy Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 46925553: "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>" not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
It looks like it runs apt-key update after it unpacks everything and that may be where the Segmentation faults are coming from. What happens if you try to run apt-key update?

Disclaimer: I'm about as far from an expert in this as I could be.

-JT
TEN
Re: wheezy: apt fails to upgrade itself (segfaults)
February 18, 2016 11:21AM
renojim Wrote:
-------------------------------------------------------
> I just tried to upgrade apt myself and I believe I
> was successful. Here's my output:
Preparing
> to replace apt 0.9.7.9+deb7u2 (using
> .../apt_0.9.7.9+deb7u7_armel.deb) ...
> Unpacking replacement apt ...
> Processing triggers for man-db ...
> Setting up apt (0.9.7.9+deb7u7) ...
> gpg: key ...
> gpg: Total number processed: 4
> gpg:              unchanged: 4
> It looks like it runs apt-key update after
> it unpacks everything and that may be where the
> Segmentation faults are coming from. What happens
> if you try to run apt-key update?
Segmentation fault
Segmentation fault
...expectedly.

Removing the following had no effect: /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin
(even when followed by apt-get update && apt-get upgrade)

apt-get install aptitude
fails as above after "Setting up apt (0.9.7.9+deb7u7) ..."
so I can't get to that workaround either: aptitude reinstall apt-get (etc.)

I also get /usr/sbin/dpkg-reconfigure: apt is broken or not fully installed

Tried these to no avail:
dpkg -r apt
# it seems apt-get & apt-key aren't actually going away - though dpkg --contents shows them in the above package
dpkg -r apt-utils
dpkg -i /var/cache/apt/archives/apt_0.9.7.9+deb7u7_armel.deb
dpkg -i /var/cache/apt/archives/apt-utils_0.9.7.9+deb7u7_armel.deb
dpkg-reconfigure libapt-pkg4.12
dpkg-reconfigure libapt-inst1.5
dpkg-reconfigure gnupg
dpkg-reconfigure gpgv
Re: wheezy: apt fails to upgrade itself (segfaults)
February 18, 2016 05:05PM
So maybe the apt-key binary is corrupted? Can you run it with no parameters? It should print out some help.

-JT
TEN
Re: wheezy: apt fails to upgrade itself (segfaults)
February 19, 2016 01:38AM
renojim Wrote:
-------------------------------------------------------
> So maybe the apt-key binary is corrupted? Can you
> run it with no parameters? It should print out
> some help.

It does, it's rather gpg that segfaults even without parameters and after dpkg-reconfigure gnupg && dpkg-reconfigure gpgv (and I wonder if these are safe to reinstall without knocking SSH offline in the process, in case anything is shared in key management).
Re: wheezy: apt fails to upgrade itself (segfaults)
February 19, 2016 03:57PM
I was able to update both of them with apt-get with no problem, but I suppose that's not an option for you.

-JT
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: