python-apt can SIGSEGV when encountering Packages stanzas with no Description field (was: update-apt-xapian-index crashed with SIGSEGV in File())
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | apt (Ubuntu) |
High
|
Unassigned | ||
| | apt-xapian-index (Ubuntu) |
High
|
Unassigned | ||
| | python-apt (Ubuntu) |
High
|
Barry Warsaw | ||
Bug Description
Errors Bucket:
http://
There are 600+ reports of this on errors.ubuntu.com.
Something wrong
ProblemType: CrashDistroRelease: Ubuntu 13.10
Package: apt-xapian-index 0.45ubuntu2
ProcVersionSign
Uname: Linux 3.11.0-4-generic i686
ApportVersion: 2.12.1-0ubuntu3
Architecture: i386
CrashCounter: 1
Date: Tue Sep 3 01:23:23 2013
ExecutablePath: /usr/sbin/
InterpreterPath: /usr/bin/python2.7
MarkForUpload: True
PackageArchitec
ProcCmdline: /usr/bin/python /usr/sbin/
ProcEnviron:
TERM=linux
PATH=(custom, no user)
SHELL=/bin/sh
SegvAnalysis:
Segfault happened at: 0xb6c9e020: imul $0x3c,(%eax),%ebp
PC (0xb6c9e020) ok
source "$0x3c" ok
destination "(%eax)" (0xd7ac1000) not located in a known VMA region (needed writable region)!
SegvReason: writing unknown VMA
Signal: 11SourcePackage: apt-xapian-index
StacktraceTop:
?? () from /usr/lib/
?? ()
PyObject_GetAttr ()
PyEval_EvalFrameEx ()
?? ()
Title: update-
UpgradeStatus: Upgraded to saucy on 2013-08-16 (17 days ago)
UserGroups:
| aborland (aborland) wrote : | #1 |
| Apport retracing service (apport) wrote : | #2 |
| Changed in apt-xapian-index (Ubuntu): | |
| importance: | Undecided → Medium |
| summary: |
- update-apt-xapian-index crashed with SIGSEGV in PyObject_GetAttr() + update-apt-xapian-index crashed with SIGSEGV in File() |
| tags: | removed: need-i386-retrace |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in apt-xapian-index (Ubuntu): | |
| status: | New → Confirmed |
| tags: | added: trusty |
| information type: | Private → Public |
| Nazar Mokrynskyi (nazar-pc) wrote : | #7 |
Occures after log in.
Both on Ubuntu 13.10 and 14.04.
Now I have Intel Core i7-4900MQ CPU, but as I remember it was even on AMD FX-8120
| description: | updated |
| Changed in apt-xapian-index (Ubuntu): | |
| importance: | Medium → High |
| Iain Lane (laney) wrote : | #8 |
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 <email address hidden>
Architecture: amd64
Source: php-gearman
Version: 1.1.2-1build1
Depends: php5-gearman (= 1.1.2-1build1)
Filename: pool/universe/
Size: 50610
MD5sum: 0c9b4932b6a1de9
SHA1: 60697f6457e71e5
SHA256: 8f7f500dd44fa58
SHA512: 3809e68065c7b8e
Homepage: http://
I used python-faulthandler to print out a python stack trace when the segfault happens:
Current thread 0x00007fdc45a3c740:
File "/usr/lib/
File "/usr/lib/
File "<stdin>", line 1 in <module>
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/share/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/sbin/
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_
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 DescriptionGetF
DescFile = CppPyObject_
So I'm not sure if the problem is in python-apt here or if there's a bad iterator coming from libapt.
| summary: |
- 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()) |
| Iain Lane (laney) wrote : | #9 |
In a python REPL, I didn't manage to get a Package object which has a candidate() method, for some reason.
| Launchpad Janitor (janitor) wrote : | #10 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Changed in apt (Ubuntu): | |
| status: | New → Confirmed |
| Changed in python-apt (Ubuntu): | |
| status: | New → Confirmed |
| Changed in python-apt (Ubuntu): | |
| importance: | Undecided → High |
| Changed in apt (Ubuntu): | |
| importance: | Undecided → High |
| Changed in python-apt (Ubuntu): | |
| assignee: | nobody → Barry Warsaw (barry) |
| Barry Warsaw (barry) wrote : | #12 |
And of course now the Packages file has been fixed to include a Description, at least for that package. But this is still worth further investigation. Trying to get a reproducible test case eliminating axi. I suspect it's a problem in python-apt.
| Julian Andres Klode (juliank) wrote : | #13 |
The APT command-line code does the same loop python-apt does. If it fails in python-apt, APT fails as well. So in that case, the best idea might be to change APT by overriding end() to do the checks isGood() does, so all clients work correctly. This would require a rebuild of all reverse dependencies though, and is formally an ABI break.
| Nazar Mokrynskyi (nazar-pc) wrote : | #14 |
Can' t use synaptic at all because of this bug. Please, fix it ASAP.
Someone did broke it. I'm on 14.10 already, still suffering from it.
| tags: | added: utopic |
| Changed in python-apt (Ubuntu): | |
| status: | Confirmed → Triaged |
| Julian Andres Klode (juliank) wrote : | #15 |
This is fixed.
| Changed in apt (Ubuntu): | |
| status: | Confirmed → Fix Released |


StacktraceTop: apt-pkg/ cacheiterators. h:415 FileList (Self=0x1834dd24) at python/cache.cc:851 Type>) at ../Objects/ descrobject. c:146 GenericGetAttrW ithDict (dict=<optimized out>, name=0x9eaf3c0, obj=<optimized out>) at ../Objects/ object. c:1439 GenericGetAttr (name=<optimized out>, obj=<optimized out>) at ../Objects/ object. c:1461
File (this=0xbff71af4, this=0xbff71af4) at /usr/include/
DescriptionGet
getset_get.11201 (descr=0x9eaf86c, obj=0x1834dd24, type=0xb6cc92e0 <PyDescription_
_PyObject_
PyObject_