I'm not sure if this is a bug in apt, python-apt or software-center.
Here's my brain dump

ddebs.ubuntu.com currently has a package with no Description field

Package: php5-gearman-dbgsym
Priority: extra
Section: php
Installed-Size: 243
Maintainer: Debian PHP PECL Maintainers <pkg-php-p...@lists.alioth.debian.org>
Architecture: amd64
Source: php-gearman
Version: 1.1.2-1build1
Depends: php5-gearman (= 1.1.2-1build1)
Filename: 
pool/universe/p/php-gearman/php5-gearman-dbgsym_1.1.2-1build1_amd64.ddeb
Size: 50610
MD5sum: 0c9b4932b6a1de927c2f4fb7e388e5d5
SHA1: 60697f6457e71e5197f2a5109d62b7e100616684
SHA256: 8f7f500dd44fa58bb0af6ac573bb22b09b55d536baf28bb20a8aabd373cbdd65
SHA512: 
3809e68065c7b8e28c35143411aec449585d443a8a3101839e27671ad1129a33fe69679c9278d6ecea927e6b2b03db216a3812467306fac08826173c81ec3d32
Homepage: http://pecl.php.net/package/gearman

I used python-faulthandler to print out a python stack trace when the
segfault happens:

Current thread 0x00007fdc45a3c740:
  File "/usr/lib/python2.7/dist-packages/apt/package.py", line 273 in 
_translated_records
  File "/usr/lib/python2.7/dist-packages/apt/package.py", line 331 in 
description
  File "<stdin>", line 1 in <module>
  File "/usr/lib/python2.7/pdb.py", line 234 in default
  File "/usr/lib/python2.7/cmd.py", line 220 in onecmd
  File "/usr/lib/python2.7/pdb.py", line 279 in onecmd
  File "/usr/lib/python2.7/cmd.py", line 142 in cmdloop
  File "/usr/lib/python2.7/pdb.py", line 210 in interaction
  File "/usr/lib/python2.7/pdb.py", line 158 in user_line
  File "/usr/lib/python2.7/bdb.py", line 67 in dispatch_line
  File "/usr/lib/python2.7/bdb.py", line 49 in trace_dispatch
  File "/usr/share/apt-xapian-index/plugins/display_name.py", line 81 in index
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 540 in 
get_document_from_apt
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 577 in 
gen_documents_apt
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 719 in buildIndex
  File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 744 in rebuild
  File "/usr/sbin/update-apt-xapian-index", line 111 in <module>
Segmentation fault (core dumped)

display_name.py is a plugin from software-center which is doing this:

  def index(self, document, pkg):
        …
        ver = pkg.candidate

        if ver is None:
            return
        if self.val_display_name != -1:
            name = ver.summary

The `ver.summary' line is the one that triggers the segfault by
eventually calling into the crashing code in python-apt.

python/cache.cc crashes in this line in DescriptionGetFileList() at the
call to File():

        DescFile =
CppPyObject_NEW<pkgCache::PkgFileIterator>(Owner,&PyPackageFile_Type,I.File());

So I'm not sure if the problem is in python-apt here or if there's a bad
iterator coming from libapt.

** Also affects: apt (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: python-apt (Ubuntu)
   Importance: Undecided
       Status: New

** Summary changed:

- update-apt-xapian-index crashed with SIGSEGV in File()
+ python-apt can SIGSEGV when encountering Packages stanzas with no Description 
field (was: update-apt-xapian-index crashed with SIGSEGV in File())

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1220013

Title:
  python-apt can SIGSEGV when encountering Packages stanzas with no
  Description field (was: update-apt-xapian-index crashed with SIGSEGV
  in File())

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to