update-manager crashed with SIGSEGV in DescriptionList()

Bug #938116 reported by Martin Mrazik
428
This bug affects 46 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
Michael Vogt
Precise
Fix Released
High
Michael Vogt

Bug Description

I was switching the mirror (software sources) in the Settings -> Ubuntu Software -> Download From
I'm running 12.04

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: update-manager 1:0.156.5
ProcVersionSignature: Ubuntu 3.2.0-17.26-generic-pae 3.2.6
Uname: Linux 3.2.0-17-generic-pae i686
ApportVersion: 1.92-0ubuntu1
Architecture: i386
CrashCounter: 1
Date: Tue Feb 21 21:01:55 2012
ExecutablePath: /usr/bin/update-manager
GsettingsChanges:
 com.ubuntu.update-manager first-run false
 com.ubuntu.update-manager launch-time 1329854490
 com.ubuntu.update-manager window-height 500
 com.ubuntu.update-manager window-width 600
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/update-manager
SegvAnalysis:
 Segfault happened at: 0xb5c026b3 <_ZNK8pkgCache11VerIterator21TranslatedDescriptionEv+115>: mov 0x14(%edx),%edx
 PC (0xb5c026b3) ok
 source "0x14(%edx)" (0x00ff3f53) not located in a known VMA region (needed readable region)!
 destination "%edx" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: update-manager
StacktraceTop:
 pkgCache::VerIterator::TranslatedDescription() const () from /usr/lib/i386-linux-gnu/libapt-pkg.so.4.12
 ?? () from /usr/lib/python2.7/dist-packages/apt_pkg.so
 ?? ()
 ?? ()
 _PyAptObject_getattro(_object*, _object*) () from /usr/lib/python2.7/dist-packages/apt_pkg.so
Title: update-manager crashed with SIGSEGV in pkgCache::VerIterator::TranslatedDescription()
UpgradeStatus: Upgraded to precise on 2012-02-17 (4 days ago)
UserGroups: adm admin cdrom dialout lp lpadmin plugdev sambashare

Revision history for this message
Martin Mrazik (mrazik) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 DescriptionList (this=<optimized out>) at ../build/include/apt-pkg/cacheiterators.h:429
 pkgCache::VerIterator::TranslatedDescription (this=0xa6d8744) at pkgcache.cc:921
 VersionGetTranslatedDescription (Self=<apt_pkg.Version at remote 0xa6d8734>) at python/cache.cc:1054
 getset_get ()
 _PyObject_GenericGetAttrWithDict ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
summary: - update-manager crashed with SIGSEGV in
- pkgCache::VerIterator::TranslatedDescription()
+ update-manager crashed with SIGSEGV in DescriptionList()
tags: removed: need-i386-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
RedSingularity (redsingularity) wrote :

Are you getting this error every time you run update-manager?
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in update-manager (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Martin Mrazik (mrazik) wrote :

Not really. I just tried it again and I was able to get the core-dump 2 times (out of ~5). It looks like (but I'm not sure; just a very simple observation) it happens if there are some updates in the queue.

Revision history for this message
RedSingularity (redsingularity) wrote :

Alright, I will try it a few times on my test machine while updates are available.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

visibility: private → public
affects: update-manager (Ubuntu) → apt (Ubuntu)
tags: added: bugpattern-needed
Revision history for this message
RedSingularity (redsingularity) wrote :

Marking back to new due to package reassignment.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in apt (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Changed in apt (Ubuntu):
importance: Medium → High
assignee: nobody → Michael Vogt (mvo)
Revision history for this message
Michael Vogt (mvo) wrote :

@Martin Mrazik (mrazik): when you say you get it 2/5 times, could you please add the exact steps to reproduce?

Revision history for this message
Steve Williams (steve-fi) wrote :

Hi Michael,

I had this bug when I installed Skype directly from their website and ran the deb file. When I ran the .deb file, the Ubuntu Software Centre would open, I'd hit install and the Software Centre would crash. However! Skype did install, but I could not update or install anything else until I had removed Skype.

I had to uninstall Skype from the terminal as I could not figure out how to remove it from the Software Centre without it crashing.

I tried this procedure at least 4 times with the same results each time. I don't think I am able to reproduce it without following those steps.

tags: added: rls-mgr-p-tracking
Revision history for this message
Brian Murray (brian-murray) wrote :

Michael - looking at all the duplicates of this bug report a couple of them make reference to using settings in update-manager to change servers and then encountering the crash.

tags: added: rls-p-tracking
Revision history for this message
Michael Vogt (mvo) wrote :

Sorry for not being more helpful:

<mvo> hm, I have a vague idea what might be causing this, but it requires some serious effort to look deeper, one simple workaround would be to always refresh the cache when software-properties was run and returns a exit-state that indicates that something changes

The same workaround should probably be added to software-center

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

Michael: I'm a little perplexed here, because it looks like update-manager already attempts to do that (it calls self.fillstore which calls self.initCache which calls cache.open and cache._initDepCache). Is it not refreshing the cache hard enough or something?

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

python-apt's documentation seems to indicate fairly clearly that one must create a new cache object after it's been externally modified, which makes some sense given that it's mmaped. A plausible source of trouble would be cached package objects that point into the old cache.

The traceback indicates (with a bit of imagination) that the crash is within self.store.clear(), which would make sense if update-manager were handling a signal on self.treeview_update in a way that involved references to the old cache. However, the workaround in bug 945536 has meant that the cursor-changed signal is a no-op for the duration of self.store.clear(). I wonder if this has caused this problem no longer to be visible in update-manager?

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your investigation Colin! It looks like the order of clear(), cache.open() was wrong and the clear might have caused calls to the old no longer valid cache. This should be fixed in trunk now, the order got updated and the store removed from the view before the clear().

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

All right, let's call this fixed by update-manager 1:0.156.12 then:

  [ Michael Vogt ]
  * UpdateManager/UpdateManager.py:
    - disconnect model and clear store before rebuilding the cache,
      thanks to Colin Watson

We can reopen if more duplicates start showing up.

Based on your comments on IRC, it sounds as though there's nothing to be done in software-center:

14:17 <mvo> cjwatson: just fyi, the cache reopen in s-c is done async in the "transaction-finished" signal, so that could be covered as well

affects: apt (Ubuntu Precise) → update-manager (Ubuntu Precise)
Changed in update-manager (Ubuntu Precise):
status: Confirmed → Fix Released
To post a comment you must log in.