Apt segfaults on gutsy

Bug #140739 reported by Richie Ward
132
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Undecided
Unassigned
dpkg (Ubuntu)
Fix Released
High
Unassigned

Bug Description

A recent update that updated apt caused apt to segfault on gutsy.. I downloaded the update today.

Terminal output:
richie@richie-desktop:~$ sudo aptitude dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initialising package states... Done
Building tag database... Done
The following packages are unused and will be REMOVED:
  libavcodec0d libavformat0d libboost-date-time1.34.0
  libboost-thread1.34.0
The following packages will be upgraded:
  libdeskbar-tracker libtrackerclient0 tracker tracker-search-tool
4 packages upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
Need to get 0B/431kB of archives. After unpacking 6541kB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
(Reading database ... 190626 files and directories currently installed.)
Removing libavformat0d ...
Segmentation fault (core dumped)
richie@richie-desktop:~$

Revision history for this message
Hyrum Wright (hyrumwright) wrote :

Same problem here:

hwright@blitzz:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Calculating upgrade... Done
The following packages will be upgraded:
  dselect eog file-roller gcalctool gnome-cards-data gnome-doc-utils
  gnome-games gnome-games-data gnome-power-manager gnome-system-monitor
  gnome-terminal gnome-terminal-data gs-common gs-esp gs-esp-x hal-cups-utils
  libeel2-2 libeel2-data libgnomevfs2-bin libvte-common libvte9 mcpp nautilus
  nautilus-cd-burner nautilus-data python-cups python-vte restricted-manager
  restricted-manager-core system-config-printer xserver-xorg-video-savage
  zenity
32 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
115 not fully installed or removed.
Need to get 0B/28.1MB of archives.
After unpacking 2929kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Extracting templates from packages: 100%
(Reading database ... 134421 files and directories currently installed.)
Preparing to replace dselect 1.14.5ubuntu12 (using .../dselect_1.14.5ubuntu13_i386.deb) ...
Segmentation fault (core dumped)

Revision history for this message
Richie Ward (richies) wrote :

Also, Im on 32bit gutsy.. if anyone has any commands they would like me to run for debugging.. I will reply promptly.

Revision history for this message
Mikael Nilsson (mini) wrote :

Me too.

