4

Suddenly aptitude and apt are both bombing with segfaults; it seems to be related to the cache, as in aptitude I see the message "loading cache" before it dies:

Ouch!  Got SIGSEGV, dying..

From apt-get update:

Ign http://archive.ubuntu.com 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

From syslog after aptitude run:

Oct  8 10:28:22 etown kernel: [ 4807.432466] aptitude[5868]: segfault at 7f13ee640fc4 ip 00007f13f21180d7 sp 00007fff1d7ce6a0 error 6 in libapt-pkg.so.4.12.0[7f13f2029000+144000]

From syslog after apt-get update run:

Oct  8 11:01:48 etown kernel: [ 6814.538186] apt-show-versio[6794]: segfault at 7f56ef3cdfc4 ip 00007f56f04310d7 sp 00007ffd2bb5e060 error 6 in libapt-pkg.so.4.12.0[7f56f0342000+144000]

I've tried increasing the cache-limit in the conf files to no avail:

APT::Cache-Limit "10000000000";

Any ideas out there in guru-land that I might try?

8
  • 1
    Have you tried rm -rf /var/cache/apt/*.bin
    – snoop
    Oct 8, 2015 at 18:03
  • @snoop: yes, no joy there.
    – Logos
    Oct 8, 2015 at 18:05
  • 1
    try using sudo find / -name libapt-pkg.so . I did not found any, but maybe you may need to reinstall it by hand, as *.so files are shared librarys. Oct 8, 2015 at 18:18
  • @LittleByBlue: I don't see how that would relate to a segfault?
    – Logos
    Oct 8, 2015 at 18:19
  • 1
    @Logos try to get a new libapt-pkg.so.4.12.0 and put it where the old package is Oct 8, 2015 at 18:24

2 Answers 2

2

Work around found in an ubuntu bug report, requires appending a new line to /etc/apt/apt.conf.d/70debconf:

APT::Cache-start 200000000;

This works around the issue. I don't understand why I need to tell APT to allocate more than the default amount of memory to stop it segfaulting, but I do! There's a bug here somewhere.

Many thanks to @LittleByBlue and @Sagar for pointing me in the right direction by focusing attention on libapt-pkg.so.4.12.0.

2
  • @fabby: I'm sure that if they are bothered they are perfectly capable of saying so themselves. However, given that this answer is not one that was provided in their comments and is not in fact even tangentially related to either of their suggestions, it's hardly a slight. (If I were you, I'd actually ask potentially slighted parties first, before taking it upon oneself to speak on their behalf by lecturing someone on a rather iffy point of etiquette)
    – Logos
    Oct 8, 2015 at 23:22
  • As per your request...
    – Fabby
    Oct 8, 2015 at 23:29
2

The above comment did the trick for me:

rm -rf /var/cache/apt/*.bin

If that doesn't cut it you could also try

rm -rf /var/cache/apt/*

Note that this segfaults are very specific, so this probably won't work in your case.

1
  • Tried and didn't help me... Must be system specific?
    – NerdOfCode
    Mar 16, 2018 at 3:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .