Lately there seems to be a rash of the APT package management system suddenly dying on Debian / Ubuntu based systems.  Troubleshooting this on a Linux Mint 17 install using MATE, we discovered several possible palliative measures along with a working solution to the problem of apt hitting a segmentation fault and crashing during cache loading.


GUI Apps

  • Synaptic and Software Manager simply don’t start at all, bombing out silently before displaying the UI.
  • Update Manager always displays “Your system is up to date” even after manually refreshing.

CLI Apps

  • apt-get update breaks and reports a segmentation fault:
    Ign trusty/universe Translation-en_US                
    Fetched 3,438 kB in 27s (125 kB/s)                                             
    Segmentation fault
    E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
    E: Sub-process returned an error code
  • aptitude will display “Loading Cache” and then bomb out with the unhelpful message “Ouch! Got SIGSEGV, dying..”


The first thing to check on the troubled system is dmesg and syslog for clues:

$ dmesg | grep apt
Oct  8 10:28:22 etown kernel: [ 4807.432466] aptitude[5868]: 
segfault at 7f13ee640fc4 ip 00007f13f21180d7 sp 00007fff1d7ce6a0 
error 6 in[7f13f2029000+144000]

$syslog | grep apt
Oct  8 11:01:48 etown kernel: [ 6814.538186] apt-show-versio[6794]: 
segfault at 7f56ef3cdfc4 ip 00007f56f04310d7 sp 00007ffd2bb5e060 
error 6 in[7f56f0342000+144000]

So either log can provide us with a clue as to what’s going on – in this case, a segfault originating in the library


While this segmentation fault issue with apt is a known bug, the package maintainer is unwilling/unable to address the problem. 

Fortunately, a work around can be found in the comments courtesy of Ken Sharp (kennybobs).  All one need do (as root) is to edit /etc/apt/apt.conf.d/70debconf and add the following setting to the end of the file: 

APT::Cache-start 200000000;

This will allot enough memory for apt to run without segfault.

Other methods that were tried and failed included

Related Posts
Recently we needed to re-purpose an Ubuntu workstation as a server.  Since it was already running some of the services the server was to provide, we didn't want to wipe ...
Start Menu Bitdefender
While malware and viruses on Linux machines are quite rare, on Windows dual boot machines it can be useful to have a scanner that can evaluate the Windows installations while ...
Installing Webalizer and Publishing Analytics to Your Website
For Linux users hosting their own websites using Apache, the log files provide a wealth of analytics information about bandwidth usage, visitor locales, referrers & keywords, etc.  However, they're not ...
I dislike Ubuntu's built in remote desktop service, and use x11vnc instead. Recently I was having a terrible time recently remotely accessing an Ubuntu+Gnome workstation: when I connect from a ...
Linux: Disable GUI on Start Up
Review: Anti-virus Scanners for Linux Workstations (Part 1)
Installing Webalizer and Publishing Analytics to Your Website
Getting Shift Key Working With x11vnc and VNC