FYI - if you absolutely *must* install any programs (like if you're not able to boot), you can still do so manually by doing

sudo dpkg -i [something].deb

The debs are cached in /var/cache/apt/archives/

also, it's a good idea to do

sudo dpkg --configure -a

after such a crash.

Changed in dpkg:
importance: Undecided → High
Revision history for this message
effraie (effraie) wrote :

same problem here

Changed in dpkg:
status: New → Confirmed
Revision history for this message
TJ (tj) wrote :

Gutsy 64-bit has the same issue.

It first occurred trying to do a partial-upgrade with package gnome-icon-theme. I manually updated that using "apt-get install gnome-icon-theme" and then, after "dpkg --configure -a" the package "eog" failed. I ran a gdb trace and got:

$ gdb --args apt-get install eog

(gdb) run
Starting program: /usr/bin/apt-get install eog
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  eog
1 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
1 not fully installed or removed.
Need to get 0B/1141kB of archives.
After unpacking 36.9kB of additional disk space will be used.
(Reading database ... 137797 files and directories currently installed.)
Preparing to replace eog 2.19.92-0ubuntu1 (using .../eog_2.20.0-0ubuntu1_amd64.deb) ...

Program received signal SIGSEGV, Segmentation fault.
0x00002acce1436a51 in _strstrip () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
(gdb) bt
#0 0x00002acce1436a51 in _strstrip () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#1 0x00002acce14a5424 in pkgDPkgPM::ProcessDpkgStatusLine () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#2 0x00002acce14a6698 in pkgDPkgPM::DoDpkgStatusFd () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#3 0x00002acce14a748f in pkgDPkgPM::Go () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#4 0x00002acce145b45e in pkgPackageManager::DoInstallPostFork () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#5 0x000000000041510f in ?? ()
#6 0x00000000004198c2 in ?? ()
#7 0x00002acce1441b8a in CommandLine::DispatchArg () from /usr/lib/libapt-pkg-libc6.6-6.so.4.5
#8 0x0000000000407f8b in ?? ()
#9 0x00002acce2097b44 in __libc_start_main () from /lib/libc.so.6
#10 0x0000000000406589 in ?? ()
#11 0x00007fffc98b7f28 in ?? ()
#12 0x0000000000000000 in ?? ()

Revision history for this message
bigdoby (bigdoby-gmail) wrote :

is there a patch??? i have the same problem here...

Revision history for this message
Gert Kulyk (gkulyk) wrote :

Fix is uploaded. To get apt working again, you can either wait until dpkg 1.14.5ubuntu14 enters the archives, or you can manually downgrade to dpkg 1.14.5ubuntu12 if you need working apt now.

Revision history for this message
Colin Watson (cjwatson) wrote :

dpkg (1.14.5ubuntu14) gutsy; urgency=low

  * Change syntax of `processing:...' status fd outputs so
    as to avoid crashing apt's lame parser.

 -- Ian Jackson <email address hidden> Tue, 18 Sep 2007 17:14:31 +0100

I'm accelerating the publication of these binaries now and they should be available very shortly. We blocked the download of dpkg 1.14.5ubuntu13 on the mirrors in order to try to reduce the number of people affected by this problem.

Changed in dpkg:
status: Confirmed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

apt (0.7.6ubuntu10) gutsy; urgency=low

  * apt-pkg/deb/dpkgpm.cc:
    - fix parse error when dpkg sends unexpected data

 -- Michael Vogt <email address hidden> Tue, 18 Sep 2007 17:25:09 +0100

Changed in apt:
status: New → Fix Released
Revision history for this message
TJ (tj) wrote :

It might be advisable to describe the precise steps required to recover to the new versions, since installed apt can't be used.

Revision history for this message
Martin Erpicum (martin-erpicum) wrote :

I suppose the best way is to manualy download dpkg here :
http://us.archive.ubuntu.com/ubuntu/pool/main/d/dpkg/

Then :
# dpkg -i dpkg_1.14.5ubuntu14_i386.deb

Revision history for this message
Ian Jackson (ijackson) wrote : Re: [Bug 140739] Re: Apt segfaults on gutsy

TJ writes ("[Bug 140739] Re: Apt segfaults on gutsy"):
> It might be advisable to describe the precise steps required to recover
> to the new versions, since installed apt can't be used.

Sure. Download the dpkg.deb and install it manually:

 wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.14.5ubuntu14_i386.deb
 sudo dpkg -i dpkg_1.14.5ubuntu14_i386.deb

(Replace i386 with your architecture if necessary.)

Ian.

Revision history for this message
Hyrum Wright (hyrumwright) wrote :

The new package appears to work for me.

Thanks!

Revision history for this message
TJ (tj) wrote :

Here's the process I followed. First I checked for the builds to complete for apt and dpkg. I found that upgrading dpkg alone allowed update-manager to run successfully:

https://launchpad.net/ubuntu/+source/dpkg/1.14.5ubuntu14

If it has been built successfully follow the link for the appropriate architecture (in my case amd64).

In the left sidebar (the "Resulting binaries" portlet) follow the link to each available binary package in turn.

For each binary package, download the .deb listed under "File download"

You can also use a terminal and wget to do this, e.g. (for amd64) copy the link to the deb file and paste it as an argument to wget:

$ wget http://launchpadlibrarian.net/9354821/dpkg_1.14.5ubuntu14_amd64.deb
$ wget http://launchpadlibrarian.net/9354822/dselect_1.14.5ubuntu14_amd64.deb

Once downloaded, install:

$ sudo dpkg -i dselect_1.14.5ubuntu14_amd64.deb
$ dpkg -i dpkg_1.14.5ubuntu14_amd64.deb

Revision history for this message
Hugo Heden (hugoheden) wrote :

Ians instructions in comment #12 works for me.

(Sometimes you gotta love people.. Thanks for quick fix, and support from other posters here :-) )

- Hugo Heden

Revision history for this message
figjam (figjam) wrote :

whoaa.. spent about 2 hours trying to find a fix.

Thanks! this worked perfectly.

Revision history for this message
Richie Ward (richies) wrote :

Thanks guys, works now.

Revision history for this message
Luis Alberto Pabón (copong) wrote :

Works perfect now, ta.

Revision history for this message
Chris Scutcher (chris-scutcher) wrote :

It sorted me out!

Revision history for this message
guyvdb (guyvdb-gmail) wrote :

Recovery fails here:
 libc6-dev
 libgnomevfs2-common
 libgnomevfs2-extra
 libgnomevfs2-0
 libgnomevfs2-dev
are broken.

When I try to install the new .deb I get the message that I must first run
 apt-get upgrade -f
that failes with the same segfault.

what now?

Revision history for this message
Mikael Nilsson (mini) wrote :

tor 2007-09-20 klockan 11:40 +0000 skrev guyvdb:
> Recovery fails here:
> libc6-dev
> libgnomevfs2-common
> libgnomevfs2-extra
> libgnomevfs2-0
> libgnomevfs2-dev
> are broken.
>
> When I try to install the new .deb I get the message that I must first run
> apt-get upgrade -f

that is probably apt-get install -f

try that

> that failes with the same segfault.
>
> what now?
>
--
<email address hidden>

Plus ça change, plus c'est la même chose

Revision history for this message
guyvdb (guyvdb-gmail) wrote :

Same fault when I do install -f.

I managed to solve the problem by following the instructions found at https://bugs.launchpad.net/ubuntu/+source/apt/+bug/140777/comments/2

before installing the apt and dpkg packages I had to manually install every broken package first (libc6,..). Then it worked.

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

What I did when this happened was to find the packages with the
problem (they're downloaded in /var/cache/apt/archives) and install
them manually with "dpkg -i file.deb". Once you get to the point where
apt-get is updated, the normal process should work.

On 9/20/07, Mikael Nilsson <email address hidden> wrote:
>
> tor 2007-09-20 klockan 11:40 +0000 skrev guyvdb:
> > Recovery fails here:
> > libc6-dev
> > libgnomevfs2-common
> > libgnomevfs2-extra
> > libgnomevfs2-0
> > libgnomevfs2-dev
> > are broken.
> >
> > When I try to install the new .deb I get the message that I must first run
> > apt-get upgrade -f
>
> that is probably apt-get install -f
>
> try that
>
> > that failes with the same segfault.
> >
> > what now?
> >
> --
> <email address hidden>
>
> Plus ça change, plus c'est la même chose
>
> --
> Apt segfaults on gutsy
> https://bugs.launchpad.net/bugs/140739
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

--
Bogdan Butnaru — <email address hidden>
"I think I am a fallen star, I should wish on myself." – O.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.