apt-get dies with "E: Method http has died unexpectedly!"

Bug #385144 reported by Michael Bienia on 2009-06-09
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (ALT Linux)
Unknown
Unknown
apt (Ubuntu)
Medium
Michael Vogt

Bug Description

Binary package hint: apt

I'm using pbuilder on a tmpfs with apt-cacher-ng to cache the downloaded debs. It worked till now pretty good and fast. But since I'm have a pbuilder for karmic I see regularly "E: Method http has died unexpectedly!" during package download in my pbuilder. It almost always happen around package 22-24.
Retrying the complete build results in the same error, so I've do it manually inside the pbuilder. There it also fails at first with the same error, but restarting the download moves beyond this point (I guess it's because it has the packages till there already downloaded). "apt-get install" just the package it fails on shows also no error.
I've checked the logs of apt-cacher-ng but I don't see there any error messages. My observations may fool me but I got the impression that it only happens when the first 20 packages are really small and already cached by apt-cacher-ng so it can deliver them pretty fast.

Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I tried to reproduce the problem here but was not successful (I used a pbuilder on tmpfs with a squid proxy). Could you please try to get a apport backtrace of the exiting method?

Thanks,
 Michael

Changed in apt (Ubuntu):
status: New → Incomplete

We see this issue while building hardy and jaunty images but we're not building on a tmpfs and we're not using apt-cacher-ng (we're using squid).

We don't see any pattern with regards to the number of packages it downloads before failing.

Changed in apt (Ubuntu):
status: Incomplete → Confirmed
tags: added: oem-services
Michael Vogt (mvo) wrote :

I uploaded a apt with slightly better debugging output here:

https://edge.launchpad.net/~mvo/+archive/ppa?field.name_filter=apt&field.status_filter=published&field.series_filter=karmic

Could you please try that and see if that prints more information before it dies?

Michael Vogt (mvo) wrote :

Could you please please run with:
sudo apt-get install foo -o Debug::pkgAcquire::Worker=true -o Debug::acquire::http=true -o Debug::pkgAcquire=true

and see what this output before it dies?

Michael Bienia (geser) wrote :

Here is the apt output from apt 0.7.21ubuntu1.1.

Michael Bienia (geser) wrote :

And here is apt output for apt 0.7.21ubuntu1.2. The error message is:
E: ReadMessages: read return 0

The exit code from apt was 100.

Michael Vogt (mvo) wrote :

Thanks! I uploaded yet another one that contains more information about the http method. I hope this way we can figure out why its exiting suddenly. Could you please try that too?

Does it make a difference if you run:
$ sudo apt-get install foo -o Acquire::http::pipeline-depth=1
?

Thanks,
 Michael

Michael Bienia (geser) wrote :

apt 0.7.21ubuntu1.3 errors out with:

E: ReadMessages: read return 0 (buf size: 64000)
E: ::ReadMessages returned false - pkgAcquire::Worker::ReadMessages (2 No such file or directory)
E: Method http has died unexpectedly!
E: Sub-process http exited unexpectedly

Trying with pipeline-depth=1 I couldn't reproduce this crash.

Michael Bienia (geser) wrote :

strace output for the crash

Michael Vogt (mvo) on 2009-07-02
Changed in apt (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → Medium
status: Confirmed → In Progress
Michael Vogt (mvo) wrote :

I uploaded a package that fixes the problem for me into my PPA - could you please test and give feedback?

Thanks,
 Michael

Changed in apt (Ubuntu):
status: In Progress → Fix Committed
Michael Bienia (geser) wrote :

I couldn't reproduce it with apt 0.7.21ubuntu2~ppa1 anymore and test-building a package with this apt installed in my pbuilder worked also.

Launchpad Janitor (janitor) wrote :
Download full text (10.0 KiB)

This bug was fixed in the package apt - 0.7.23.1ubuntu1

---------------
apt (0.7.23.1ubuntu1) karmic; urgency=low

  [ Matt Zimmerman ]
  * apt-pkg/deb/dpkgpm.cc:
    - Suppress apport reports on dpkg short reads (these I/O errors are not
      generally indicative of a bug in the packaging)

  [ Loïc Minier ]
  * cmdline/apt-key:
    - Emit a warning if removed keys keyring is missing and skip associated
      checks (LP: #218971)

  [ Brian Murray ]
  * cmdline/apt-get.cc:
    - typo fix (LP: #370094)

  [ Michael Vogt ]
  * apt-pkg/deb/dpkgpm.cc:
    - when tcgetattr() returns non-zero skip all pty magic
      (thanks to Simon Richter, closes: #509866)
  * apt-inst/contrib/arfile.cc:
    - show propper error message for Invalid archive members
  * apt-pkg/acquire-worker.cc:
    - show error details of failed methods
  * apt-pkg/contrib/fileutl.cc:
    - if a process aborts with signal, show signal number
  * methods/http.cc:
    - ignore SIGPIPE, we deal with EPIPE from write in
      HttpMethod::ServerDie() (LP: #385144)
  * debian/apt.cron.daily:
    - if the timestamp is too far in the future, delete it
      (LP: #135262)

  [ Merge ]
  * merged from debian, reverted the libdlopen-udev branch
    because its too late in the release process for this now
  * not merged the proxy behaviour change from 0.7.23 (that will
    be part of lucid)

apt (0.7.23.1) unstable; urgency=low

  [ Michael Vogt ]
  * apt-pkg/pkgcache.cc:
    - do not set internel "needs-configure" state for packages in
      triggers-pending state. dpkg will deal with the trigger and
      it if does it before we trigger it, dpkg will error out
      (LP: #414631)
  * apt-pkg/acquire-item.cc:
    - do not segfault on invalid items (closes: #544080)

apt (0.7.23) unstable; urgency=low

  [ David Kalnischkies ]
  * cmdline/apt-get.cc:
    - add APT::Get::HideAutoRemove=small to display only a short line
      instead of the full package list. (Closes: #537450)
    - ShowBroken() in build-dep (by Mike O'Connor, Closes: #145916)
    - check for statfs.f_type (by Robert Millan, Closes: #509313)
    - correct the order of picked package binary vs source in source
    - use SourceVersion instead of the BinaryVersion to get the source
      Patch by Matt Kraai, thanks! (Closes: #382826)
    - add pkg/archive and codename in source (Closes: #414105, #441178)
  * apt-pkg/contrib/strutl.cc:
    - enable thousand separator according to the current locale
      (by Luca Bruno, Closes: #223712)
  * doc/apt.conf.5.xml:
    - mention the apt.conf.d dir (by Vincent McIntyre, Closes: #520831)
  * apt-inst/contrib/arfile.cc:
    - use sizeof instead strlen (by Marius Vollmer, Closes: #504325)
  * doc/apt-mark.8.xml:
    - improve manpage based on patch by Carl Chenet (Closes: #510286)
  * apt-pkg/acquire-item.cc:
    - use configsettings for dynamic compression type use and order.
      Based on a patch by Jyrki Muukkonen, thanks! (LP: #71746)
  * apt-pkg/aptconfiguration.cc:
    - add default configuration for compression types and add lzma
      support. Order is now bzip2, lzma, gzip, none (Closes: #510526)
  * ftparchive/writer.cc:
    - add lzma support also here, patch for this (and...

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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