This bug was fixed in the package apport - 2.0-0ubuntu3

---------------
apport (2.0-0ubuntu3) precise; urgency=low

  [ Martin Pitt ]
  * data/general-hooks/ubuntu.py: Do not capture stderr of lsb_release.
    (LP: #955111)

  [ Scott Moser ]
  * data/general-hooks/ubuntu.py: timeout on attempts to contact ec2 metadata
    service (LP: #855651)
 -- Martin Pitt <[email protected]>   Tue, 03 Apr 2012 06:58:07 +0200

** Changed in: apport (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/855651

Title:
  apport can hang when checking for ec2 metadata

Status in “apport” package in Ubuntu:
  Fix Released

Bug description:
  data/general-hooks/ubuntu.py has something like this:
      ec2_instance = False
      for pkg in ('ec2-init', 'cloud-init'):
          try:
              if apport.packaging.get_version(pkg):
                  ec2_instance = True
                  break
      ...
      if ec2_instance:
          metadata_url = 'http://169.254.169.254/latest/meta-data/'
          ami_id_url = urljoin(metadata_url, 'ami-id')
          try:
              ami = urlopen(ami_id_url).read()
          except:
              ami = None

  If cloud-init is installed, then it will try to do a get of
  http://169.254.169.254/latest/meta-data/ .  In a restrictive firewall,
  that may be firewalled off, causing apport to appear to hang.  we've
  actually seen this in a Canonical run datacenter where cloud-init was
  installed on a host system.

  
  The problem can be remedied with:
    route add -host 169.254.169.254 reject

  Then, after reporting the bug simply do:
    route del -host 169.254.169.254 reject

  
  We should probably put a timeout on the urlopen call so that it doesn't hang 
indefinitely (or whatever the OS level socket timeout is, which is really 
large).

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: apport 1.23-0ubuntu1
  ProcVersionSignature: Ubuntu 3.0.0-11.18-server 3.0.4
  Uname: Linux 3.0.0-11-server x86_64
  ApportLog:
   
  ApportVersion: 1.23-0ubuntu1
  Architecture: amd64
  CrashReports:
   600:0:0:13730:2011-09-20 12:15:44.651957665 -0400:2011-09-20 
12:15:44.651957665 -0400:/var/crash/_usr_bin_add-apt-repository.0.crash
   775:1000:1000:4096:2011-09-19 20:46:56.988992051 -0400:2011-09-19 
20:46:57.298997188 -0400:/var/crash/unpack
   600:1000:114:35637:2011-09-19 20:57:13.669684000 -0400:2011-09-19 
20:59:01.801580663 
-0400:/var/crash/_usr_lib_erlang_erts-5.8.3_bin_erlexec.107.crash
   600:0:0:17359:2011-09-20 17:57:45.687626739 -0400:2011-09-20 
17:57:45.687626739 -0400:/var/crash/_usr_bin_nova-manage.0.crash
   600:0:0:246548:2011-09-19 22:15:29.600167786 -0400:2011-09-19 
22:15:29.560167110 -0400:/var/crash/rabbitmq-server.0.crash
  Date: Wed Sep 21 11:27:37 2011
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: apport
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/855651/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to