apt-get: segmentation fault (jaunty)

Bug #341402 reported by Edmundo on 2009-03-11
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)

Bug Description

I last upgraded this morning. Now, apt-get fails when I try to do one update/upgrade/whatever (clean does work).

Here's a backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xb7c4e5eb in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) backtrace
#0 0xb7cac5eb in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7e62b33 in std::string::compare () from /usr/lib/libstdc++.so.6
#2 0xb7f611df in debPackagesIndex::FindInCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#3 0xb7f28372 in ?? () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#4 0xb7f28ae0 in pkgMakeStatusCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#5 0xb7f1f0c9 in pkgCacheFile::BuildCaches () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#6 0x080538da in ?? ()
#7 0xb7ee8ccf in CommandLine::DispatchArg () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#8 0x0805bc38 in ?? ()
#9 0xb7c4b775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#10 0x0804cdb1 in ?? ()

Edmundo (eantoranz) wrote :
Edmundo (eantoranz) wrote :
Edmundo (eantoranz) wrote :

I don't know if this will help you somehow.

I was using colombian repositories
..... I switched to venezuelan repositories and then I was able to use apt again.

(thank god for sed)

TJ (tj) wrote :

From the debugging we were doing on #ubuntu+1 it looks like the archive mirror update process may have been responsible for a temporary glitch in some of the files apt was relying upon.


Index of /ubuntu

[ICO] Name Last modified Size
[DIR] Parent Directory -
[ ] Archive-Update-in-Progress-drescher.canonical.com 12-Mar-2009 13:58 1
[ ] Archive-Update-in-Progress-syowa.canonical.com 12-Mar-2009 12:06 1
[DIR] dists/ 04-Dec-2008 22:08 -
[DIR] indices/ 12-Mar-2009 14:03 -
[ ] ls-lR.gz 12-Mar-2009 13:42 6.4M
[DIR] pool/ 14-Jan-2008 22:05 -
[DIR] project/ 13-Feb-2008 14:39 -

Apache/2.2.8 (Ubuntu) Server at co.archive.ubuntu.com Port 80

I just hit the same problem again. Does anybody want me to do
something so I can get some info for you before I switch repos to see
if it solves the problem again?

Edmundo (eantoranz) wrote :

This is the backtrace from apt-get update

#0 0xb7cb35eb in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7e69b33 in std::string::compare () from /usr/lib/libstdc++.so.6
#2 0xb7f681df in debPackagesIndex::FindInCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#3 0xb7f2f372 in ?? () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#4 0xb7f2fae0 in pkgMakeStatusCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#5 0xb7f260c9 in pkgCacheFile::BuildCaches () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#6 0x080538da in ?? ()
#7 0xb7eefccf in CommandLine::DispatchArg () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#8 0x0805bc38 in ?? ()
#9 0xb7c52775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#10 0x0804cdb1 in ?? ()

And this is from apt-cache search mplayer
#0 0xb7d3f5eb in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7ef6b33 in std::string::compare () from /usr/lib/libstdc++.so.6
#2 0xb7ff01df in debPackagesIndex::FindInCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#3 0xb7fb7372 in ?? () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#4 0xb7fb7ae0 in pkgMakeStatusCache () from /usr/lib/libapt-pkg-libc6.9-6.so.4.7
#5 0x0804e3ab in ?? ()
#6 0xb7cde775 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#7 0x0804aa11 in ?? ()

Edmundo (eantoranz) wrote :

Well.... I just switched the repos and I got a seg fault. What can I do then?

Timo Jyrinki (timo-jyrinki) wrote :

Try to get a tarball of /var/lib/apt (and possibly /var/lib/dpkg)

Timo Jyrinki (timo-jyrinki) wrote :

There was some discussion on IRC regarding the problem, and that was the instruction given back then. The issue is apparently somehow related to a server having it's Ubuntu contents updated. I don't know if someone would be interested in those tarballs, though also even the /var/lib/apt can be quite big I think (unless it compresses really well with gzip).

Edmundo (eantoranz) wrote :

I made bz2 files.

dpkg.bz2 is less than 6 MBs.... but apt.bz2 is like 21 MBs. And from
the last post I think they are not necessary anymore, right?

So.... let's suppose it's a repo synchronization issue.... why does
apt explode anyway? Shouldn't apt handle the problem (once detected)

Edmundo (eantoranz) wrote :

I was able to "bypass" the problem... but I had to delete both
pkgcache.bin and srcpkgcache.bin in order to be able to update (and
etc.) successfully.

Pablo Marchant (pamarca) wrote :

I also had this problem. The update manager kept complaining about a corrupted cache for over 2 weeks and finally today it started to segfault.Update-manager, apt-get, aptitude, all failed to work properly, so i went and removed apt cache like you did:

sudo rm -f /var/cache/apt/*.bin

and this fixed it...Though this solved it, I think there should be a more friendly way over this...

Johan Sköld (johan-skold) wrote :

I have the same problem. Running "apt-get update" fixed it. Not sure what causes it though.

Johan Sköld (johan-skold) wrote :

Update: It seems I spoke to soon, it did not fix it this time. However an "apt-get clean" followed by "dpkg --configure -a" did. I encounter this seg fault almost daily so if you need me to attach something, just let me know.

Edmundo (eantoranz) wrote :

I haven't seen it in a while, really. Why don't you try removing this
files from /var/cache/apt/


It worked for me when the error showed up.

Tim Caswell (tim-creationix) wrote :

I recently bought a 64 bit intel laptop and installed latest daily jaunty live. Every time I install it, I get this seg fault very soon after I start addind custom repositories. I've seen it with various PPAs (webkit, midori, chrimium), with medibuntu, and the virtualbox repository. Deleting the .bin files seems to fix it for me

Tim Caswell (tim-creationix) wrote :

Well, the fix is only temporary, after about five minutes of installing packages, it breaks again. Perhaps update manager is doing something funny. I also have to delete the lock files since they get left behind when the process dies.

str0g (buskol-waw-pl) wrote :

to fix update-manager you need to:
sudo apt-get install --reinstall update-manager update-manager-core

then do sudo touch /forcefsck
and to be sure sudo shutdown -F -r 0
then install lang packets and every thing else.

But your system will be still colapsing unluckly...
I had to reinstall rhytmbox compiz metacity sed, whole filesystem support,

My laptop is T9400, 4gb,wd320@7200,96gt-m,i4965agn and i can get stable 9.04 only on virtualbox :/
I am 100% sure that my laptop is not the issue smart is good no error , cpu/ram/gpu/vram is also stable. On 8.10 i have only problems with 180.11 drivers. W7 works great eh...

str0g (buskol-waw-pl) wrote :

reinstall also dpkg to have less problems

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers